| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'dart:convert' hide JsonDecoder; | 9 import 'dart:convert' hide JsonDecoder; |
| 10 | 10 |
| (...skipping 6359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6370 | 6370 |
| 6371 @override | 6371 @override |
| 6372 int get hashCode { | 6372 int get hashCode { |
| 6373 int hash = 0; | 6373 int hash = 0; |
| 6374 hash = JenkinsSmiHash.combine(hash, fixes.hashCode); | 6374 hash = JenkinsSmiHash.combine(hash, fixes.hashCode); |
| 6375 return JenkinsSmiHash.finish(hash); | 6375 return JenkinsSmiHash.finish(hash); |
| 6376 } | 6376 } |
| 6377 } | 6377 } |
| 6378 | 6378 |
| 6379 /** | 6379 /** |
| 6380 * edit.getPostfixCompletion params |
| 6381 * |
| 6382 * { |
| 6383 * "file": FilePath |
| 6384 * "key": String |
| 6385 * "offset": int |
| 6386 * } |
| 6387 * |
| 6388 * Clients may not extend, implement or mix-in this class. |
| 6389 */ |
| 6390 class EditGetPostfixCompletionParams implements RequestParams { |
| 6391 String _file; |
| 6392 |
| 6393 String _key; |
| 6394 |
| 6395 int _offset; |
| 6396 |
| 6397 /** |
| 6398 * The file containing the postfix template to be expanded. |
| 6399 */ |
| 6400 String get file => _file; |
| 6401 |
| 6402 /** |
| 6403 * The file containing the postfix template to be expanded. |
| 6404 */ |
| 6405 void set file(String value) { |
| 6406 assert(value != null); |
| 6407 this._file = value; |
| 6408 } |
| 6409 |
| 6410 /** |
| 6411 * The unique name that identifies the template in use. |
| 6412 */ |
| 6413 String get key => _key; |
| 6414 |
| 6415 /** |
| 6416 * The unique name that identifies the template in use. |
| 6417 */ |
| 6418 void set key(String value) { |
| 6419 assert(value != null); |
| 6420 this._key = value; |
| 6421 } |
| 6422 |
| 6423 /** |
| 6424 * The offset used to identify the code to which the template will be |
| 6425 * applied. |
| 6426 */ |
| 6427 int get offset => _offset; |
| 6428 |
| 6429 /** |
| 6430 * The offset used to identify the code to which the template will be |
| 6431 * applied. |
| 6432 */ |
| 6433 void set offset(int value) { |
| 6434 assert(value != null); |
| 6435 this._offset = value; |
| 6436 } |
| 6437 |
| 6438 EditGetPostfixCompletionParams(String file, String key, int offset) { |
| 6439 this.file = file; |
| 6440 this.key = key; |
| 6441 this.offset = offset; |
| 6442 } |
| 6443 |
| 6444 factory EditGetPostfixCompletionParams.fromJson( |
| 6445 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 6446 if (json == null) { |
| 6447 json = {}; |
| 6448 } |
| 6449 if (json is Map) { |
| 6450 String file; |
| 6451 if (json.containsKey("file")) { |
| 6452 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); |
| 6453 } else { |
| 6454 throw jsonDecoder.mismatch(jsonPath, "file"); |
| 6455 } |
| 6456 String key; |
| 6457 if (json.containsKey("key")) { |
| 6458 key = jsonDecoder.decodeString(jsonPath + ".key", json["key"]); |
| 6459 } else { |
| 6460 throw jsonDecoder.mismatch(jsonPath, "key"); |
| 6461 } |
| 6462 int offset; |
| 6463 if (json.containsKey("offset")) { |
| 6464 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); |
| 6465 } else { |
| 6466 throw jsonDecoder.mismatch(jsonPath, "offset"); |
| 6467 } |
| 6468 return new EditGetPostfixCompletionParams(file, key, offset); |
| 6469 } else { |
| 6470 throw jsonDecoder.mismatch( |
| 6471 jsonPath, "edit.getPostfixCompletion params", json); |
| 6472 } |
| 6473 } |
| 6474 |
| 6475 factory EditGetPostfixCompletionParams.fromRequest(Request request) { |
| 6476 return new EditGetPostfixCompletionParams.fromJson( |
| 6477 new RequestDecoder(request), "params", request.params); |
| 6478 } |
| 6479 |
| 6480 @override |
| 6481 Map<String, dynamic> toJson() { |
| 6482 Map<String, dynamic> result = {}; |
| 6483 result["file"] = file; |
| 6484 result["key"] = key; |
| 6485 result["offset"] = offset; |
| 6486 return result; |
| 6487 } |
| 6488 |
| 6489 @override |
| 6490 Request toRequest(String id) { |
| 6491 return new Request(id, "edit.getPostfixCompletion", toJson()); |
| 6492 } |
| 6493 |
| 6494 @override |
| 6495 String toString() => JSON.encode(toJson()); |
| 6496 |
| 6497 @override |
| 6498 bool operator ==(other) { |
| 6499 if (other is EditGetPostfixCompletionParams) { |
| 6500 return file == other.file && key == other.key && offset == other.offset; |
| 6501 } |
| 6502 return false; |
| 6503 } |
| 6504 |
| 6505 @override |
| 6506 int get hashCode { |
| 6507 int hash = 0; |
| 6508 hash = JenkinsSmiHash.combine(hash, file.hashCode); |
| 6509 hash = JenkinsSmiHash.combine(hash, key.hashCode); |
| 6510 hash = JenkinsSmiHash.combine(hash, offset.hashCode); |
| 6511 return JenkinsSmiHash.finish(hash); |
| 6512 } |
| 6513 } |
| 6514 |
| 6515 /** |
| 6516 * edit.getPostfixCompletion result |
| 6517 * |
| 6518 * { |
| 6519 * "change": SourceChange |
| 6520 * } |
| 6521 * |
| 6522 * Clients may not extend, implement or mix-in this class. |
| 6523 */ |
| 6524 class EditGetPostfixCompletionResult implements ResponseResult { |
| 6525 SourceChange _change; |
| 6526 |
| 6527 /** |
| 6528 * The change to be applied in order to complete the statement. |
| 6529 */ |
| 6530 SourceChange get change => _change; |
| 6531 |
| 6532 /** |
| 6533 * The change to be applied in order to complete the statement. |
| 6534 */ |
| 6535 void set change(SourceChange value) { |
| 6536 assert(value != null); |
| 6537 this._change = value; |
| 6538 } |
| 6539 |
| 6540 EditGetPostfixCompletionResult(SourceChange change) { |
| 6541 this.change = change; |
| 6542 } |
| 6543 |
| 6544 factory EditGetPostfixCompletionResult.fromJson( |
| 6545 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 6546 if (json == null) { |
| 6547 json = {}; |
| 6548 } |
| 6549 if (json is Map) { |
| 6550 SourceChange change; |
| 6551 if (json.containsKey("change")) { |
| 6552 change = new SourceChange.fromJson( |
| 6553 jsonDecoder, jsonPath + ".change", json["change"]); |
| 6554 } else { |
| 6555 throw jsonDecoder.mismatch(jsonPath, "change"); |
| 6556 } |
| 6557 return new EditGetPostfixCompletionResult(change); |
| 6558 } else { |
| 6559 throw jsonDecoder.mismatch( |
| 6560 jsonPath, "edit.getPostfixCompletion result", json); |
| 6561 } |
| 6562 } |
| 6563 |
| 6564 factory EditGetPostfixCompletionResult.fromResponse(Response response) { |
| 6565 return new EditGetPostfixCompletionResult.fromJson( |
| 6566 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), |
| 6567 "result", |
| 6568 response.result); |
| 6569 } |
| 6570 |
| 6571 @override |
| 6572 Map<String, dynamic> toJson() { |
| 6573 Map<String, dynamic> result = {}; |
| 6574 result["change"] = change.toJson(); |
| 6575 return result; |
| 6576 } |
| 6577 |
| 6578 @override |
| 6579 Response toResponse(String id) { |
| 6580 return new Response(id, result: toJson()); |
| 6581 } |
| 6582 |
| 6583 @override |
| 6584 String toString() => JSON.encode(toJson()); |
| 6585 |
| 6586 @override |
| 6587 bool operator ==(other) { |
| 6588 if (other is EditGetPostfixCompletionResult) { |
| 6589 return change == other.change; |
| 6590 } |
| 6591 return false; |
| 6592 } |
| 6593 |
| 6594 @override |
| 6595 int get hashCode { |
| 6596 int hash = 0; |
| 6597 hash = JenkinsSmiHash.combine(hash, change.hashCode); |
| 6598 return JenkinsSmiHash.finish(hash); |
| 6599 } |
| 6600 } |
| 6601 |
| 6602 /** |
| 6380 * edit.getRefactoring params | 6603 * edit.getRefactoring params |
| 6381 * | 6604 * |
| 6382 * { | 6605 * { |
| 6383 * "kind": RefactoringKind | 6606 * "kind": RefactoringKind |
| 6384 * "file": FilePath | 6607 * "file": FilePath |
| 6385 * "offset": int | 6608 * "offset": int |
| 6386 * "length": int | 6609 * "length": int |
| 6387 * "validateOnly": bool | 6610 * "validateOnly": bool |
| 6388 * "options": optional RefactoringOptions | 6611 * "options": optional RefactoringOptions |
| 6389 * } | 6612 * } |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6904 /** | 7127 /** |
| 6905 * The file containing the statement to be completed. | 7128 * The file containing the statement to be completed. |
| 6906 */ | 7129 */ |
| 6907 String get file => _file; | 7130 String get file => _file; |
| 6908 | 7131 |
| 6909 /** | 7132 /** |
| 6910 * The file containing the statement to be completed. | 7133 * The file containing the statement to be completed. |
| 6911 */ | 7134 */ |
| 6912 void set file(String value) { | 7135 void set file(String value) { |
| 6913 assert(value != null); | 7136 assert(value != null); |
| 7137 this._file = value; |
| 7138 } |
| 7139 |
| 7140 /** |
| 7141 * The offset used to identify the statement to be completed. |
| 7142 */ |
| 7143 int get offset => _offset; |
| 7144 |
| 7145 /** |
| 7146 * The offset used to identify the statement to be completed. |
| 7147 */ |
| 7148 void set offset(int value) { |
| 7149 assert(value != null); |
| 7150 this._offset = value; |
| 7151 } |
| 7152 |
| 7153 EditGetStatementCompletionParams(String file, int offset) { |
| 7154 this.file = file; |
| 7155 this.offset = offset; |
| 7156 } |
| 7157 |
| 7158 factory EditGetStatementCompletionParams.fromJson( |
| 7159 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 7160 if (json == null) { |
| 7161 json = {}; |
| 7162 } |
| 7163 if (json is Map) { |
| 7164 String file; |
| 7165 if (json.containsKey("file")) { |
| 7166 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); |
| 7167 } else { |
| 7168 throw jsonDecoder.mismatch(jsonPath, "file"); |
| 7169 } |
| 7170 int offset; |
| 7171 if (json.containsKey("offset")) { |
| 7172 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); |
| 7173 } else { |
| 7174 throw jsonDecoder.mismatch(jsonPath, "offset"); |
| 7175 } |
| 7176 return new EditGetStatementCompletionParams(file, offset); |
| 7177 } else { |
| 7178 throw jsonDecoder.mismatch( |
| 7179 jsonPath, "edit.getStatementCompletion params", json); |
| 7180 } |
| 7181 } |
| 7182 |
| 7183 factory EditGetStatementCompletionParams.fromRequest(Request request) { |
| 7184 return new EditGetStatementCompletionParams.fromJson( |
| 7185 new RequestDecoder(request), "params", request.params); |
| 7186 } |
| 7187 |
| 7188 @override |
| 7189 Map<String, dynamic> toJson() { |
| 7190 Map<String, dynamic> result = {}; |
| 7191 result["file"] = file; |
| 7192 result["offset"] = offset; |
| 7193 return result; |
| 7194 } |
| 7195 |
| 7196 @override |
| 7197 Request toRequest(String id) { |
| 7198 return new Request(id, "edit.getStatementCompletion", toJson()); |
| 7199 } |
| 7200 |
| 7201 @override |
| 7202 String toString() => JSON.encode(toJson()); |
| 7203 |
| 7204 @override |
| 7205 bool operator ==(other) { |
| 7206 if (other is EditGetStatementCompletionParams) { |
| 7207 return file == other.file && offset == other.offset; |
| 7208 } |
| 7209 return false; |
| 7210 } |
| 7211 |
| 7212 @override |
| 7213 int get hashCode { |
| 7214 int hash = 0; |
| 7215 hash = JenkinsSmiHash.combine(hash, file.hashCode); |
| 7216 hash = JenkinsSmiHash.combine(hash, offset.hashCode); |
| 7217 return JenkinsSmiHash.finish(hash); |
| 7218 } |
| 7219 } |
| 7220 |
| 7221 /** |
| 7222 * edit.getStatementCompletion result |
| 7223 * |
| 7224 * { |
| 7225 * "change": SourceChange |
| 7226 * "whitespaceOnly": bool |
| 7227 * } |
| 7228 * |
| 7229 * Clients may not extend, implement or mix-in this class. |
| 7230 */ |
| 7231 class EditGetStatementCompletionResult implements ResponseResult { |
| 7232 SourceChange _change; |
| 7233 |
| 7234 bool _whitespaceOnly; |
| 7235 |
| 7236 /** |
| 7237 * The change to be applied in order to complete the statement. |
| 7238 */ |
| 7239 SourceChange get change => _change; |
| 7240 |
| 7241 /** |
| 7242 * The change to be applied in order to complete the statement. |
| 7243 */ |
| 7244 void set change(SourceChange value) { |
| 7245 assert(value != null); |
| 7246 this._change = value; |
| 7247 } |
| 7248 |
| 7249 /** |
| 7250 * Will be true if the change contains nothing but whitespace characters, or |
| 7251 * is empty. |
| 7252 */ |
| 7253 bool get whitespaceOnly => _whitespaceOnly; |
| 7254 |
| 7255 /** |
| 7256 * Will be true if the change contains nothing but whitespace characters, or |
| 7257 * is empty. |
| 7258 */ |
| 7259 void set whitespaceOnly(bool value) { |
| 7260 assert(value != null); |
| 7261 this._whitespaceOnly = value; |
| 7262 } |
| 7263 |
| 7264 EditGetStatementCompletionResult(SourceChange change, bool whitespaceOnly) { |
| 7265 this.change = change; |
| 7266 this.whitespaceOnly = whitespaceOnly; |
| 7267 } |
| 7268 |
| 7269 factory EditGetStatementCompletionResult.fromJson( |
| 7270 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 7271 if (json == null) { |
| 7272 json = {}; |
| 7273 } |
| 7274 if (json is Map) { |
| 7275 SourceChange change; |
| 7276 if (json.containsKey("change")) { |
| 7277 change = new SourceChange.fromJson( |
| 7278 jsonDecoder, jsonPath + ".change", json["change"]); |
| 7279 } else { |
| 7280 throw jsonDecoder.mismatch(jsonPath, "change"); |
| 7281 } |
| 7282 bool whitespaceOnly; |
| 7283 if (json.containsKey("whitespaceOnly")) { |
| 7284 whitespaceOnly = jsonDecoder.decodeBool( |
| 7285 jsonPath + ".whitespaceOnly", json["whitespaceOnly"]); |
| 7286 } else { |
| 7287 throw jsonDecoder.mismatch(jsonPath, "whitespaceOnly"); |
| 7288 } |
| 7289 return new EditGetStatementCompletionResult(change, whitespaceOnly); |
| 7290 } else { |
| 7291 throw jsonDecoder.mismatch( |
| 7292 jsonPath, "edit.getStatementCompletion result", json); |
| 7293 } |
| 7294 } |
| 7295 |
| 7296 factory EditGetStatementCompletionResult.fromResponse(Response response) { |
| 7297 return new EditGetStatementCompletionResult.fromJson( |
| 7298 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), |
| 7299 "result", |
| 7300 response.result); |
| 7301 } |
| 7302 |
| 7303 @override |
| 7304 Map<String, dynamic> toJson() { |
| 7305 Map<String, dynamic> result = {}; |
| 7306 result["change"] = change.toJson(); |
| 7307 result["whitespaceOnly"] = whitespaceOnly; |
| 7308 return result; |
| 7309 } |
| 7310 |
| 7311 @override |
| 7312 Response toResponse(String id) { |
| 7313 return new Response(id, result: toJson()); |
| 7314 } |
| 7315 |
| 7316 @override |
| 7317 String toString() => JSON.encode(toJson()); |
| 7318 |
| 7319 @override |
| 7320 bool operator ==(other) { |
| 7321 if (other is EditGetStatementCompletionResult) { |
| 7322 return change == other.change && whitespaceOnly == other.whitespaceOnly; |
| 7323 } |
| 7324 return false; |
| 7325 } |
| 7326 |
| 7327 @override |
| 7328 int get hashCode { |
| 7329 int hash = 0; |
| 7330 hash = JenkinsSmiHash.combine(hash, change.hashCode); |
| 7331 hash = JenkinsSmiHash.combine(hash, whitespaceOnly.hashCode); |
| 7332 return JenkinsSmiHash.finish(hash); |
| 7333 } |
| 7334 } |
| 7335 |
| 7336 /** |
| 7337 * edit.isPostfixCompletionApplicable params |
| 7338 * |
| 7339 * { |
| 7340 * "file": FilePath |
| 7341 * "key": String |
| 7342 * "offset": int |
| 7343 * } |
| 7344 * |
| 7345 * Clients may not extend, implement or mix-in this class. |
| 7346 */ |
| 7347 class EditIsPostfixCompletionApplicableParams implements RequestParams { |
| 7348 String _file; |
| 7349 |
| 7350 String _key; |
| 7351 |
| 7352 int _offset; |
| 7353 |
| 7354 /** |
| 7355 * The file containing the postfix template to be expanded. |
| 7356 */ |
| 7357 String get file => _file; |
| 7358 |
| 7359 /** |
| 7360 * The file containing the postfix template to be expanded. |
| 7361 */ |
| 7362 void set file(String value) { |
| 7363 assert(value != null); |
| 6914 this._file = value; | 7364 this._file = value; |
| 6915 } | 7365 } |
| 6916 | 7366 |
| 6917 /** | 7367 /** |
| 6918 * The offset used to identify the statement to be completed. | 7368 * The unique name that identifies the template in use. |
| 7369 */ |
| 7370 String get key => _key; |
| 7371 |
| 7372 /** |
| 7373 * The unique name that identifies the template in use. |
| 7374 */ |
| 7375 void set key(String value) { |
| 7376 assert(value != null); |
| 7377 this._key = value; |
| 7378 } |
| 7379 |
| 7380 /** |
| 7381 * The offset used to identify the code to which the template will be |
| 7382 * applied. |
| 6919 */ | 7383 */ |
| 6920 int get offset => _offset; | 7384 int get offset => _offset; |
| 6921 | 7385 |
| 6922 /** | 7386 /** |
| 6923 * The offset used to identify the statement to be completed. | 7387 * The offset used to identify the code to which the template will be |
| 7388 * applied. |
| 6924 */ | 7389 */ |
| 6925 void set offset(int value) { | 7390 void set offset(int value) { |
| 6926 assert(value != null); | 7391 assert(value != null); |
| 6927 this._offset = value; | 7392 this._offset = value; |
| 6928 } | 7393 } |
| 6929 | 7394 |
| 6930 EditGetStatementCompletionParams(String file, int offset) { | 7395 EditIsPostfixCompletionApplicableParams(String file, String key, int offset) { |
| 6931 this.file = file; | 7396 this.file = file; |
| 7397 this.key = key; |
| 6932 this.offset = offset; | 7398 this.offset = offset; |
| 6933 } | 7399 } |
| 6934 | 7400 |
| 6935 factory EditGetStatementCompletionParams.fromJson( | 7401 factory EditIsPostfixCompletionApplicableParams.fromJson( |
| 6936 JsonDecoder jsonDecoder, String jsonPath, Object json) { | 7402 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 6937 if (json == null) { | 7403 if (json == null) { |
| 6938 json = {}; | 7404 json = {}; |
| 6939 } | 7405 } |
| 6940 if (json is Map) { | 7406 if (json is Map) { |
| 6941 String file; | 7407 String file; |
| 6942 if (json.containsKey("file")) { | 7408 if (json.containsKey("file")) { |
| 6943 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); | 7409 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); |
| 6944 } else { | 7410 } else { |
| 6945 throw jsonDecoder.mismatch(jsonPath, "file"); | 7411 throw jsonDecoder.mismatch(jsonPath, "file"); |
| 6946 } | 7412 } |
| 7413 String key; |
| 7414 if (json.containsKey("key")) { |
| 7415 key = jsonDecoder.decodeString(jsonPath + ".key", json["key"]); |
| 7416 } else { |
| 7417 throw jsonDecoder.mismatch(jsonPath, "key"); |
| 7418 } |
| 6947 int offset; | 7419 int offset; |
| 6948 if (json.containsKey("offset")) { | 7420 if (json.containsKey("offset")) { |
| 6949 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); | 7421 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); |
| 6950 } else { | 7422 } else { |
| 6951 throw jsonDecoder.mismatch(jsonPath, "offset"); | 7423 throw jsonDecoder.mismatch(jsonPath, "offset"); |
| 6952 } | 7424 } |
| 6953 return new EditGetStatementCompletionParams(file, offset); | 7425 return new EditIsPostfixCompletionApplicableParams(file, key, offset); |
| 6954 } else { | 7426 } else { |
| 6955 throw jsonDecoder.mismatch( | 7427 throw jsonDecoder.mismatch( |
| 6956 jsonPath, "edit.getStatementCompletion params", json); | 7428 jsonPath, "edit.isPostfixCompletionApplicable params", json); |
| 6957 } | 7429 } |
| 6958 } | 7430 } |
| 6959 | 7431 |
| 6960 factory EditGetStatementCompletionParams.fromRequest(Request request) { | 7432 factory EditIsPostfixCompletionApplicableParams.fromRequest(Request request) { |
| 6961 return new EditGetStatementCompletionParams.fromJson( | 7433 return new EditIsPostfixCompletionApplicableParams.fromJson( |
| 6962 new RequestDecoder(request), "params", request.params); | 7434 new RequestDecoder(request), "params", request.params); |
| 6963 } | 7435 } |
| 6964 | 7436 |
| 6965 @override | 7437 @override |
| 6966 Map<String, dynamic> toJson() { | 7438 Map<String, dynamic> toJson() { |
| 6967 Map<String, dynamic> result = {}; | 7439 Map<String, dynamic> result = {}; |
| 6968 result["file"] = file; | 7440 result["file"] = file; |
| 7441 result["key"] = key; |
| 6969 result["offset"] = offset; | 7442 result["offset"] = offset; |
| 6970 return result; | 7443 return result; |
| 6971 } | 7444 } |
| 6972 | 7445 |
| 6973 @override | 7446 @override |
| 6974 Request toRequest(String id) { | 7447 Request toRequest(String id) { |
| 6975 return new Request(id, "edit.getStatementCompletion", toJson()); | 7448 return new Request(id, "edit.isPostfixCompletionApplicable", toJson()); |
| 6976 } | 7449 } |
| 6977 | 7450 |
| 6978 @override | 7451 @override |
| 6979 String toString() => JSON.encode(toJson()); | 7452 String toString() => JSON.encode(toJson()); |
| 6980 | 7453 |
| 6981 @override | 7454 @override |
| 6982 bool operator ==(other) { | 7455 bool operator ==(other) { |
| 6983 if (other is EditGetStatementCompletionParams) { | 7456 if (other is EditIsPostfixCompletionApplicableParams) { |
| 6984 return file == other.file && offset == other.offset; | 7457 return file == other.file && key == other.key && offset == other.offset; |
| 6985 } | 7458 } |
| 6986 return false; | 7459 return false; |
| 6987 } | 7460 } |
| 6988 | 7461 |
| 6989 @override | 7462 @override |
| 6990 int get hashCode { | 7463 int get hashCode { |
| 6991 int hash = 0; | 7464 int hash = 0; |
| 6992 hash = JenkinsSmiHash.combine(hash, file.hashCode); | 7465 hash = JenkinsSmiHash.combine(hash, file.hashCode); |
| 7466 hash = JenkinsSmiHash.combine(hash, key.hashCode); |
| 6993 hash = JenkinsSmiHash.combine(hash, offset.hashCode); | 7467 hash = JenkinsSmiHash.combine(hash, offset.hashCode); |
| 6994 return JenkinsSmiHash.finish(hash); | 7468 return JenkinsSmiHash.finish(hash); |
| 6995 } | 7469 } |
| 6996 } | 7470 } |
| 6997 | 7471 |
| 6998 /** | 7472 /** |
| 6999 * edit.getStatementCompletion result | 7473 * edit.isPostfixCompletionApplicable result |
| 7000 * | 7474 * |
| 7001 * { | 7475 * { |
| 7002 * "change": SourceChange | 7476 * "value": bool |
| 7003 * "whitespaceOnly": bool | |
| 7004 * } | 7477 * } |
| 7005 * | 7478 * |
| 7006 * Clients may not extend, implement or mix-in this class. | 7479 * Clients may not extend, implement or mix-in this class. |
| 7007 */ | 7480 */ |
| 7008 class EditGetStatementCompletionResult implements ResponseResult { | 7481 class EditIsPostfixCompletionApplicableResult implements ResponseResult { |
| 7009 SourceChange _change; | 7482 bool _value; |
| 7010 | |
| 7011 bool _whitespaceOnly; | |
| 7012 | 7483 |
| 7013 /** | 7484 /** |
| 7014 * The change to be applied in order to complete the statement. | 7485 * True if the template can be expanded at the given location. |
| 7015 */ | 7486 */ |
| 7016 SourceChange get change => _change; | 7487 bool get value => _value; |
| 7017 | 7488 |
| 7018 /** | 7489 /** |
| 7019 * The change to be applied in order to complete the statement. | 7490 * True if the template can be expanded at the given location. |
| 7020 */ | 7491 */ |
| 7021 void set change(SourceChange value) { | 7492 void set value(bool value) { |
| 7022 assert(value != null); | 7493 assert(value != null); |
| 7023 this._change = value; | 7494 this._value = value; |
| 7024 } | 7495 } |
| 7025 | 7496 |
| 7026 /** | 7497 EditIsPostfixCompletionApplicableResult(bool value) { |
| 7027 * Will be true if the change contains nothing but whitespace characters, or | 7498 this.value = value; |
| 7028 * is empty. | |
| 7029 */ | |
| 7030 bool get whitespaceOnly => _whitespaceOnly; | |
| 7031 | |
| 7032 /** | |
| 7033 * Will be true if the change contains nothing but whitespace characters, or | |
| 7034 * is empty. | |
| 7035 */ | |
| 7036 void set whitespaceOnly(bool value) { | |
| 7037 assert(value != null); | |
| 7038 this._whitespaceOnly = value; | |
| 7039 } | 7499 } |
| 7040 | 7500 |
| 7041 EditGetStatementCompletionResult(SourceChange change, bool whitespaceOnly) { | 7501 factory EditIsPostfixCompletionApplicableResult.fromJson( |
| 7042 this.change = change; | |
| 7043 this.whitespaceOnly = whitespaceOnly; | |
| 7044 } | |
| 7045 | |
| 7046 factory EditGetStatementCompletionResult.fromJson( | |
| 7047 JsonDecoder jsonDecoder, String jsonPath, Object json) { | 7502 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 7048 if (json == null) { | 7503 if (json == null) { |
| 7049 json = {}; | 7504 json = {}; |
| 7050 } | 7505 } |
| 7051 if (json is Map) { | 7506 if (json is Map) { |
| 7052 SourceChange change; | 7507 bool value; |
| 7053 if (json.containsKey("change")) { | 7508 if (json.containsKey("value")) { |
| 7054 change = new SourceChange.fromJson( | 7509 value = jsonDecoder.decodeBool(jsonPath + ".value", json["value"]); |
| 7055 jsonDecoder, jsonPath + ".change", json["change"]); | |
| 7056 } else { | 7510 } else { |
| 7057 throw jsonDecoder.mismatch(jsonPath, "change"); | 7511 throw jsonDecoder.mismatch(jsonPath, "value"); |
| 7058 } | 7512 } |
| 7059 bool whitespaceOnly; | 7513 return new EditIsPostfixCompletionApplicableResult(value); |
| 7060 if (json.containsKey("whitespaceOnly")) { | |
| 7061 whitespaceOnly = jsonDecoder.decodeBool( | |
| 7062 jsonPath + ".whitespaceOnly", json["whitespaceOnly"]); | |
| 7063 } else { | |
| 7064 throw jsonDecoder.mismatch(jsonPath, "whitespaceOnly"); | |
| 7065 } | |
| 7066 return new EditGetStatementCompletionResult(change, whitespaceOnly); | |
| 7067 } else { | 7514 } else { |
| 7068 throw jsonDecoder.mismatch( | 7515 throw jsonDecoder.mismatch( |
| 7069 jsonPath, "edit.getStatementCompletion result", json); | 7516 jsonPath, "edit.isPostfixCompletionApplicable result", json); |
| 7070 } | 7517 } |
| 7071 } | 7518 } |
| 7072 | 7519 |
| 7073 factory EditGetStatementCompletionResult.fromResponse(Response response) { | 7520 factory EditIsPostfixCompletionApplicableResult.fromResponse( |
| 7074 return new EditGetStatementCompletionResult.fromJson( | 7521 Response response) { |
| 7522 return new EditIsPostfixCompletionApplicableResult.fromJson( |
| 7075 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), | 7523 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), |
| 7076 "result", | 7524 "result", |
| 7077 response.result); | 7525 response.result); |
| 7526 } |
| 7527 |
| 7528 @override |
| 7529 Map<String, dynamic> toJson() { |
| 7530 Map<String, dynamic> result = {}; |
| 7531 result["value"] = value; |
| 7532 return result; |
| 7533 } |
| 7534 |
| 7535 @override |
| 7536 Response toResponse(String id) { |
| 7537 return new Response(id, result: toJson()); |
| 7538 } |
| 7539 |
| 7540 @override |
| 7541 String toString() => JSON.encode(toJson()); |
| 7542 |
| 7543 @override |
| 7544 bool operator ==(other) { |
| 7545 if (other is EditIsPostfixCompletionApplicableResult) { |
| 7546 return value == other.value; |
| 7547 } |
| 7548 return false; |
| 7549 } |
| 7550 |
| 7551 @override |
| 7552 int get hashCode { |
| 7553 int hash = 0; |
| 7554 hash = JenkinsSmiHash.combine(hash, value.hashCode); |
| 7555 return JenkinsSmiHash.finish(hash); |
| 7556 } |
| 7557 } |
| 7558 |
| 7559 /** |
| 7560 * edit.listPostfixCompletionTemplates params |
| 7561 * |
| 7562 * Clients may not extend, implement or mix-in this class. |
| 7563 */ |
| 7564 class EditListPostfixCompletionTemplatesParams implements RequestParams { |
| 7565 @override |
| 7566 Map<String, dynamic> toJson() => <String, dynamic>{}; |
| 7567 |
| 7568 @override |
| 7569 Request toRequest(String id) { |
| 7570 return new Request(id, "edit.listPostfixCompletionTemplates", null); |
| 7571 } |
| 7572 |
| 7573 @override |
| 7574 bool operator ==(other) { |
| 7575 if (other is EditListPostfixCompletionTemplatesParams) { |
| 7576 return true; |
| 7577 } |
| 7578 return false; |
| 7579 } |
| 7580 |
| 7581 @override |
| 7582 int get hashCode { |
| 7583 return 690713107; |
| 7584 } |
| 7585 } |
| 7586 |
| 7587 /** |
| 7588 * edit.listPostfixCompletionTemplates result |
| 7589 * |
| 7590 * { |
| 7591 * "templates": List<PostfixTemplateDescriptor> |
| 7592 * } |
| 7593 * |
| 7594 * Clients may not extend, implement or mix-in this class. |
| 7595 */ |
| 7596 class EditListPostfixCompletionTemplatesResult implements ResponseResult { |
| 7597 List<PostfixTemplateDescriptor> _templates; |
| 7598 |
| 7599 /** |
| 7600 * The list of available template. |
| 7601 */ |
| 7602 List<PostfixTemplateDescriptor> get templates => _templates; |
| 7603 |
| 7604 /** |
| 7605 * The list of available template. |
| 7606 */ |
| 7607 void set templates(List<PostfixTemplateDescriptor> value) { |
| 7608 assert(value != null); |
| 7609 this._templates = value; |
| 7610 } |
| 7611 |
| 7612 EditListPostfixCompletionTemplatesResult( |
| 7613 List<PostfixTemplateDescriptor> templates) { |
| 7614 this.templates = templates; |
| 7615 } |
| 7616 |
| 7617 factory EditListPostfixCompletionTemplatesResult.fromJson( |
| 7618 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 7619 if (json == null) { |
| 7620 json = {}; |
| 7621 } |
| 7622 if (json is Map) { |
| 7623 List<PostfixTemplateDescriptor> templates; |
| 7624 if (json.containsKey("templates")) { |
| 7625 templates = jsonDecoder.decodeList( |
| 7626 jsonPath + ".templates", |
| 7627 json["templates"], |
| 7628 (String jsonPath, Object json) => |
| 7629 new PostfixTemplateDescriptor.fromJson( |
| 7630 jsonDecoder, jsonPath, json)); |
| 7631 } else { |
| 7632 throw jsonDecoder.mismatch(jsonPath, "templates"); |
| 7633 } |
| 7634 return new EditListPostfixCompletionTemplatesResult(templates); |
| 7635 } else { |
| 7636 throw jsonDecoder.mismatch( |
| 7637 jsonPath, "edit.listPostfixCompletionTemplates result", json); |
| 7638 } |
| 7639 } |
| 7640 |
| 7641 factory EditListPostfixCompletionTemplatesResult.fromResponse( |
| 7642 Response response) { |
| 7643 return new EditListPostfixCompletionTemplatesResult.fromJson( |
| 7644 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), |
| 7645 "result", |
| 7646 response.result); |
| 7078 } | 7647 } |
| 7079 | 7648 |
| 7080 @override | 7649 @override |
| 7081 Map<String, dynamic> toJson() { | 7650 Map<String, dynamic> toJson() { |
| 7082 Map<String, dynamic> result = {}; | 7651 Map<String, dynamic> result = {}; |
| 7083 result["change"] = change.toJson(); | 7652 result["templates"] = templates |
| 7084 result["whitespaceOnly"] = whitespaceOnly; | 7653 .map((PostfixTemplateDescriptor value) => value.toJson()) |
| 7654 .toList(); |
| 7085 return result; | 7655 return result; |
| 7086 } | 7656 } |
| 7087 | 7657 |
| 7088 @override | 7658 @override |
| 7089 Response toResponse(String id) { | 7659 Response toResponse(String id) { |
| 7090 return new Response(id, result: toJson()); | 7660 return new Response(id, result: toJson()); |
| 7091 } | 7661 } |
| 7092 | 7662 |
| 7093 @override | 7663 @override |
| 7094 String toString() => JSON.encode(toJson()); | 7664 String toString() => JSON.encode(toJson()); |
| 7095 | 7665 |
| 7096 @override | 7666 @override |
| 7097 bool operator ==(other) { | 7667 bool operator ==(other) { |
| 7098 if (other is EditGetStatementCompletionResult) { | 7668 if (other is EditListPostfixCompletionTemplatesResult) { |
| 7099 return change == other.change && whitespaceOnly == other.whitespaceOnly; | 7669 return listEqual(templates, other.templates, |
| 7670 (PostfixTemplateDescriptor a, PostfixTemplateDescriptor b) => a == b); |
| 7100 } | 7671 } |
| 7101 return false; | 7672 return false; |
| 7102 } | 7673 } |
| 7103 | 7674 |
| 7104 @override | 7675 @override |
| 7105 int get hashCode { | 7676 int get hashCode { |
| 7106 int hash = 0; | 7677 int hash = 0; |
| 7107 hash = JenkinsSmiHash.combine(hash, change.hashCode); | 7678 hash = JenkinsSmiHash.combine(hash, templates.hashCode); |
| 7108 hash = JenkinsSmiHash.combine(hash, whitespaceOnly.hashCode); | |
| 7109 return JenkinsSmiHash.finish(hash); | 7679 return JenkinsSmiHash.finish(hash); |
| 7110 } | 7680 } |
| 7111 } | 7681 } |
| 7112 | 7682 |
| 7113 /** | 7683 /** |
| 7114 * edit.organizeDirectives params | 7684 * edit.organizeDirectives params |
| 7115 * | 7685 * |
| 7116 * { | 7686 * { |
| 7117 * "file": FilePath | 7687 * "file": FilePath |
| 7118 * } | 7688 * } |
| (...skipping 3621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10740 int hash = 0; | 11310 int hash = 0; |
| 10741 hash = JenkinsSmiHash.combine(hash, offset.hashCode); | 11311 hash = JenkinsSmiHash.combine(hash, offset.hashCode); |
| 10742 hash = JenkinsSmiHash.combine(hash, length.hashCode); | 11312 hash = JenkinsSmiHash.combine(hash, length.hashCode); |
| 10743 hash = JenkinsSmiHash.combine(hash, superclassMember.hashCode); | 11313 hash = JenkinsSmiHash.combine(hash, superclassMember.hashCode); |
| 10744 hash = JenkinsSmiHash.combine(hash, interfaceMembers.hashCode); | 11314 hash = JenkinsSmiHash.combine(hash, interfaceMembers.hashCode); |
| 10745 return JenkinsSmiHash.finish(hash); | 11315 return JenkinsSmiHash.finish(hash); |
| 10746 } | 11316 } |
| 10747 } | 11317 } |
| 10748 | 11318 |
| 10749 /** | 11319 /** |
| 11320 * PostfixTemplateDescriptor |
| 11321 * |
| 11322 * { |
| 11323 * "name": String |
| 11324 * "key": String |
| 11325 * "example": String |
| 11326 * } |
| 11327 * |
| 11328 * Clients may not extend, implement or mix-in this class. |
| 11329 */ |
| 11330 class PostfixTemplateDescriptor implements HasToJson { |
| 11331 String _name; |
| 11332 |
| 11333 String _key; |
| 11334 |
| 11335 String _example; |
| 11336 |
| 11337 /** |
| 11338 * The template name, shown in the UI. |
| 11339 */ |
| 11340 String get name => _name; |
| 11341 |
| 11342 /** |
| 11343 * The template name, shown in the UI. |
| 11344 */ |
| 11345 void set name(String value) { |
| 11346 assert(value != null); |
| 11347 this._name = value; |
| 11348 } |
| 11349 |
| 11350 /** |
| 11351 * The unique template key, not shown in the UI. |
| 11352 */ |
| 11353 String get key => _key; |
| 11354 |
| 11355 /** |
| 11356 * The unique template key, not shown in the UI. |
| 11357 */ |
| 11358 void set key(String value) { |
| 11359 assert(value != null); |
| 11360 this._key = value; |
| 11361 } |
| 11362 |
| 11363 /** |
| 11364 * A short example of the transformation performed when the template is |
| 11365 * applied. |
| 11366 */ |
| 11367 String get example => _example; |
| 11368 |
| 11369 /** |
| 11370 * A short example of the transformation performed when the template is |
| 11371 * applied. |
| 11372 */ |
| 11373 void set example(String value) { |
| 11374 assert(value != null); |
| 11375 this._example = value; |
| 11376 } |
| 11377 |
| 11378 PostfixTemplateDescriptor(String name, String key, String example) { |
| 11379 this.name = name; |
| 11380 this.key = key; |
| 11381 this.example = example; |
| 11382 } |
| 11383 |
| 11384 factory PostfixTemplateDescriptor.fromJson( |
| 11385 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 11386 if (json == null) { |
| 11387 json = {}; |
| 11388 } |
| 11389 if (json is Map) { |
| 11390 String name; |
| 11391 if (json.containsKey("name")) { |
| 11392 name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]); |
| 11393 } else { |
| 11394 throw jsonDecoder.mismatch(jsonPath, "name"); |
| 11395 } |
| 11396 String key; |
| 11397 if (json.containsKey("key")) { |
| 11398 key = jsonDecoder.decodeString(jsonPath + ".key", json["key"]); |
| 11399 } else { |
| 11400 throw jsonDecoder.mismatch(jsonPath, "key"); |
| 11401 } |
| 11402 String example; |
| 11403 if (json.containsKey("example")) { |
| 11404 example = |
| 11405 jsonDecoder.decodeString(jsonPath + ".example", json["example"]); |
| 11406 } else { |
| 11407 throw jsonDecoder.mismatch(jsonPath, "example"); |
| 11408 } |
| 11409 return new PostfixTemplateDescriptor(name, key, example); |
| 11410 } else { |
| 11411 throw jsonDecoder.mismatch(jsonPath, "PostfixTemplateDescriptor", json); |
| 11412 } |
| 11413 } |
| 11414 |
| 11415 @override |
| 11416 Map<String, dynamic> toJson() { |
| 11417 Map<String, dynamic> result = {}; |
| 11418 result["name"] = name; |
| 11419 result["key"] = key; |
| 11420 result["example"] = example; |
| 11421 return result; |
| 11422 } |
| 11423 |
| 11424 @override |
| 11425 String toString() => JSON.encode(toJson()); |
| 11426 |
| 11427 @override |
| 11428 bool operator ==(other) { |
| 11429 if (other is PostfixTemplateDescriptor) { |
| 11430 return name == other.name && key == other.key && example == other.example; |
| 11431 } |
| 11432 return false; |
| 11433 } |
| 11434 |
| 11435 @override |
| 11436 int get hashCode { |
| 11437 int hash = 0; |
| 11438 hash = JenkinsSmiHash.combine(hash, name.hashCode); |
| 11439 hash = JenkinsSmiHash.combine(hash, key.hashCode); |
| 11440 hash = JenkinsSmiHash.combine(hash, example.hashCode); |
| 11441 return JenkinsSmiHash.finish(hash); |
| 11442 } |
| 11443 } |
| 11444 |
| 11445 /** |
| 10750 * PubStatus | 11446 * PubStatus |
| 10751 * | 11447 * |
| 10752 * { | 11448 * { |
| 10753 * "isListingPackageDirs": bool | 11449 * "isListingPackageDirs": bool |
| 10754 * } | 11450 * } |
| 10755 * | 11451 * |
| 10756 * Clients may not extend, implement or mix-in this class. | 11452 * Clients may not extend, implement or mix-in this class. |
| 10757 */ | 11453 */ |
| 10758 class PubStatus implements HasToJson { | 11454 class PubStatus implements HasToJson { |
| 10759 bool _isListingPackageDirs; | 11455 bool _isListingPackageDirs; |
| (...skipping 3266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14026 hash = JenkinsSmiHash.combine(hash, classElement.hashCode); | 14722 hash = JenkinsSmiHash.combine(hash, classElement.hashCode); |
| 14027 hash = JenkinsSmiHash.combine(hash, displayName.hashCode); | 14723 hash = JenkinsSmiHash.combine(hash, displayName.hashCode); |
| 14028 hash = JenkinsSmiHash.combine(hash, memberElement.hashCode); | 14724 hash = JenkinsSmiHash.combine(hash, memberElement.hashCode); |
| 14029 hash = JenkinsSmiHash.combine(hash, superclass.hashCode); | 14725 hash = JenkinsSmiHash.combine(hash, superclass.hashCode); |
| 14030 hash = JenkinsSmiHash.combine(hash, interfaces.hashCode); | 14726 hash = JenkinsSmiHash.combine(hash, interfaces.hashCode); |
| 14031 hash = JenkinsSmiHash.combine(hash, mixins.hashCode); | 14727 hash = JenkinsSmiHash.combine(hash, mixins.hashCode); |
| 14032 hash = JenkinsSmiHash.combine(hash, subclasses.hashCode); | 14728 hash = JenkinsSmiHash.combine(hash, subclasses.hashCode); |
| 14033 return JenkinsSmiHash.finish(hash); | 14729 return JenkinsSmiHash.finish(hash); |
| 14034 } | 14730 } |
| 14035 } | 14731 } |
| OLD | NEW |