| 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/spec/generate_files". | 7 // "pkg/analysis_server/spec/generate_files". |
| 8 | 8 |
| 9 part of protocol2; | 9 part of protocol2; |
| 10 | 10 |
| (...skipping 3107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3118 int hash = 0; | 3118 int hash = 0; |
| 3119 hash = _JenkinsSmiHash.combine(hash, fixes.hashCode); | 3119 hash = _JenkinsSmiHash.combine(hash, fixes.hashCode); |
| 3120 return _JenkinsSmiHash.finish(hash); | 3120 return _JenkinsSmiHash.finish(hash); |
| 3121 } | 3121 } |
| 3122 } | 3122 } |
| 3123 | 3123 |
| 3124 /** | 3124 /** |
| 3125 * edit.getRefactoring params | 3125 * edit.getRefactoring params |
| 3126 * | 3126 * |
| 3127 * { | 3127 * { |
| 3128 * "kindId": RefactoringKind | 3128 * "kind": RefactoringKind |
| 3129 * "file": FilePath | 3129 * "file": FilePath |
| 3130 * "offset": int | 3130 * "offset": int |
| 3131 * "length": int | 3131 * "length": int |
| 3132 * "validateOnly": bool | 3132 * "validateOnly": bool |
| 3133 * "options": optional object | 3133 * "options": optional object |
| 3134 * } | 3134 * } |
| 3135 */ | 3135 */ |
| 3136 class EditGetRefactoringParams implements HasToJson { | 3136 class EditGetRefactoringParams implements HasToJson { |
| 3137 /** | 3137 /** |
| 3138 * The identifier of the kind of refactoring to be performed. | 3138 * The kind of refactoring to be performed. |
| 3139 */ | 3139 */ |
| 3140 RefactoringKind kindId; | 3140 RefactoringKind kind; |
| 3141 | 3141 |
| 3142 /** | 3142 /** |
| 3143 * The file containing the code involved in the refactoring. | 3143 * The file containing the code involved in the refactoring. |
| 3144 */ | 3144 */ |
| 3145 String file; | 3145 String file; |
| 3146 | 3146 |
| 3147 /** | 3147 /** |
| 3148 * The offset of the region involved in the refactoring. | 3148 * The offset of the region involved in the refactoring. |
| 3149 */ | 3149 */ |
| 3150 int offset; | 3150 int offset; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 3162 | 3162 |
| 3163 /** | 3163 /** |
| 3164 * Data used to provide values provided by the user. The structure of the | 3164 * Data used to provide values provided by the user. The structure of the |
| 3165 * data is dependent on the kind of refactoring being performed. The data | 3165 * data is dependent on the kind of refactoring being performed. The data |
| 3166 * that is expected is documented in the section titled Refactorings, labeled | 3166 * that is expected is documented in the section titled Refactorings, labeled |
| 3167 * as “Options”. This field can be omitted if the refactoring does not | 3167 * as “Options”. This field can be omitted if the refactoring does not |
| 3168 * require any options or if the values of those options are not known. | 3168 * require any options or if the values of those options are not known. |
| 3169 */ | 3169 */ |
| 3170 Object options; | 3170 Object options; |
| 3171 | 3171 |
| 3172 EditGetRefactoringParams(this.kindId, this.file, this.offset, this.length, thi
s.validateOnly, {this.options}); | 3172 EditGetRefactoringParams(this.kind, this.file, this.offset, this.length, this.
validateOnly, {this.options}); |
| 3173 | 3173 |
| 3174 factory EditGetRefactoringParams.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { | 3174 factory EditGetRefactoringParams.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { |
| 3175 if (json == null) { | 3175 if (json == null) { |
| 3176 json = {}; | 3176 json = {}; |
| 3177 } | 3177 } |
| 3178 if (json is Map) { | 3178 if (json is Map) { |
| 3179 RefactoringKind kindId; | 3179 RefactoringKind kind; |
| 3180 if (json.containsKey("kindId")) { | 3180 if (json.containsKey("kind")) { |
| 3181 kindId = new RefactoringKind.fromJson(jsonDecoder, jsonPath + ".kindId",
json["kindId"]); | 3181 kind = new RefactoringKind.fromJson(jsonDecoder, jsonPath + ".kind", jso
n["kind"]); |
| 3182 } else { | 3182 } else { |
| 3183 throw jsonDecoder.missingKey(jsonPath, "kindId"); | 3183 throw jsonDecoder.missingKey(jsonPath, "kind"); |
| 3184 } | 3184 } |
| 3185 String file; | 3185 String file; |
| 3186 if (json.containsKey("file")) { | 3186 if (json.containsKey("file")) { |
| 3187 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 3187 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 3188 } else { | 3188 } else { |
| 3189 throw jsonDecoder.missingKey(jsonPath, "file"); | 3189 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 3190 } | 3190 } |
| 3191 int offset; | 3191 int offset; |
| 3192 if (json.containsKey("offset")) { | 3192 if (json.containsKey("offset")) { |
| 3193 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 3193 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| 3194 } else { | 3194 } else { |
| 3195 throw jsonDecoder.missingKey(jsonPath, "offset"); | 3195 throw jsonDecoder.missingKey(jsonPath, "offset"); |
| 3196 } | 3196 } |
| 3197 int length; | 3197 int length; |
| 3198 if (json.containsKey("length")) { | 3198 if (json.containsKey("length")) { |
| 3199 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); | 3199 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); |
| 3200 } else { | 3200 } else { |
| 3201 throw jsonDecoder.missingKey(jsonPath, "length"); | 3201 throw jsonDecoder.missingKey(jsonPath, "length"); |
| 3202 } | 3202 } |
| 3203 bool validateOnly; | 3203 bool validateOnly; |
| 3204 if (json.containsKey("validateOnly")) { | 3204 if (json.containsKey("validateOnly")) { |
| 3205 validateOnly = jsonDecoder._decodeBool(jsonPath + ".validateOnly", json[
"validateOnly"]); | 3205 validateOnly = jsonDecoder._decodeBool(jsonPath + ".validateOnly", json[
"validateOnly"]); |
| 3206 } else { | 3206 } else { |
| 3207 throw jsonDecoder.missingKey(jsonPath, "validateOnly"); | 3207 throw jsonDecoder.missingKey(jsonPath, "validateOnly"); |
| 3208 } | 3208 } |
| 3209 Object options; | 3209 Object options; |
| 3210 if (json.containsKey("options")) { | 3210 if (json.containsKey("options")) { |
| 3211 options = json["options"]; | 3211 options = json["options"]; |
| 3212 } | 3212 } |
| 3213 return new EditGetRefactoringParams(kindId, file, offset, length, validate
Only, options: options); | 3213 return new EditGetRefactoringParams(kind, file, offset, length, validateOn
ly, options: options); |
| 3214 } else { | 3214 } else { |
| 3215 throw jsonDecoder.mismatch(jsonPath, "edit.getRefactoring params"); | 3215 throw jsonDecoder.mismatch(jsonPath, "edit.getRefactoring params"); |
| 3216 } | 3216 } |
| 3217 } | 3217 } |
| 3218 | 3218 |
| 3219 factory EditGetRefactoringParams.fromRequest(Request request) { | 3219 factory EditGetRefactoringParams.fromRequest(Request request) { |
| 3220 return new EditGetRefactoringParams.fromJson( | 3220 return new EditGetRefactoringParams.fromJson( |
| 3221 new RequestDecoder(request), "params", request.params); | 3221 new RequestDecoder(request), "params", request.params); |
| 3222 } | 3222 } |
| 3223 | 3223 |
| 3224 Map<String, dynamic> toJson() { | 3224 Map<String, dynamic> toJson() { |
| 3225 Map<String, dynamic> result = {}; | 3225 Map<String, dynamic> result = {}; |
| 3226 result["kindId"] = kindId.toJson(); | 3226 result["kind"] = kind.toJson(); |
| 3227 result["file"] = file; | 3227 result["file"] = file; |
| 3228 result["offset"] = offset; | 3228 result["offset"] = offset; |
| 3229 result["length"] = length; | 3229 result["length"] = length; |
| 3230 result["validateOnly"] = validateOnly; | 3230 result["validateOnly"] = validateOnly; |
| 3231 if (options != null) { | 3231 if (options != null) { |
| 3232 result["options"] = options; | 3232 result["options"] = options; |
| 3233 } | 3233 } |
| 3234 return result; | 3234 return result; |
| 3235 } | 3235 } |
| 3236 | 3236 |
| 3237 Request toRequest(String id) { | 3237 Request toRequest(String id) { |
| 3238 return new Request(id, "edit.getRefactoring", toJson()); | 3238 return new Request(id, "edit.getRefactoring", toJson()); |
| 3239 } | 3239 } |
| 3240 | 3240 |
| 3241 @override | 3241 @override |
| 3242 String toString() => JSON.encode(toJson()); | 3242 String toString() => JSON.encode(toJson()); |
| 3243 | 3243 |
| 3244 @override | 3244 @override |
| 3245 bool operator==(other) { | 3245 bool operator==(other) { |
| 3246 if (other is EditGetRefactoringParams) { | 3246 if (other is EditGetRefactoringParams) { |
| 3247 return kindId == other.kindId && | 3247 return kind == other.kind && |
| 3248 file == other.file && | 3248 file == other.file && |
| 3249 offset == other.offset && | 3249 offset == other.offset && |
| 3250 length == other.length && | 3250 length == other.length && |
| 3251 validateOnly == other.validateOnly && | 3251 validateOnly == other.validateOnly && |
| 3252 options == other.options; | 3252 options == other.options; |
| 3253 } | 3253 } |
| 3254 return false; | 3254 return false; |
| 3255 } | 3255 } |
| 3256 | 3256 |
| 3257 @override | 3257 @override |
| 3258 int get hashCode { | 3258 int get hashCode { |
| 3259 int hash = 0; | 3259 int hash = 0; |
| 3260 hash = _JenkinsSmiHash.combine(hash, kindId.hashCode); | 3260 hash = _JenkinsSmiHash.combine(hash, kind.hashCode); |
| 3261 hash = _JenkinsSmiHash.combine(hash, file.hashCode); | 3261 hash = _JenkinsSmiHash.combine(hash, file.hashCode); |
| 3262 hash = _JenkinsSmiHash.combine(hash, offset.hashCode); | 3262 hash = _JenkinsSmiHash.combine(hash, offset.hashCode); |
| 3263 hash = _JenkinsSmiHash.combine(hash, length.hashCode); | 3263 hash = _JenkinsSmiHash.combine(hash, length.hashCode); |
| 3264 hash = _JenkinsSmiHash.combine(hash, validateOnly.hashCode); | 3264 hash = _JenkinsSmiHash.combine(hash, validateOnly.hashCode); |
| 3265 hash = _JenkinsSmiHash.combine(hash, options.hashCode); | 3265 hash = _JenkinsSmiHash.combine(hash, options.hashCode); |
| 3266 return _JenkinsSmiHash.finish(hash); | 3266 return _JenkinsSmiHash.finish(hash); |
| 3267 } | 3267 } |
| 3268 } | 3268 } |
| 3269 | 3269 |
| 3270 /** | 3270 /** |
| (...skipping 5798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9069 return false; | 9069 return false; |
| 9070 } | 9070 } |
| 9071 | 9071 |
| 9072 @override | 9072 @override |
| 9073 int get hashCode { | 9073 int get hashCode { |
| 9074 int hash = 0; | 9074 int hash = 0; |
| 9075 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); | 9075 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); |
| 9076 return _JenkinsSmiHash.finish(hash); | 9076 return _JenkinsSmiHash.finish(hash); |
| 9077 } | 9077 } |
| 9078 } | 9078 } |
| OLD | NEW |