| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // | 4 // |
| 5 // This file has been automatically generated. Please do not edit it manually. | 5 // This file has been automatically generated. Please do not edit it manually. |
| 6 // To regenerate the file, use the script | 6 // To regenerate the file, use the script |
| 7 // "pkg/analysis_server/tool/spec/generate_files". | 7 // "pkg/analysis_server/tool/spec/generate_files". |
| 8 | 8 |
| 9 part of analysis_server.plugin.protocol.protocol; | 9 part of analysis_server.plugin.protocol.protocol; |
| 10 | 10 |
| (...skipping 6977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6988 hash = JenkinsSmiHash.combine(hash, optionsProblems.hashCode); | 6988 hash = JenkinsSmiHash.combine(hash, optionsProblems.hashCode); |
| 6989 hash = JenkinsSmiHash.combine(hash, finalProblems.hashCode); | 6989 hash = JenkinsSmiHash.combine(hash, finalProblems.hashCode); |
| 6990 hash = JenkinsSmiHash.combine(hash, feedback.hashCode); | 6990 hash = JenkinsSmiHash.combine(hash, feedback.hashCode); |
| 6991 hash = JenkinsSmiHash.combine(hash, change.hashCode); | 6991 hash = JenkinsSmiHash.combine(hash, change.hashCode); |
| 6992 hash = JenkinsSmiHash.combine(hash, potentialEdits.hashCode); | 6992 hash = JenkinsSmiHash.combine(hash, potentialEdits.hashCode); |
| 6993 return JenkinsSmiHash.finish(hash); | 6993 return JenkinsSmiHash.finish(hash); |
| 6994 } | 6994 } |
| 6995 } | 6995 } |
| 6996 | 6996 |
| 6997 /** | 6997 /** |
| 6998 * edit.getStatementCompletion params |
| 6999 * |
| 7000 * { |
| 7001 * "file": FilePath |
| 7002 * "offset": int |
| 7003 * } |
| 7004 * |
| 7005 * Clients may not extend, implement or mix-in this class. |
| 7006 */ |
| 7007 class EditGetStatementCompletionParams implements HasToJson { |
| 7008 String _file; |
| 7009 |
| 7010 int _offset; |
| 7011 |
| 7012 /** |
| 7013 * The file containing the statement to be completed. |
| 7014 */ |
| 7015 String get file => _file; |
| 7016 |
| 7017 /** |
| 7018 * The file containing the statement to be completed. |
| 7019 */ |
| 7020 void set file(String value) { |
| 7021 assert(value != null); |
| 7022 this._file = value; |
| 7023 } |
| 7024 |
| 7025 /** |
| 7026 * The offset used to identify the statement to be completed. |
| 7027 */ |
| 7028 int get offset => _offset; |
| 7029 |
| 7030 /** |
| 7031 * The offset used to identify the statement to be completed. |
| 7032 */ |
| 7033 void set offset(int value) { |
| 7034 assert(value != null); |
| 7035 this._offset = value; |
| 7036 } |
| 7037 |
| 7038 EditGetStatementCompletionParams(String file, int offset) { |
| 7039 this.file = file; |
| 7040 this.offset = offset; |
| 7041 } |
| 7042 |
| 7043 factory EditGetStatementCompletionParams.fromJson( |
| 7044 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 7045 if (json == null) { |
| 7046 json = {}; |
| 7047 } |
| 7048 if (json is Map) { |
| 7049 String file; |
| 7050 if (json.containsKey("file")) { |
| 7051 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); |
| 7052 } else { |
| 7053 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 7054 } |
| 7055 int offset; |
| 7056 if (json.containsKey("offset")) { |
| 7057 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); |
| 7058 } else { |
| 7059 throw jsonDecoder.missingKey(jsonPath, "offset"); |
| 7060 } |
| 7061 return new EditGetStatementCompletionParams(file, offset); |
| 7062 } else { |
| 7063 throw jsonDecoder.mismatch( |
| 7064 jsonPath, "edit.getStatementCompletion params", json); |
| 7065 } |
| 7066 } |
| 7067 |
| 7068 factory EditGetStatementCompletionParams.fromRequest(Request request) { |
| 7069 return new EditGetStatementCompletionParams.fromJson( |
| 7070 new RequestDecoder(request), "params", request._params); |
| 7071 } |
| 7072 |
| 7073 Map<String, dynamic> toJson() { |
| 7074 Map<String, dynamic> result = {}; |
| 7075 result["file"] = file; |
| 7076 result["offset"] = offset; |
| 7077 return result; |
| 7078 } |
| 7079 |
| 7080 Request toRequest(String id) { |
| 7081 return new Request(id, "edit.getStatementCompletion", toJson()); |
| 7082 } |
| 7083 |
| 7084 @override |
| 7085 String toString() => JSON.encode(toJson()); |
| 7086 |
| 7087 @override |
| 7088 bool operator ==(other) { |
| 7089 if (other is EditGetStatementCompletionParams) { |
| 7090 return file == other.file && offset == other.offset; |
| 7091 } |
| 7092 return false; |
| 7093 } |
| 7094 |
| 7095 @override |
| 7096 int get hashCode { |
| 7097 int hash = 0; |
| 7098 hash = JenkinsSmiHash.combine(hash, file.hashCode); |
| 7099 hash = JenkinsSmiHash.combine(hash, offset.hashCode); |
| 7100 return JenkinsSmiHash.finish(hash); |
| 7101 } |
| 7102 } |
| 7103 |
| 7104 /** |
| 7105 * edit.getStatementCompletion result |
| 7106 * |
| 7107 * { |
| 7108 * "change": SourceChange |
| 7109 * "whitespaceOnly": bool |
| 7110 * } |
| 7111 * |
| 7112 * Clients may not extend, implement or mix-in this class. |
| 7113 */ |
| 7114 class EditGetStatementCompletionResult implements HasToJson { |
| 7115 SourceChange _change; |
| 7116 |
| 7117 bool _whitespaceOnly; |
| 7118 |
| 7119 /** |
| 7120 * The change to be applied in order to complete the statement. |
| 7121 */ |
| 7122 SourceChange get change => _change; |
| 7123 |
| 7124 /** |
| 7125 * The change to be applied in order to complete the statement. |
| 7126 */ |
| 7127 void set change(SourceChange value) { |
| 7128 assert(value != null); |
| 7129 this._change = value; |
| 7130 } |
| 7131 |
| 7132 /** |
| 7133 * Will be true if the change contains nothing but whitespace characters, or |
| 7134 * is empty. |
| 7135 */ |
| 7136 bool get whitespaceOnly => _whitespaceOnly; |
| 7137 |
| 7138 /** |
| 7139 * Will be true if the change contains nothing but whitespace characters, or |
| 7140 * is empty. |
| 7141 */ |
| 7142 void set whitespaceOnly(bool value) { |
| 7143 assert(value != null); |
| 7144 this._whitespaceOnly = value; |
| 7145 } |
| 7146 |
| 7147 EditGetStatementCompletionResult(SourceChange change, bool whitespaceOnly) { |
| 7148 this.change = change; |
| 7149 this.whitespaceOnly = whitespaceOnly; |
| 7150 } |
| 7151 |
| 7152 factory EditGetStatementCompletionResult.fromJson( |
| 7153 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 7154 if (json == null) { |
| 7155 json = {}; |
| 7156 } |
| 7157 if (json is Map) { |
| 7158 SourceChange change; |
| 7159 if (json.containsKey("change")) { |
| 7160 change = new SourceChange.fromJson( |
| 7161 jsonDecoder, jsonPath + ".change", json["change"]); |
| 7162 } else { |
| 7163 throw jsonDecoder.missingKey(jsonPath, "change"); |
| 7164 } |
| 7165 bool whitespaceOnly; |
| 7166 if (json.containsKey("whitespaceOnly")) { |
| 7167 whitespaceOnly = jsonDecoder.decodeBool( |
| 7168 jsonPath + ".whitespaceOnly", json["whitespaceOnly"]); |
| 7169 } else { |
| 7170 throw jsonDecoder.missingKey(jsonPath, "whitespaceOnly"); |
| 7171 } |
| 7172 return new EditGetStatementCompletionResult(change, whitespaceOnly); |
| 7173 } else { |
| 7174 throw jsonDecoder.mismatch( |
| 7175 jsonPath, "edit.getStatementCompletion result", json); |
| 7176 } |
| 7177 } |
| 7178 |
| 7179 factory EditGetStatementCompletionResult.fromResponse(Response response) { |
| 7180 return new EditGetStatementCompletionResult.fromJson( |
| 7181 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), |
| 7182 "result", |
| 7183 response._result); |
| 7184 } |
| 7185 |
| 7186 Map<String, dynamic> toJson() { |
| 7187 Map<String, dynamic> result = {}; |
| 7188 result["change"] = change.toJson(); |
| 7189 result["whitespaceOnly"] = whitespaceOnly; |
| 7190 return result; |
| 7191 } |
| 7192 |
| 7193 Response toResponse(String id) { |
| 7194 return new Response(id, result: toJson()); |
| 7195 } |
| 7196 |
| 7197 @override |
| 7198 String toString() => JSON.encode(toJson()); |
| 7199 |
| 7200 @override |
| 7201 bool operator ==(other) { |
| 7202 if (other is EditGetStatementCompletionResult) { |
| 7203 return change == other.change && whitespaceOnly == other.whitespaceOnly; |
| 7204 } |
| 7205 return false; |
| 7206 } |
| 7207 |
| 7208 @override |
| 7209 int get hashCode { |
| 7210 int hash = 0; |
| 7211 hash = JenkinsSmiHash.combine(hash, change.hashCode); |
| 7212 hash = JenkinsSmiHash.combine(hash, whitespaceOnly.hashCode); |
| 7213 return JenkinsSmiHash.finish(hash); |
| 7214 } |
| 7215 } |
| 7216 |
| 7217 /** |
| 6998 * edit.sortMembers params | 7218 * edit.sortMembers params |
| 6999 * | 7219 * |
| 7000 * { | 7220 * { |
| 7001 * "file": FilePath | 7221 * "file": FilePath |
| 7002 * } | 7222 * } |
| 7003 * | 7223 * |
| 7004 * Clients may not extend, implement or mix-in this class. | 7224 * Clients may not extend, implement or mix-in this class. |
| 7005 */ | 7225 */ |
| 7006 class EditSortMembersParams implements HasToJson { | 7226 class EditSortMembersParams implements HasToJson { |
| 7007 String _file; | 7227 String _file; |
| (...skipping 11426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18434 return false; | 18654 return false; |
| 18435 } | 18655 } |
| 18436 | 18656 |
| 18437 @override | 18657 @override |
| 18438 int get hashCode { | 18658 int get hashCode { |
| 18439 int hash = 0; | 18659 int hash = 0; |
| 18440 hash = JenkinsSmiHash.combine(hash, newName.hashCode); | 18660 hash = JenkinsSmiHash.combine(hash, newName.hashCode); |
| 18441 return JenkinsSmiHash.finish(hash); | 18661 return JenkinsSmiHash.finish(hash); |
| 18442 } | 18662 } |
| 18443 } | 18663 } |
| OLD | NEW |