| Index: pkg/analysis_server/lib/protocol/protocol_generated.dart
|
| diff --git a/pkg/analysis_server/lib/protocol/protocol_generated.dart b/pkg/analysis_server/lib/protocol/protocol_generated.dart
|
| index 87517d8a56301a241352bbfd6e2e4a26979c2b4b..52637211fc82caf6a34403cca4354483acfc3ee0 100644
|
| --- a/pkg/analysis_server/lib/protocol/protocol_generated.dart
|
| +++ b/pkg/analysis_server/lib/protocol/protocol_generated.dart
|
| @@ -6377,6 +6377,229 @@ class EditGetFixesResult implements ResponseResult {
|
| }
|
|
|
| /**
|
| + * edit.getPostfixCompletion params
|
| + *
|
| + * {
|
| + * "file": FilePath
|
| + * "key": String
|
| + * "offset": int
|
| + * }
|
| + *
|
| + * Clients may not extend, implement or mix-in this class.
|
| + */
|
| +class EditGetPostfixCompletionParams implements RequestParams {
|
| + String _file;
|
| +
|
| + String _key;
|
| +
|
| + int _offset;
|
| +
|
| + /**
|
| + * The file containing the postfix template to be expanded.
|
| + */
|
| + String get file => _file;
|
| +
|
| + /**
|
| + * The file containing the postfix template to be expanded.
|
| + */
|
| + void set file(String value) {
|
| + assert(value != null);
|
| + this._file = value;
|
| + }
|
| +
|
| + /**
|
| + * The unique name that identifies the template in use.
|
| + */
|
| + String get key => _key;
|
| +
|
| + /**
|
| + * The unique name that identifies the template in use.
|
| + */
|
| + void set key(String value) {
|
| + assert(value != null);
|
| + this._key = value;
|
| + }
|
| +
|
| + /**
|
| + * The offset used to identify the code to which the template will be
|
| + * applied.
|
| + */
|
| + int get offset => _offset;
|
| +
|
| + /**
|
| + * The offset used to identify the code to which the template will be
|
| + * applied.
|
| + */
|
| + void set offset(int value) {
|
| + assert(value != null);
|
| + this._offset = value;
|
| + }
|
| +
|
| + EditGetPostfixCompletionParams(String file, String key, int offset) {
|
| + this.file = file;
|
| + this.key = key;
|
| + this.offset = offset;
|
| + }
|
| +
|
| + factory EditGetPostfixCompletionParams.fromJson(
|
| + JsonDecoder jsonDecoder, String jsonPath, Object json) {
|
| + if (json == null) {
|
| + json = {};
|
| + }
|
| + if (json is Map) {
|
| + String file;
|
| + if (json.containsKey("file")) {
|
| + file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
|
| + } else {
|
| + throw jsonDecoder.mismatch(jsonPath, "file");
|
| + }
|
| + String key;
|
| + if (json.containsKey("key")) {
|
| + key = jsonDecoder.decodeString(jsonPath + ".key", json["key"]);
|
| + } else {
|
| + throw jsonDecoder.mismatch(jsonPath, "key");
|
| + }
|
| + int offset;
|
| + if (json.containsKey("offset")) {
|
| + offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
|
| + } else {
|
| + throw jsonDecoder.mismatch(jsonPath, "offset");
|
| + }
|
| + return new EditGetPostfixCompletionParams(file, key, offset);
|
| + } else {
|
| + throw jsonDecoder.mismatch(
|
| + jsonPath, "edit.getPostfixCompletion params", json);
|
| + }
|
| + }
|
| +
|
| + factory EditGetPostfixCompletionParams.fromRequest(Request request) {
|
| + return new EditGetPostfixCompletionParams.fromJson(
|
| + new RequestDecoder(request), "params", request.params);
|
| + }
|
| +
|
| + @override
|
| + Map<String, dynamic> toJson() {
|
| + Map<String, dynamic> result = {};
|
| + result["file"] = file;
|
| + result["key"] = key;
|
| + result["offset"] = offset;
|
| + return result;
|
| + }
|
| +
|
| + @override
|
| + Request toRequest(String id) {
|
| + return new Request(id, "edit.getPostfixCompletion", toJson());
|
| + }
|
| +
|
| + @override
|
| + String toString() => JSON.encode(toJson());
|
| +
|
| + @override
|
| + bool operator ==(other) {
|
| + if (other is EditGetPostfixCompletionParams) {
|
| + return file == other.file && key == other.key && offset == other.offset;
|
| + }
|
| + return false;
|
| + }
|
| +
|
| + @override
|
| + int get hashCode {
|
| + int hash = 0;
|
| + hash = JenkinsSmiHash.combine(hash, file.hashCode);
|
| + hash = JenkinsSmiHash.combine(hash, key.hashCode);
|
| + hash = JenkinsSmiHash.combine(hash, offset.hashCode);
|
| + return JenkinsSmiHash.finish(hash);
|
| + }
|
| +}
|
| +
|
| +/**
|
| + * edit.getPostfixCompletion result
|
| + *
|
| + * {
|
| + * "change": SourceChange
|
| + * }
|
| + *
|
| + * Clients may not extend, implement or mix-in this class.
|
| + */
|
| +class EditGetPostfixCompletionResult implements ResponseResult {
|
| + SourceChange _change;
|
| +
|
| + /**
|
| + * The change to be applied in order to complete the statement.
|
| + */
|
| + SourceChange get change => _change;
|
| +
|
| + /**
|
| + * The change to be applied in order to complete the statement.
|
| + */
|
| + void set change(SourceChange value) {
|
| + assert(value != null);
|
| + this._change = value;
|
| + }
|
| +
|
| + EditGetPostfixCompletionResult(SourceChange change) {
|
| + this.change = change;
|
| + }
|
| +
|
| + factory EditGetPostfixCompletionResult.fromJson(
|
| + JsonDecoder jsonDecoder, String jsonPath, Object json) {
|
| + if (json == null) {
|
| + json = {};
|
| + }
|
| + if (json is Map) {
|
| + SourceChange change;
|
| + if (json.containsKey("change")) {
|
| + change = new SourceChange.fromJson(
|
| + jsonDecoder, jsonPath + ".change", json["change"]);
|
| + } else {
|
| + throw jsonDecoder.mismatch(jsonPath, "change");
|
| + }
|
| + return new EditGetPostfixCompletionResult(change);
|
| + } else {
|
| + throw jsonDecoder.mismatch(
|
| + jsonPath, "edit.getPostfixCompletion result", json);
|
| + }
|
| + }
|
| +
|
| + factory EditGetPostfixCompletionResult.fromResponse(Response response) {
|
| + return new EditGetPostfixCompletionResult.fromJson(
|
| + new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
|
| + "result",
|
| + response.result);
|
| + }
|
| +
|
| + @override
|
| + Map<String, dynamic> toJson() {
|
| + Map<String, dynamic> result = {};
|
| + result["change"] = change.toJson();
|
| + return result;
|
| + }
|
| +
|
| + @override
|
| + Response toResponse(String id) {
|
| + return new Response(id, result: toJson());
|
| + }
|
| +
|
| + @override
|
| + String toString() => JSON.encode(toJson());
|
| +
|
| + @override
|
| + bool operator ==(other) {
|
| + if (other is EditGetPostfixCompletionResult) {
|
| + return change == other.change;
|
| + }
|
| + return false;
|
| + }
|
| +
|
| + @override
|
| + int get hashCode {
|
| + int hash = 0;
|
| + hash = JenkinsSmiHash.combine(hash, change.hashCode);
|
| + return JenkinsSmiHash.finish(hash);
|
| + }
|
| +}
|
| +
|
| +/**
|
| * edit.getRefactoring params
|
| *
|
| * {
|
| @@ -6876,38 +7099,265 @@ class EditGetRefactoringResult implements ResponseResult {
|
| @override
|
| int get hashCode {
|
| int hash = 0;
|
| - hash = JenkinsSmiHash.combine(hash, initialProblems.hashCode);
|
| - hash = JenkinsSmiHash.combine(hash, optionsProblems.hashCode);
|
| - hash = JenkinsSmiHash.combine(hash, finalProblems.hashCode);
|
| - hash = JenkinsSmiHash.combine(hash, feedback.hashCode);
|
| + hash = JenkinsSmiHash.combine(hash, initialProblems.hashCode);
|
| + hash = JenkinsSmiHash.combine(hash, optionsProblems.hashCode);
|
| + hash = JenkinsSmiHash.combine(hash, finalProblems.hashCode);
|
| + hash = JenkinsSmiHash.combine(hash, feedback.hashCode);
|
| + hash = JenkinsSmiHash.combine(hash, change.hashCode);
|
| + hash = JenkinsSmiHash.combine(hash, potentialEdits.hashCode);
|
| + return JenkinsSmiHash.finish(hash);
|
| + }
|
| +}
|
| +
|
| +/**
|
| + * edit.getStatementCompletion params
|
| + *
|
| + * {
|
| + * "file": FilePath
|
| + * "offset": int
|
| + * }
|
| + *
|
| + * Clients may not extend, implement or mix-in this class.
|
| + */
|
| +class EditGetStatementCompletionParams implements RequestParams {
|
| + String _file;
|
| +
|
| + int _offset;
|
| +
|
| + /**
|
| + * The file containing the statement to be completed.
|
| + */
|
| + String get file => _file;
|
| +
|
| + /**
|
| + * The file containing the statement to be completed.
|
| + */
|
| + void set file(String value) {
|
| + assert(value != null);
|
| + this._file = value;
|
| + }
|
| +
|
| + /**
|
| + * The offset used to identify the statement to be completed.
|
| + */
|
| + int get offset => _offset;
|
| +
|
| + /**
|
| + * The offset used to identify the statement to be completed.
|
| + */
|
| + void set offset(int value) {
|
| + assert(value != null);
|
| + this._offset = value;
|
| + }
|
| +
|
| + EditGetStatementCompletionParams(String file, int offset) {
|
| + this.file = file;
|
| + this.offset = offset;
|
| + }
|
| +
|
| + factory EditGetStatementCompletionParams.fromJson(
|
| + JsonDecoder jsonDecoder, String jsonPath, Object json) {
|
| + if (json == null) {
|
| + json = {};
|
| + }
|
| + if (json is Map) {
|
| + String file;
|
| + if (json.containsKey("file")) {
|
| + file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
|
| + } else {
|
| + throw jsonDecoder.mismatch(jsonPath, "file");
|
| + }
|
| + int offset;
|
| + if (json.containsKey("offset")) {
|
| + offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
|
| + } else {
|
| + throw jsonDecoder.mismatch(jsonPath, "offset");
|
| + }
|
| + return new EditGetStatementCompletionParams(file, offset);
|
| + } else {
|
| + throw jsonDecoder.mismatch(
|
| + jsonPath, "edit.getStatementCompletion params", json);
|
| + }
|
| + }
|
| +
|
| + factory EditGetStatementCompletionParams.fromRequest(Request request) {
|
| + return new EditGetStatementCompletionParams.fromJson(
|
| + new RequestDecoder(request), "params", request.params);
|
| + }
|
| +
|
| + @override
|
| + Map<String, dynamic> toJson() {
|
| + Map<String, dynamic> result = {};
|
| + result["file"] = file;
|
| + result["offset"] = offset;
|
| + return result;
|
| + }
|
| +
|
| + @override
|
| + Request toRequest(String id) {
|
| + return new Request(id, "edit.getStatementCompletion", toJson());
|
| + }
|
| +
|
| + @override
|
| + String toString() => JSON.encode(toJson());
|
| +
|
| + @override
|
| + bool operator ==(other) {
|
| + if (other is EditGetStatementCompletionParams) {
|
| + return file == other.file && offset == other.offset;
|
| + }
|
| + return false;
|
| + }
|
| +
|
| + @override
|
| + int get hashCode {
|
| + int hash = 0;
|
| + hash = JenkinsSmiHash.combine(hash, file.hashCode);
|
| + hash = JenkinsSmiHash.combine(hash, offset.hashCode);
|
| + return JenkinsSmiHash.finish(hash);
|
| + }
|
| +}
|
| +
|
| +/**
|
| + * edit.getStatementCompletion result
|
| + *
|
| + * {
|
| + * "change": SourceChange
|
| + * "whitespaceOnly": bool
|
| + * }
|
| + *
|
| + * Clients may not extend, implement or mix-in this class.
|
| + */
|
| +class EditGetStatementCompletionResult implements ResponseResult {
|
| + SourceChange _change;
|
| +
|
| + bool _whitespaceOnly;
|
| +
|
| + /**
|
| + * The change to be applied in order to complete the statement.
|
| + */
|
| + SourceChange get change => _change;
|
| +
|
| + /**
|
| + * The change to be applied in order to complete the statement.
|
| + */
|
| + void set change(SourceChange value) {
|
| + assert(value != null);
|
| + this._change = value;
|
| + }
|
| +
|
| + /**
|
| + * Will be true if the change contains nothing but whitespace characters, or
|
| + * is empty.
|
| + */
|
| + bool get whitespaceOnly => _whitespaceOnly;
|
| +
|
| + /**
|
| + * Will be true if the change contains nothing but whitespace characters, or
|
| + * is empty.
|
| + */
|
| + void set whitespaceOnly(bool value) {
|
| + assert(value != null);
|
| + this._whitespaceOnly = value;
|
| + }
|
| +
|
| + EditGetStatementCompletionResult(SourceChange change, bool whitespaceOnly) {
|
| + this.change = change;
|
| + this.whitespaceOnly = whitespaceOnly;
|
| + }
|
| +
|
| + factory EditGetStatementCompletionResult.fromJson(
|
| + JsonDecoder jsonDecoder, String jsonPath, Object json) {
|
| + if (json == null) {
|
| + json = {};
|
| + }
|
| + if (json is Map) {
|
| + SourceChange change;
|
| + if (json.containsKey("change")) {
|
| + change = new SourceChange.fromJson(
|
| + jsonDecoder, jsonPath + ".change", json["change"]);
|
| + } else {
|
| + throw jsonDecoder.mismatch(jsonPath, "change");
|
| + }
|
| + bool whitespaceOnly;
|
| + if (json.containsKey("whitespaceOnly")) {
|
| + whitespaceOnly = jsonDecoder.decodeBool(
|
| + jsonPath + ".whitespaceOnly", json["whitespaceOnly"]);
|
| + } else {
|
| + throw jsonDecoder.mismatch(jsonPath, "whitespaceOnly");
|
| + }
|
| + return new EditGetStatementCompletionResult(change, whitespaceOnly);
|
| + } else {
|
| + throw jsonDecoder.mismatch(
|
| + jsonPath, "edit.getStatementCompletion result", json);
|
| + }
|
| + }
|
| +
|
| + factory EditGetStatementCompletionResult.fromResponse(Response response) {
|
| + return new EditGetStatementCompletionResult.fromJson(
|
| + new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
|
| + "result",
|
| + response.result);
|
| + }
|
| +
|
| + @override
|
| + Map<String, dynamic> toJson() {
|
| + Map<String, dynamic> result = {};
|
| + result["change"] = change.toJson();
|
| + result["whitespaceOnly"] = whitespaceOnly;
|
| + return result;
|
| + }
|
| +
|
| + @override
|
| + Response toResponse(String id) {
|
| + return new Response(id, result: toJson());
|
| + }
|
| +
|
| + @override
|
| + String toString() => JSON.encode(toJson());
|
| +
|
| + @override
|
| + bool operator ==(other) {
|
| + if (other is EditGetStatementCompletionResult) {
|
| + return change == other.change && whitespaceOnly == other.whitespaceOnly;
|
| + }
|
| + return false;
|
| + }
|
| +
|
| + @override
|
| + int get hashCode {
|
| + int hash = 0;
|
| hash = JenkinsSmiHash.combine(hash, change.hashCode);
|
| - hash = JenkinsSmiHash.combine(hash, potentialEdits.hashCode);
|
| + hash = JenkinsSmiHash.combine(hash, whitespaceOnly.hashCode);
|
| return JenkinsSmiHash.finish(hash);
|
| }
|
| }
|
|
|
| /**
|
| - * edit.getStatementCompletion params
|
| + * edit.isPostfixCompletionApplicable params
|
| *
|
| * {
|
| * "file": FilePath
|
| + * "key": String
|
| * "offset": int
|
| * }
|
| *
|
| * Clients may not extend, implement or mix-in this class.
|
| */
|
| -class EditGetStatementCompletionParams implements RequestParams {
|
| +class EditIsPostfixCompletionApplicableParams implements RequestParams {
|
| String _file;
|
|
|
| + String _key;
|
| +
|
| int _offset;
|
|
|
| /**
|
| - * The file containing the statement to be completed.
|
| + * The file containing the postfix template to be expanded.
|
| */
|
| String get file => _file;
|
|
|
| /**
|
| - * The file containing the statement to be completed.
|
| + * The file containing the postfix template to be expanded.
|
| */
|
| void set file(String value) {
|
| assert(value != null);
|
| @@ -6915,24 +7365,40 @@ class EditGetStatementCompletionParams implements RequestParams {
|
| }
|
|
|
| /**
|
| - * The offset used to identify the statement to be completed.
|
| + * The unique name that identifies the template in use.
|
| + */
|
| + String get key => _key;
|
| +
|
| + /**
|
| + * The unique name that identifies the template in use.
|
| + */
|
| + void set key(String value) {
|
| + assert(value != null);
|
| + this._key = value;
|
| + }
|
| +
|
| + /**
|
| + * The offset used to identify the code to which the template will be
|
| + * applied.
|
| */
|
| int get offset => _offset;
|
|
|
| /**
|
| - * The offset used to identify the statement to be completed.
|
| + * The offset used to identify the code to which the template will be
|
| + * applied.
|
| */
|
| void set offset(int value) {
|
| assert(value != null);
|
| this._offset = value;
|
| }
|
|
|
| - EditGetStatementCompletionParams(String file, int offset) {
|
| + EditIsPostfixCompletionApplicableParams(String file, String key, int offset) {
|
| this.file = file;
|
| + this.key = key;
|
| this.offset = offset;
|
| }
|
|
|
| - factory EditGetStatementCompletionParams.fromJson(
|
| + factory EditIsPostfixCompletionApplicableParams.fromJson(
|
| JsonDecoder jsonDecoder, String jsonPath, Object json) {
|
| if (json == null) {
|
| json = {};
|
| @@ -6944,21 +7410,27 @@ class EditGetStatementCompletionParams implements RequestParams {
|
| } else {
|
| throw jsonDecoder.mismatch(jsonPath, "file");
|
| }
|
| + String key;
|
| + if (json.containsKey("key")) {
|
| + key = jsonDecoder.decodeString(jsonPath + ".key", json["key"]);
|
| + } else {
|
| + throw jsonDecoder.mismatch(jsonPath, "key");
|
| + }
|
| int offset;
|
| if (json.containsKey("offset")) {
|
| offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
|
| } else {
|
| throw jsonDecoder.mismatch(jsonPath, "offset");
|
| }
|
| - return new EditGetStatementCompletionParams(file, offset);
|
| + return new EditIsPostfixCompletionApplicableParams(file, key, offset);
|
| } else {
|
| throw jsonDecoder.mismatch(
|
| - jsonPath, "edit.getStatementCompletion params", json);
|
| + jsonPath, "edit.isPostfixCompletionApplicable params", json);
|
| }
|
| }
|
|
|
| - factory EditGetStatementCompletionParams.fromRequest(Request request) {
|
| - return new EditGetStatementCompletionParams.fromJson(
|
| + factory EditIsPostfixCompletionApplicableParams.fromRequest(Request request) {
|
| + return new EditIsPostfixCompletionApplicableParams.fromJson(
|
| new RequestDecoder(request), "params", request.params);
|
| }
|
|
|
| @@ -6966,13 +7438,14 @@ class EditGetStatementCompletionParams implements RequestParams {
|
| Map<String, dynamic> toJson() {
|
| Map<String, dynamic> result = {};
|
| result["file"] = file;
|
| + result["key"] = key;
|
| result["offset"] = offset;
|
| return result;
|
| }
|
|
|
| @override
|
| Request toRequest(String id) {
|
| - return new Request(id, "edit.getStatementCompletion", toJson());
|
| + return new Request(id, "edit.isPostfixCompletionApplicable", toJson());
|
| }
|
|
|
| @override
|
| @@ -6980,8 +7453,8 @@ class EditGetStatementCompletionParams implements RequestParams {
|
|
|
| @override
|
| bool operator ==(other) {
|
| - if (other is EditGetStatementCompletionParams) {
|
| - return file == other.file && offset == other.offset;
|
| + if (other is EditIsPostfixCompletionApplicableParams) {
|
| + return file == other.file && key == other.key && offset == other.offset;
|
| }
|
| return false;
|
| }
|
| @@ -6990,88 +7463,184 @@ class EditGetStatementCompletionParams implements RequestParams {
|
| int get hashCode {
|
| int hash = 0;
|
| hash = JenkinsSmiHash.combine(hash, file.hashCode);
|
| + hash = JenkinsSmiHash.combine(hash, key.hashCode);
|
| hash = JenkinsSmiHash.combine(hash, offset.hashCode);
|
| return JenkinsSmiHash.finish(hash);
|
| }
|
| }
|
|
|
| /**
|
| - * edit.getStatementCompletion result
|
| + * edit.isPostfixCompletionApplicable result
|
| *
|
| * {
|
| - * "change": SourceChange
|
| - * "whitespaceOnly": bool
|
| + * "value": bool
|
| * }
|
| *
|
| * Clients may not extend, implement or mix-in this class.
|
| */
|
| -class EditGetStatementCompletionResult implements ResponseResult {
|
| - SourceChange _change;
|
| -
|
| - bool _whitespaceOnly;
|
| +class EditIsPostfixCompletionApplicableResult implements ResponseResult {
|
| + bool _value;
|
|
|
| /**
|
| - * The change to be applied in order to complete the statement.
|
| + * True if the template can be expanded at the given location.
|
| */
|
| - SourceChange get change => _change;
|
| + bool get value => _value;
|
|
|
| /**
|
| - * The change to be applied in order to complete the statement.
|
| + * True if the template can be expanded at the given location.
|
| */
|
| - void set change(SourceChange value) {
|
| + void set value(bool value) {
|
| assert(value != null);
|
| - this._change = value;
|
| + this._value = value;
|
| + }
|
| +
|
| + EditIsPostfixCompletionApplicableResult(bool value) {
|
| + this.value = value;
|
| + }
|
| +
|
| + factory EditIsPostfixCompletionApplicableResult.fromJson(
|
| + JsonDecoder jsonDecoder, String jsonPath, Object json) {
|
| + if (json == null) {
|
| + json = {};
|
| + }
|
| + if (json is Map) {
|
| + bool value;
|
| + if (json.containsKey("value")) {
|
| + value = jsonDecoder.decodeBool(jsonPath + ".value", json["value"]);
|
| + } else {
|
| + throw jsonDecoder.mismatch(jsonPath, "value");
|
| + }
|
| + return new EditIsPostfixCompletionApplicableResult(value);
|
| + } else {
|
| + throw jsonDecoder.mismatch(
|
| + jsonPath, "edit.isPostfixCompletionApplicable result", json);
|
| + }
|
| + }
|
| +
|
| + factory EditIsPostfixCompletionApplicableResult.fromResponse(
|
| + Response response) {
|
| + return new EditIsPostfixCompletionApplicableResult.fromJson(
|
| + new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
|
| + "result",
|
| + response.result);
|
| + }
|
| +
|
| + @override
|
| + Map<String, dynamic> toJson() {
|
| + Map<String, dynamic> result = {};
|
| + result["value"] = value;
|
| + return result;
|
| + }
|
| +
|
| + @override
|
| + Response toResponse(String id) {
|
| + return new Response(id, result: toJson());
|
| + }
|
| +
|
| + @override
|
| + String toString() => JSON.encode(toJson());
|
| +
|
| + @override
|
| + bool operator ==(other) {
|
| + if (other is EditIsPostfixCompletionApplicableResult) {
|
| + return value == other.value;
|
| + }
|
| + return false;
|
| }
|
|
|
| + @override
|
| + int get hashCode {
|
| + int hash = 0;
|
| + hash = JenkinsSmiHash.combine(hash, value.hashCode);
|
| + return JenkinsSmiHash.finish(hash);
|
| + }
|
| +}
|
| +
|
| +/**
|
| + * edit.listPostfixCompletionTemplates params
|
| + *
|
| + * Clients may not extend, implement or mix-in this class.
|
| + */
|
| +class EditListPostfixCompletionTemplatesParams implements RequestParams {
|
| + @override
|
| + Map<String, dynamic> toJson() => <String, dynamic>{};
|
| +
|
| + @override
|
| + Request toRequest(String id) {
|
| + return new Request(id, "edit.listPostfixCompletionTemplates", null);
|
| + }
|
| +
|
| + @override
|
| + bool operator ==(other) {
|
| + if (other is EditListPostfixCompletionTemplatesParams) {
|
| + return true;
|
| + }
|
| + return false;
|
| + }
|
| +
|
| + @override
|
| + int get hashCode {
|
| + return 690713107;
|
| + }
|
| +}
|
| +
|
| +/**
|
| + * edit.listPostfixCompletionTemplates result
|
| + *
|
| + * {
|
| + * "templates": List<PostfixTemplateDescriptor>
|
| + * }
|
| + *
|
| + * Clients may not extend, implement or mix-in this class.
|
| + */
|
| +class EditListPostfixCompletionTemplatesResult implements ResponseResult {
|
| + List<PostfixTemplateDescriptor> _templates;
|
| +
|
| /**
|
| - * Will be true if the change contains nothing but whitespace characters, or
|
| - * is empty.
|
| + * The list of available template.
|
| */
|
| - bool get whitespaceOnly => _whitespaceOnly;
|
| + List<PostfixTemplateDescriptor> get templates => _templates;
|
|
|
| /**
|
| - * Will be true if the change contains nothing but whitespace characters, or
|
| - * is empty.
|
| + * The list of available template.
|
| */
|
| - void set whitespaceOnly(bool value) {
|
| + void set templates(List<PostfixTemplateDescriptor> value) {
|
| assert(value != null);
|
| - this._whitespaceOnly = value;
|
| + this._templates = value;
|
| }
|
|
|
| - EditGetStatementCompletionResult(SourceChange change, bool whitespaceOnly) {
|
| - this.change = change;
|
| - this.whitespaceOnly = whitespaceOnly;
|
| + EditListPostfixCompletionTemplatesResult(
|
| + List<PostfixTemplateDescriptor> templates) {
|
| + this.templates = templates;
|
| }
|
|
|
| - factory EditGetStatementCompletionResult.fromJson(
|
| + factory EditListPostfixCompletionTemplatesResult.fromJson(
|
| JsonDecoder jsonDecoder, String jsonPath, Object json) {
|
| if (json == null) {
|
| json = {};
|
| }
|
| if (json is Map) {
|
| - SourceChange change;
|
| - if (json.containsKey("change")) {
|
| - change = new SourceChange.fromJson(
|
| - jsonDecoder, jsonPath + ".change", json["change"]);
|
| - } else {
|
| - throw jsonDecoder.mismatch(jsonPath, "change");
|
| - }
|
| - bool whitespaceOnly;
|
| - if (json.containsKey("whitespaceOnly")) {
|
| - whitespaceOnly = jsonDecoder.decodeBool(
|
| - jsonPath + ".whitespaceOnly", json["whitespaceOnly"]);
|
| + List<PostfixTemplateDescriptor> templates;
|
| + if (json.containsKey("templates")) {
|
| + templates = jsonDecoder.decodeList(
|
| + jsonPath + ".templates",
|
| + json["templates"],
|
| + (String jsonPath, Object json) =>
|
| + new PostfixTemplateDescriptor.fromJson(
|
| + jsonDecoder, jsonPath, json));
|
| } else {
|
| - throw jsonDecoder.mismatch(jsonPath, "whitespaceOnly");
|
| + throw jsonDecoder.mismatch(jsonPath, "templates");
|
| }
|
| - return new EditGetStatementCompletionResult(change, whitespaceOnly);
|
| + return new EditListPostfixCompletionTemplatesResult(templates);
|
| } else {
|
| throw jsonDecoder.mismatch(
|
| - jsonPath, "edit.getStatementCompletion result", json);
|
| + jsonPath, "edit.listPostfixCompletionTemplates result", json);
|
| }
|
| }
|
|
|
| - factory EditGetStatementCompletionResult.fromResponse(Response response) {
|
| - return new EditGetStatementCompletionResult.fromJson(
|
| + factory EditListPostfixCompletionTemplatesResult.fromResponse(
|
| + Response response) {
|
| + return new EditListPostfixCompletionTemplatesResult.fromJson(
|
| new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
|
| "result",
|
| response.result);
|
| @@ -7080,8 +7649,9 @@ class EditGetStatementCompletionResult implements ResponseResult {
|
| @override
|
| Map<String, dynamic> toJson() {
|
| Map<String, dynamic> result = {};
|
| - result["change"] = change.toJson();
|
| - result["whitespaceOnly"] = whitespaceOnly;
|
| + result["templates"] = templates
|
| + .map((PostfixTemplateDescriptor value) => value.toJson())
|
| + .toList();
|
| return result;
|
| }
|
|
|
| @@ -7095,8 +7665,9 @@ class EditGetStatementCompletionResult implements ResponseResult {
|
|
|
| @override
|
| bool operator ==(other) {
|
| - if (other is EditGetStatementCompletionResult) {
|
| - return change == other.change && whitespaceOnly == other.whitespaceOnly;
|
| + if (other is EditListPostfixCompletionTemplatesResult) {
|
| + return listEqual(templates, other.templates,
|
| + (PostfixTemplateDescriptor a, PostfixTemplateDescriptor b) => a == b);
|
| }
|
| return false;
|
| }
|
| @@ -7104,8 +7675,7 @@ class EditGetStatementCompletionResult implements ResponseResult {
|
| @override
|
| int get hashCode {
|
| int hash = 0;
|
| - hash = JenkinsSmiHash.combine(hash, change.hashCode);
|
| - hash = JenkinsSmiHash.combine(hash, whitespaceOnly.hashCode);
|
| + hash = JenkinsSmiHash.combine(hash, templates.hashCode);
|
| return JenkinsSmiHash.finish(hash);
|
| }
|
| }
|
| @@ -10747,6 +11317,132 @@ class Override implements HasToJson {
|
| }
|
|
|
| /**
|
| + * PostfixTemplateDescriptor
|
| + *
|
| + * {
|
| + * "name": String
|
| + * "key": String
|
| + * "example": String
|
| + * }
|
| + *
|
| + * Clients may not extend, implement or mix-in this class.
|
| + */
|
| +class PostfixTemplateDescriptor implements HasToJson {
|
| + String _name;
|
| +
|
| + String _key;
|
| +
|
| + String _example;
|
| +
|
| + /**
|
| + * The template name, shown in the UI.
|
| + */
|
| + String get name => _name;
|
| +
|
| + /**
|
| + * The template name, shown in the UI.
|
| + */
|
| + void set name(String value) {
|
| + assert(value != null);
|
| + this._name = value;
|
| + }
|
| +
|
| + /**
|
| + * The unique template key, not shown in the UI.
|
| + */
|
| + String get key => _key;
|
| +
|
| + /**
|
| + * The unique template key, not shown in the UI.
|
| + */
|
| + void set key(String value) {
|
| + assert(value != null);
|
| + this._key = value;
|
| + }
|
| +
|
| + /**
|
| + * A short example of the transformation performed when the template is
|
| + * applied.
|
| + */
|
| + String get example => _example;
|
| +
|
| + /**
|
| + * A short example of the transformation performed when the template is
|
| + * applied.
|
| + */
|
| + void set example(String value) {
|
| + assert(value != null);
|
| + this._example = value;
|
| + }
|
| +
|
| + PostfixTemplateDescriptor(String name, String key, String example) {
|
| + this.name = name;
|
| + this.key = key;
|
| + this.example = example;
|
| + }
|
| +
|
| + factory PostfixTemplateDescriptor.fromJson(
|
| + JsonDecoder jsonDecoder, String jsonPath, Object json) {
|
| + if (json == null) {
|
| + json = {};
|
| + }
|
| + if (json is Map) {
|
| + String name;
|
| + if (json.containsKey("name")) {
|
| + name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
|
| + } else {
|
| + throw jsonDecoder.mismatch(jsonPath, "name");
|
| + }
|
| + String key;
|
| + if (json.containsKey("key")) {
|
| + key = jsonDecoder.decodeString(jsonPath + ".key", json["key"]);
|
| + } else {
|
| + throw jsonDecoder.mismatch(jsonPath, "key");
|
| + }
|
| + String example;
|
| + if (json.containsKey("example")) {
|
| + example =
|
| + jsonDecoder.decodeString(jsonPath + ".example", json["example"]);
|
| + } else {
|
| + throw jsonDecoder.mismatch(jsonPath, "example");
|
| + }
|
| + return new PostfixTemplateDescriptor(name, key, example);
|
| + } else {
|
| + throw jsonDecoder.mismatch(jsonPath, "PostfixTemplateDescriptor", json);
|
| + }
|
| + }
|
| +
|
| + @override
|
| + Map<String, dynamic> toJson() {
|
| + Map<String, dynamic> result = {};
|
| + result["name"] = name;
|
| + result["key"] = key;
|
| + result["example"] = example;
|
| + return result;
|
| + }
|
| +
|
| + @override
|
| + String toString() => JSON.encode(toJson());
|
| +
|
| + @override
|
| + bool operator ==(other) {
|
| + if (other is PostfixTemplateDescriptor) {
|
| + return name == other.name && key == other.key && example == other.example;
|
| + }
|
| + return false;
|
| + }
|
| +
|
| + @override
|
| + int get hashCode {
|
| + int hash = 0;
|
| + hash = JenkinsSmiHash.combine(hash, name.hashCode);
|
| + hash = JenkinsSmiHash.combine(hash, key.hashCode);
|
| + hash = JenkinsSmiHash.combine(hash, example.hashCode);
|
| + return JenkinsSmiHash.finish(hash);
|
| + }
|
| +}
|
| +
|
| +/**
|
| * PubStatus
|
| *
|
| * {
|
|
|