Chromium Code Reviews| 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..0dec547b5c51e225ab387b607c7e9c27ad2e179c 100644 |
| --- a/pkg/analysis_server/lib/protocol/protocol_generated.dart |
| +++ b/pkg/analysis_server/lib/protocol/protocol_generated.dart |
| @@ -6887,6 +6887,142 @@ class EditGetRefactoringResult implements ResponseResult { |
| } |
| /** |
| + * edit.getPostfixCompletion params |
| + * |
| + * { |
| + * "file": FilePath |
| + * "offset": int |
| + * "key" : String |
| + * } |
| + * |
| + * Clients may not extend, implement or mix-in this class. |
| + */ |
| +class EditGetPostfixCompletionParams implements RequestParams { |
| + String _file; |
| + int _offset; |
| + String _key; |
| + |
| + /** |
| + * 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; |
| + } |
| + |
| + /** |
| + * The key identifying which postfix completion to apply. |
| + */ |
| + String get key => _key; |
| + |
| + /** |
| + * The key identifying which postfix completion to apply. |
| + */ |
| + void set key(String value) { |
| + assert(value != null); |
| + this._key = value; |
| + } |
| + |
| + EditGetPostfixCompletionParams(String file, int offset, String key) { |
| + this.file = file; |
| + this.offset = offset; |
| + this.key = key; |
| + } |
| + |
| + 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"); |
| + } |
| + int offset; |
| + if (json.containsKey("offset")) { |
| + offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); |
| + } else { |
| + throw jsonDecoder.mismatch(jsonPath, "offset"); |
| + } |
| + String key; |
| + if (json.containsKey("key")) { |
| + key = jsonDecoder.decodeString(jsonPath + ".key", json["key"]); |
| + } else { |
| + throw jsonDecoder.mismatch(jsonPath, "key"); |
| + } |
| + return new EditGetPostfixCompletionParams(file, offset, key); |
| + } else { |
| + throw jsonDecoder.mismatch( |
| + jsonPath, "edit.getStatementCompletion 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["offset"] = offset; |
| + result["key"] = key; |
| + return result; |
| + } |
| + |
| + @override |
| + Request toRequest(String id) { |
| + return new Request(id, "edit.getPostfixCompletion", toJson()); |
| + } |
| + |
| + Request toIsApplicableRequest(String id) { |
| + return new Request(id, "edit.isPostfixCompletionApplicable", toJson()); |
| + } |
| + |
| + @override |
| + String toString() => JSON.encode(toJson()); |
| + |
| + @override |
| + bool operator ==(other) { |
| + if (other is EditGetPostfixCompletionParams) { |
| + return file == other.file && offset == other.offset && key == other.key; |
| + } |
| + return false; |
| + } |
| + |
| + @override |
| + int get hashCode { |
| + int hash = 0; |
| + hash = JenkinsSmiHash.combine(hash, file.hashCode); |
| + hash = JenkinsSmiHash.combine(hash, offset.hashCode); |
| + hash = JenkinsSmiHash.combine(hash, key.hashCode); |
| + return JenkinsSmiHash.finish(hash); |
| + } |
| +} |
| + |
| +/** |
| * edit.getStatementCompletion params |
| * |
| * { |
| @@ -6995,6 +7131,219 @@ class EditGetStatementCompletionParams implements RequestParams { |
| } |
| } |
| +class EditIsPostfixCompletionApplicableResult implements ResponseResult { |
| + bool _value; |
| + bool get value => _value; |
| + void set value(bool value) { |
| + assert(value != null); |
| + _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, "change"); |
| + } |
| + return new EditIsPostfixCompletionApplicableResult(value); |
| + } else { |
| + throw jsonDecoder.mismatch( |
| + jsonPath, "edit.getPostfixCompletion 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"] = JSON.encode(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); |
| + } |
| +} |
| + |
| +class EditListPostfixCompletionTemplatesResult implements ResponseResult { |
| + List<List<String>> _templates; |
| + List<List<String>> get templates => _templates; |
| + |
| + void set templates(List<List<String>> templates) { |
| + assert(templates != null); |
| + _templates = templates; |
| + } |
| + |
| + EditListPostfixCompletionTemplatesResult(List<List<String>> list) { |
| + this.templates = list; |
| + } |
| + |
| +// factory EditListPostfixCompletionTemplatesResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { |
|
Brian Wilkerson
2017/06/22 14:54:40
I'm surprised that our generator is generating com
messick
2017/06/22 16:12:32
Has that test been run lately? I did not know ther
Brian Wilkerson
2017/06/22 16:22:46
I wouldn't either. I'm guessing the test was disab
|
| +// if (json == null) { |
| +// json = {}; |
| +// } |
| +// if (json is Map) { |
| +// List<List<String>> templates; |
| +// if (json.containsKey("templates")) { |
| +// templates = []; |
| +// List list = jsonDecoder.decodeList(jsonPath + ".templates", json); |
| +// list.hashCode; |
| +// } else { |
| +// throw jsonDecoder.mismatch(jsonPath, "change"); |
| +// } |
| +// return new EditListPostfixCompletionTemplatesResult(templates); |
| +// } else { |
| +// throw jsonDecoder.mismatch( |
| +// jsonPath, "edit.listPostfixCompletionTemplates result", json); |
| +// } |
| +// } |
| +// |
| +// factory EditListPostfixCompletionTemplatesResult.fromResponse(Response response) { |
| +// return new EditListPostfixCompletionTemplatesResult.fromJson( |
| +// new ResponseDecoder(null), |
| +// "result", |
| +// response.result); |
| +// } |
| + |
| + @override |
| + Map<String, dynamic> toJson() { |
| + Map<String, dynamic> result = {}; |
| + result["templates"] = JSON.encode(templates); |
| + return result; |
| + } |
| + |
| + @override |
| + Response toResponse(String id) { |
| + return new Response(id, result: toJson()); |
| + } |
| + |
| + @override |
| + String toString() => JSON.encode(toJson()); |
| +} |
| + |
| +/** |
| + * 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 code fragment. |
| + */ |
| + 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 EditGetStatementCompletionResult) { |
| + return change == other.change; |
| + } |
| + return false; |
| + } |
| + |
| + @override |
| + int get hashCode { |
| + int hash = 0; |
| + hash = JenkinsSmiHash.combine(hash, change.hashCode); |
| + return JenkinsSmiHash.finish(hash); |
| + } |
| +} |
| + |
| /** |
| * edit.getStatementCompletion result |
| * |