| 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 |
| 11 /** | 11 /** |
| 12 * server.getVersion result | 12 * server.getVersion result |
| 13 * | 13 * |
| 14 * { | 14 * { |
| 15 * "version": String | 15 * "version": String |
| 16 * } | 16 * } |
| 17 */ | 17 */ |
| 18 class ServerGetVersionResult implements HasToJson { | 18 class ServerGetVersionResult implements HasToJson { |
| 19 /** | 19 /** |
| 20 * The version number of the analysis server. | 20 * The version number of the analysis server. |
| 21 */ | 21 */ |
| 22 final String version; | 22 final String version; |
| 23 | 23 |
| 24 ServerGetVersionResult(this.version); | 24 ServerGetVersionResult(this.version); |
| 25 | 25 |
| 26 factory ServerGetVersionResult.fromJson(JsonDecoder jsonDecoder, String jsonPa
th, Object json) { | 26 factory ServerGetVersionResult.fromJson(JsonDecoder jsonDecoder, String jsonPa
th, Object json) { |
| 27 if (json == null) { |
| 28 json = {}; |
| 29 } |
| 27 if (json is Map) { | 30 if (json is Map) { |
| 28 String version; | 31 String version; |
| 29 if (json.containsKey("version")) { | 32 if (json.containsKey("version")) { |
| 30 version = jsonDecoder._decodeString(jsonPath + ".version", json["version
"]); | 33 version = jsonDecoder._decodeString(jsonPath + ".version", json["version
"]); |
| 31 } else { | 34 } else { |
| 32 throw jsonDecoder.missingKey(jsonPath, "version"); | 35 throw jsonDecoder.missingKey(jsonPath, "version"); |
| 33 } | 36 } |
| 34 return new ServerGetVersionResult(version); | 37 return new ServerGetVersionResult(version); |
| 35 } else { | 38 } else { |
| 36 throw jsonDecoder.mismatch(jsonPath, "server.getVersion result"); | 39 throw jsonDecoder.mismatch(jsonPath, "server.getVersion result"); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 */ | 79 */ |
| 77 class ServerSetSubscriptionsParams implements HasToJson { | 80 class ServerSetSubscriptionsParams implements HasToJson { |
| 78 /** | 81 /** |
| 79 * A list of the services being subscribed to. | 82 * A list of the services being subscribed to. |
| 80 */ | 83 */ |
| 81 final List<ServerService> subscriptions; | 84 final List<ServerService> subscriptions; |
| 82 | 85 |
| 83 ServerSetSubscriptionsParams(this.subscriptions); | 86 ServerSetSubscriptionsParams(this.subscriptions); |
| 84 | 87 |
| 85 factory ServerSetSubscriptionsParams.fromJson(JsonDecoder jsonDecoder, String
jsonPath, Object json) { | 88 factory ServerSetSubscriptionsParams.fromJson(JsonDecoder jsonDecoder, String
jsonPath, Object json) { |
| 89 if (json == null) { |
| 90 json = {}; |
| 91 } |
| 86 if (json is Map) { | 92 if (json is Map) { |
| 87 List<ServerService> subscriptions; | 93 List<ServerService> subscriptions; |
| 88 if (json.containsKey("subscriptions")) { | 94 if (json.containsKey("subscriptions")) { |
| 89 subscriptions = jsonDecoder._decodeList(jsonPath + ".subscriptions", jso
n["subscriptions"], (String jsonPath, Object json) => new ServerService.fromJson
(jsonDecoder, jsonPath, json)); | 95 subscriptions = jsonDecoder._decodeList(jsonPath + ".subscriptions", jso
n["subscriptions"], (String jsonPath, Object json) => new ServerService.fromJson
(jsonDecoder, jsonPath, json)); |
| 90 } else { | 96 } else { |
| 91 throw jsonDecoder.missingKey(jsonPath, "subscriptions"); | 97 throw jsonDecoder.missingKey(jsonPath, "subscriptions"); |
| 92 } | 98 } |
| 93 return new ServerSetSubscriptionsParams(subscriptions); | 99 return new ServerSetSubscriptionsParams(subscriptions); |
| 94 } else { | 100 } else { |
| 95 throw jsonDecoder.mismatch(jsonPath, "server.setSubscriptions params"); | 101 throw jsonDecoder.mismatch(jsonPath, "server.setSubscriptions params"); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 159 |
| 154 /** | 160 /** |
| 155 * The stack trace associated with the generation of the error, used for | 161 * The stack trace associated with the generation of the error, used for |
| 156 * debugging the server. | 162 * debugging the server. |
| 157 */ | 163 */ |
| 158 final String stackTrace; | 164 final String stackTrace; |
| 159 | 165 |
| 160 ServerErrorParams(this.fatal, this.message, this.stackTrace); | 166 ServerErrorParams(this.fatal, this.message, this.stackTrace); |
| 161 | 167 |
| 162 factory ServerErrorParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, O
bject json) { | 168 factory ServerErrorParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, O
bject json) { |
| 169 if (json == null) { |
| 170 json = {}; |
| 171 } |
| 163 if (json is Map) { | 172 if (json is Map) { |
| 164 bool fatal; | 173 bool fatal; |
| 165 if (json.containsKey("fatal")) { | 174 if (json.containsKey("fatal")) { |
| 166 fatal = jsonDecoder._decodeBool(jsonPath + ".fatal", json["fatal"]); | 175 fatal = jsonDecoder._decodeBool(jsonPath + ".fatal", json["fatal"]); |
| 167 } else { | 176 } else { |
| 168 throw jsonDecoder.missingKey(jsonPath, "fatal"); | 177 throw jsonDecoder.missingKey(jsonPath, "fatal"); |
| 169 } | 178 } |
| 170 String message; | 179 String message; |
| 171 if (json.containsKey("message")) { | 180 if (json.containsKey("message")) { |
| 172 message = jsonDecoder._decodeString(jsonPath + ".message", json["message
"]); | 181 message = jsonDecoder._decodeString(jsonPath + ".message", json["message
"]); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 class ServerStatusParams implements HasToJson { | 240 class ServerStatusParams implements HasToJson { |
| 232 /** | 241 /** |
| 233 * The current status of analysis, including whether analysis is being | 242 * The current status of analysis, including whether analysis is being |
| 234 * performed and if so what is being analyzed. | 243 * performed and if so what is being analyzed. |
| 235 */ | 244 */ |
| 236 final AnalysisStatus analysis; | 245 final AnalysisStatus analysis; |
| 237 | 246 |
| 238 ServerStatusParams({this.analysis}); | 247 ServerStatusParams({this.analysis}); |
| 239 | 248 |
| 240 factory ServerStatusParams.fromJson(JsonDecoder jsonDecoder, String jsonPath,
Object json) { | 249 factory ServerStatusParams.fromJson(JsonDecoder jsonDecoder, String jsonPath,
Object json) { |
| 250 if (json == null) { |
| 251 json = {}; |
| 252 } |
| 241 if (json is Map) { | 253 if (json is Map) { |
| 242 AnalysisStatus analysis; | 254 AnalysisStatus analysis; |
| 243 if (json.containsKey("analysis")) { | 255 if (json.containsKey("analysis")) { |
| 244 analysis = new AnalysisStatus.fromJson(jsonDecoder, jsonPath + ".analysi
s", json["analysis"]); | 256 analysis = new AnalysisStatus.fromJson(jsonDecoder, jsonPath + ".analysi
s", json["analysis"]); |
| 245 } | 257 } |
| 246 return new ServerStatusParams(analysis: analysis); | 258 return new ServerStatusParams(analysis: analysis); |
| 247 } else { | 259 } else { |
| 248 throw jsonDecoder.mismatch(jsonPath, "server.status params"); | 260 throw jsonDecoder.mismatch(jsonPath, "server.status params"); |
| 249 } | 261 } |
| 250 } | 262 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 */ | 302 */ |
| 291 class AnalysisGetErrorsParams implements HasToJson { | 303 class AnalysisGetErrorsParams implements HasToJson { |
| 292 /** | 304 /** |
| 293 * The file for which errors are being requested. | 305 * The file for which errors are being requested. |
| 294 */ | 306 */ |
| 295 final String file; | 307 final String file; |
| 296 | 308 |
| 297 AnalysisGetErrorsParams(this.file); | 309 AnalysisGetErrorsParams(this.file); |
| 298 | 310 |
| 299 factory AnalysisGetErrorsParams.fromJson(JsonDecoder jsonDecoder, String jsonP
ath, Object json) { | 311 factory AnalysisGetErrorsParams.fromJson(JsonDecoder jsonDecoder, String jsonP
ath, Object json) { |
| 312 if (json == null) { |
| 313 json = {}; |
| 314 } |
| 300 if (json is Map) { | 315 if (json is Map) { |
| 301 String file; | 316 String file; |
| 302 if (json.containsKey("file")) { | 317 if (json.containsKey("file")) { |
| 303 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 318 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 304 } else { | 319 } else { |
| 305 throw jsonDecoder.missingKey(jsonPath, "file"); | 320 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 306 } | 321 } |
| 307 return new AnalysisGetErrorsParams(file); | 322 return new AnalysisGetErrorsParams(file); |
| 308 } else { | 323 } else { |
| 309 throw jsonDecoder.mismatch(jsonPath, "analysis.getErrors params"); | 324 throw jsonDecoder.mismatch(jsonPath, "analysis.getErrors params"); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 */ | 368 */ |
| 354 class AnalysisGetErrorsResult implements HasToJson { | 369 class AnalysisGetErrorsResult implements HasToJson { |
| 355 /** | 370 /** |
| 356 * The errors associated with the file. | 371 * The errors associated with the file. |
| 357 */ | 372 */ |
| 358 final List<AnalysisError> errors; | 373 final List<AnalysisError> errors; |
| 359 | 374 |
| 360 AnalysisGetErrorsResult(this.errors); | 375 AnalysisGetErrorsResult(this.errors); |
| 361 | 376 |
| 362 factory AnalysisGetErrorsResult.fromJson(JsonDecoder jsonDecoder, String jsonP
ath, Object json) { | 377 factory AnalysisGetErrorsResult.fromJson(JsonDecoder jsonDecoder, String jsonP
ath, Object json) { |
| 378 if (json == null) { |
| 379 json = {}; |
| 380 } |
| 363 if (json is Map) { | 381 if (json is Map) { |
| 364 List<AnalysisError> errors; | 382 List<AnalysisError> errors; |
| 365 if (json.containsKey("errors")) { | 383 if (json.containsKey("errors")) { |
| 366 errors = jsonDecoder._decodeList(jsonPath + ".errors", json["errors"], (
String jsonPath, Object json) => new AnalysisError.fromJson(jsonDecoder, jsonPat
h, json)); | 384 errors = jsonDecoder._decodeList(jsonPath + ".errors", json["errors"], (
String jsonPath, Object json) => new AnalysisError.fromJson(jsonDecoder, jsonPat
h, json)); |
| 367 } else { | 385 } else { |
| 368 throw jsonDecoder.missingKey(jsonPath, "errors"); | 386 throw jsonDecoder.missingKey(jsonPath, "errors"); |
| 369 } | 387 } |
| 370 return new AnalysisGetErrorsResult(errors); | 388 return new AnalysisGetErrorsResult(errors); |
| 371 } else { | 389 } else { |
| 372 throw jsonDecoder.mismatch(jsonPath, "analysis.getErrors result"); | 390 throw jsonDecoder.mismatch(jsonPath, "analysis.getErrors result"); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 final String file; | 436 final String file; |
| 419 | 437 |
| 420 /** | 438 /** |
| 421 * The offset for which hover information is being requested. | 439 * The offset for which hover information is being requested. |
| 422 */ | 440 */ |
| 423 final int offset; | 441 final int offset; |
| 424 | 442 |
| 425 AnalysisGetHoverParams(this.file, this.offset); | 443 AnalysisGetHoverParams(this.file, this.offset); |
| 426 | 444 |
| 427 factory AnalysisGetHoverParams.fromJson(JsonDecoder jsonDecoder, String jsonPa
th, Object json) { | 445 factory AnalysisGetHoverParams.fromJson(JsonDecoder jsonDecoder, String jsonPa
th, Object json) { |
| 446 if (json == null) { |
| 447 json = {}; |
| 448 } |
| 428 if (json is Map) { | 449 if (json is Map) { |
| 429 String file; | 450 String file; |
| 430 if (json.containsKey("file")) { | 451 if (json.containsKey("file")) { |
| 431 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 452 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 432 } else { | 453 } else { |
| 433 throw jsonDecoder.missingKey(jsonPath, "file"); | 454 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 434 } | 455 } |
| 435 int offset; | 456 int offset; |
| 436 if (json.containsKey("offset")) { | 457 if (json.containsKey("offset")) { |
| 437 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 458 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 * if no information could be determined for the location. The list can | 515 * if no information could be determined for the location. The list can |
| 495 * contain multiple items if the file is being analyzed in multiple contexts | 516 * contain multiple items if the file is being analyzed in multiple contexts |
| 496 * in conflicting ways (such as a part that is included in multiple | 517 * in conflicting ways (such as a part that is included in multiple |
| 497 * libraries). | 518 * libraries). |
| 498 */ | 519 */ |
| 499 final List<HoverInformation> hovers; | 520 final List<HoverInformation> hovers; |
| 500 | 521 |
| 501 AnalysisGetHoverResult(this.hovers); | 522 AnalysisGetHoverResult(this.hovers); |
| 502 | 523 |
| 503 factory AnalysisGetHoverResult.fromJson(JsonDecoder jsonDecoder, String jsonPa
th, Object json) { | 524 factory AnalysisGetHoverResult.fromJson(JsonDecoder jsonDecoder, String jsonPa
th, Object json) { |
| 525 if (json == null) { |
| 526 json = {}; |
| 527 } |
| 504 if (json is Map) { | 528 if (json is Map) { |
| 505 List<HoverInformation> hovers; | 529 List<HoverInformation> hovers; |
| 506 if (json.containsKey("hovers")) { | 530 if (json.containsKey("hovers")) { |
| 507 hovers = jsonDecoder._decodeList(jsonPath + ".hovers", json["hovers"], (
String jsonPath, Object json) => new HoverInformation.fromJson(jsonDecoder, json
Path, json)); | 531 hovers = jsonDecoder._decodeList(jsonPath + ".hovers", json["hovers"], (
String jsonPath, Object json) => new HoverInformation.fromJson(jsonDecoder, json
Path, json)); |
| 508 } else { | 532 } else { |
| 509 throw jsonDecoder.missingKey(jsonPath, "hovers"); | 533 throw jsonDecoder.missingKey(jsonPath, "hovers"); |
| 510 } | 534 } |
| 511 return new AnalysisGetHoverResult(hovers); | 535 return new AnalysisGetHoverResult(hovers); |
| 512 } else { | 536 } else { |
| 513 throw jsonDecoder.mismatch(jsonPath, "analysis.getHover result"); | 537 throw jsonDecoder.mismatch(jsonPath, "analysis.getHover result"); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 | 584 |
| 561 /** | 585 /** |
| 562 * A list of the files and directories within the included directories that | 586 * A list of the files and directories within the included directories that |
| 563 * should not be analyzed. | 587 * should not be analyzed. |
| 564 */ | 588 */ |
| 565 final List<String> excluded; | 589 final List<String> excluded; |
| 566 | 590 |
| 567 AnalysisSetAnalysisRootsParams(this.included, this.excluded); | 591 AnalysisSetAnalysisRootsParams(this.included, this.excluded); |
| 568 | 592 |
| 569 factory AnalysisSetAnalysisRootsParams.fromJson(JsonDecoder jsonDecoder, Strin
g jsonPath, Object json) { | 593 factory AnalysisSetAnalysisRootsParams.fromJson(JsonDecoder jsonDecoder, Strin
g jsonPath, Object json) { |
| 594 if (json == null) { |
| 595 json = {}; |
| 596 } |
| 570 if (json is Map) { | 597 if (json is Map) { |
| 571 List<String> included; | 598 List<String> included; |
| 572 if (json.containsKey("included")) { | 599 if (json.containsKey("included")) { |
| 573 included = jsonDecoder._decodeList(jsonPath + ".included", json["include
d"], jsonDecoder._decodeString); | 600 included = jsonDecoder._decodeList(jsonPath + ".included", json["include
d"], jsonDecoder._decodeString); |
| 574 } else { | 601 } else { |
| 575 throw jsonDecoder.missingKey(jsonPath, "included"); | 602 throw jsonDecoder.missingKey(jsonPath, "included"); |
| 576 } | 603 } |
| 577 List<String> excluded; | 604 List<String> excluded; |
| 578 if (json.containsKey("excluded")) { | 605 if (json.containsKey("excluded")) { |
| 579 excluded = jsonDecoder._decodeList(jsonPath + ".excluded", json["exclude
d"], jsonDecoder._decodeString); | 606 excluded = jsonDecoder._decodeList(jsonPath + ".excluded", json["exclude
d"], jsonDecoder._decodeString); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 */ | 659 */ |
| 633 class AnalysisSetPriorityFilesParams implements HasToJson { | 660 class AnalysisSetPriorityFilesParams implements HasToJson { |
| 634 /** | 661 /** |
| 635 * The files that are to be a priority for analysis. | 662 * The files that are to be a priority for analysis. |
| 636 */ | 663 */ |
| 637 final List<String> files; | 664 final List<String> files; |
| 638 | 665 |
| 639 AnalysisSetPriorityFilesParams(this.files); | 666 AnalysisSetPriorityFilesParams(this.files); |
| 640 | 667 |
| 641 factory AnalysisSetPriorityFilesParams.fromJson(JsonDecoder jsonDecoder, Strin
g jsonPath, Object json) { | 668 factory AnalysisSetPriorityFilesParams.fromJson(JsonDecoder jsonDecoder, Strin
g jsonPath, Object json) { |
| 669 if (json == null) { |
| 670 json = {}; |
| 671 } |
| 642 if (json is Map) { | 672 if (json is Map) { |
| 643 List<String> files; | 673 List<String> files; |
| 644 if (json.containsKey("files")) { | 674 if (json.containsKey("files")) { |
| 645 files = jsonDecoder._decodeList(jsonPath + ".files", json["files"], json
Decoder._decodeString); | 675 files = jsonDecoder._decodeList(jsonPath + ".files", json["files"], json
Decoder._decodeString); |
| 646 } else { | 676 } else { |
| 647 throw jsonDecoder.missingKey(jsonPath, "files"); | 677 throw jsonDecoder.missingKey(jsonPath, "files"); |
| 648 } | 678 } |
| 649 return new AnalysisSetPriorityFilesParams(files); | 679 return new AnalysisSetPriorityFilesParams(files); |
| 650 } else { | 680 } else { |
| 651 throw jsonDecoder.mismatch(jsonPath, "analysis.setPriorityFiles params"); | 681 throw jsonDecoder.mismatch(jsonPath, "analysis.setPriorityFiles params"); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 class AnalysisSetSubscriptionsParams implements HasToJson { | 726 class AnalysisSetSubscriptionsParams implements HasToJson { |
| 697 /** | 727 /** |
| 698 * A table mapping services to a list of the files being subscribed to the | 728 * A table mapping services to a list of the files being subscribed to the |
| 699 * service. | 729 * service. |
| 700 */ | 730 */ |
| 701 final Map<AnalysisService, List<String>> subscriptions; | 731 final Map<AnalysisService, List<String>> subscriptions; |
| 702 | 732 |
| 703 AnalysisSetSubscriptionsParams(this.subscriptions); | 733 AnalysisSetSubscriptionsParams(this.subscriptions); |
| 704 | 734 |
| 705 factory AnalysisSetSubscriptionsParams.fromJson(JsonDecoder jsonDecoder, Strin
g jsonPath, Object json) { | 735 factory AnalysisSetSubscriptionsParams.fromJson(JsonDecoder jsonDecoder, Strin
g jsonPath, Object json) { |
| 736 if (json == null) { |
| 737 json = {}; |
| 738 } |
| 706 if (json is Map) { | 739 if (json is Map) { |
| 707 Map<AnalysisService, List<String>> subscriptions; | 740 Map<AnalysisService, List<String>> subscriptions; |
| 708 if (json.containsKey("subscriptions")) { | 741 if (json.containsKey("subscriptions")) { |
| 709 subscriptions = jsonDecoder._decodeMap(jsonPath + ".subscriptions", json
["subscriptions"], keyDecoder: (String jsonPath, Object json) => new AnalysisSer
vice.fromJson(jsonDecoder, jsonPath, json), valueDecoder: (String jsonPath, Obje
ct json) => jsonDecoder._decodeList(jsonPath, json, jsonDecoder._decodeString)); | 742 subscriptions = jsonDecoder._decodeMap(jsonPath + ".subscriptions", json
["subscriptions"], keyDecoder: (String jsonPath, Object json) => new AnalysisSer
vice.fromJson(jsonDecoder, jsonPath, json), valueDecoder: (String jsonPath, Obje
ct json) => jsonDecoder._decodeList(jsonPath, json, jsonDecoder._decodeString)); |
| 710 } else { | 743 } else { |
| 711 throw jsonDecoder.missingKey(jsonPath, "subscriptions"); | 744 throw jsonDecoder.missingKey(jsonPath, "subscriptions"); |
| 712 } | 745 } |
| 713 return new AnalysisSetSubscriptionsParams(subscriptions); | 746 return new AnalysisSetSubscriptionsParams(subscriptions); |
| 714 } else { | 747 } else { |
| 715 throw jsonDecoder.mismatch(jsonPath, "analysis.setSubscriptions params"); | 748 throw jsonDecoder.mismatch(jsonPath, "analysis.setSubscriptions params"); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 class AnalysisUpdateContentParams implements HasToJson { | 793 class AnalysisUpdateContentParams implements HasToJson { |
| 761 /** | 794 /** |
| 762 * A table mapping the files whose content has changed to a description of | 795 * A table mapping the files whose content has changed to a description of |
| 763 * the content change. | 796 * the content change. |
| 764 */ | 797 */ |
| 765 final Map<String, dynamic> files; | 798 final Map<String, dynamic> files; |
| 766 | 799 |
| 767 AnalysisUpdateContentParams(this.files); | 800 AnalysisUpdateContentParams(this.files); |
| 768 | 801 |
| 769 factory AnalysisUpdateContentParams.fromJson(JsonDecoder jsonDecoder, String j
sonPath, Object json) { | 802 factory AnalysisUpdateContentParams.fromJson(JsonDecoder jsonDecoder, String j
sonPath, Object json) { |
| 803 if (json == null) { |
| 804 json = {}; |
| 805 } |
| 770 if (json is Map) { | 806 if (json is Map) { |
| 771 Map<String, dynamic> files; | 807 Map<String, dynamic> files; |
| 772 if (json.containsKey("files")) { | 808 if (json.containsKey("files")) { |
| 773 files = jsonDecoder._decodeMap(jsonPath + ".files", json["files"], value
Decoder: (String jsonPath, Object json) => jsonDecoder._decodeUnion(jsonPath, js
on, "type", {"add": (String jsonPath, Object json) => new AddContentOverlay.from
Json(jsonDecoder, jsonPath, json), "change": (String jsonPath, Object json) => n
ew ChangeContentOverlay.fromJson(jsonDecoder, jsonPath, json), "remove": (String
jsonPath, Object json) => new RemoveContentOverlay.fromJson(jsonDecoder, jsonPa
th, json)})); | 809 files = jsonDecoder._decodeMap(jsonPath + ".files", json["files"], value
Decoder: (String jsonPath, Object json) => jsonDecoder._decodeUnion(jsonPath, js
on, "type", {"add": (String jsonPath, Object json) => new AddContentOverlay.from
Json(jsonDecoder, jsonPath, json), "change": (String jsonPath, Object json) => n
ew ChangeContentOverlay.fromJson(jsonDecoder, jsonPath, json), "remove": (String
jsonPath, Object json) => new RemoveContentOverlay.fromJson(jsonDecoder, jsonPa
th, json)})); |
| 774 } else { | 810 } else { |
| 775 throw jsonDecoder.missingKey(jsonPath, "files"); | 811 throw jsonDecoder.missingKey(jsonPath, "files"); |
| 776 } | 812 } |
| 777 return new AnalysisUpdateContentParams(files); | 813 return new AnalysisUpdateContentParams(files); |
| 778 } else { | 814 } else { |
| 779 throw jsonDecoder.mismatch(jsonPath, "analysis.updateContent params"); | 815 throw jsonDecoder.mismatch(jsonPath, "analysis.updateContent params"); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 */ | 859 */ |
| 824 class AnalysisUpdateOptionsParams implements HasToJson { | 860 class AnalysisUpdateOptionsParams implements HasToJson { |
| 825 /** | 861 /** |
| 826 * The options that are to be used to control analysis. | 862 * The options that are to be used to control analysis. |
| 827 */ | 863 */ |
| 828 final AnalysisOptions options; | 864 final AnalysisOptions options; |
| 829 | 865 |
| 830 AnalysisUpdateOptionsParams(this.options); | 866 AnalysisUpdateOptionsParams(this.options); |
| 831 | 867 |
| 832 factory AnalysisUpdateOptionsParams.fromJson(JsonDecoder jsonDecoder, String j
sonPath, Object json) { | 868 factory AnalysisUpdateOptionsParams.fromJson(JsonDecoder jsonDecoder, String j
sonPath, Object json) { |
| 869 if (json == null) { |
| 870 json = {}; |
| 871 } |
| 833 if (json is Map) { | 872 if (json is Map) { |
| 834 AnalysisOptions options; | 873 AnalysisOptions options; |
| 835 if (json.containsKey("options")) { | 874 if (json.containsKey("options")) { |
| 836 options = new AnalysisOptions.fromJson(jsonDecoder, jsonPath + ".options
", json["options"]); | 875 options = new AnalysisOptions.fromJson(jsonDecoder, jsonPath + ".options
", json["options"]); |
| 837 } else { | 876 } else { |
| 838 throw jsonDecoder.missingKey(jsonPath, "options"); | 877 throw jsonDecoder.missingKey(jsonPath, "options"); |
| 839 } | 878 } |
| 840 return new AnalysisUpdateOptionsParams(options); | 879 return new AnalysisUpdateOptionsParams(options); |
| 841 } else { | 880 } else { |
| 842 throw jsonDecoder.mismatch(jsonPath, "analysis.updateOptions params"); | 881 throw jsonDecoder.mismatch(jsonPath, "analysis.updateOptions params"); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 final String file; | 931 final String file; |
| 893 | 932 |
| 894 /** | 933 /** |
| 895 * The errors contained in the file. | 934 * The errors contained in the file. |
| 896 */ | 935 */ |
| 897 final List<AnalysisError> errors; | 936 final List<AnalysisError> errors; |
| 898 | 937 |
| 899 AnalysisErrorsParams(this.file, this.errors); | 938 AnalysisErrorsParams(this.file, this.errors); |
| 900 | 939 |
| 901 factory AnalysisErrorsParams.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { | 940 factory AnalysisErrorsParams.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { |
| 941 if (json == null) { |
| 942 json = {}; |
| 943 } |
| 902 if (json is Map) { | 944 if (json is Map) { |
| 903 String file; | 945 String file; |
| 904 if (json.containsKey("file")) { | 946 if (json.containsKey("file")) { |
| 905 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 947 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 906 } else { | 948 } else { |
| 907 throw jsonDecoder.missingKey(jsonPath, "file"); | 949 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 908 } | 950 } |
| 909 List<AnalysisError> errors; | 951 List<AnalysisError> errors; |
| 910 if (json.containsKey("errors")) { | 952 if (json.containsKey("errors")) { |
| 911 errors = jsonDecoder._decodeList(jsonPath + ".errors", json["errors"], (
String jsonPath, Object json) => new AnalysisError.fromJson(jsonDecoder, jsonPat
h, json)); | 953 errors = jsonDecoder._decodeList(jsonPath + ".errors", json["errors"], (
String jsonPath, Object json) => new AnalysisError.fromJson(jsonDecoder, jsonPat
h, json)); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 */ | 1002 */ |
| 961 class AnalysisFlushResultsParams implements HasToJson { | 1003 class AnalysisFlushResultsParams implements HasToJson { |
| 962 /** | 1004 /** |
| 963 * The files that are no longer being analyzed. | 1005 * The files that are no longer being analyzed. |
| 964 */ | 1006 */ |
| 965 final List<String> files; | 1007 final List<String> files; |
| 966 | 1008 |
| 967 AnalysisFlushResultsParams(this.files); | 1009 AnalysisFlushResultsParams(this.files); |
| 968 | 1010 |
| 969 factory AnalysisFlushResultsParams.fromJson(JsonDecoder jsonDecoder, String js
onPath, Object json) { | 1011 factory AnalysisFlushResultsParams.fromJson(JsonDecoder jsonDecoder, String js
onPath, Object json) { |
| 1012 if (json == null) { |
| 1013 json = {}; |
| 1014 } |
| 970 if (json is Map) { | 1015 if (json is Map) { |
| 971 List<String> files; | 1016 List<String> files; |
| 972 if (json.containsKey("files")) { | 1017 if (json.containsKey("files")) { |
| 973 files = jsonDecoder._decodeList(jsonPath + ".files", json["files"], json
Decoder._decodeString); | 1018 files = jsonDecoder._decodeList(jsonPath + ".files", json["files"], json
Decoder._decodeString); |
| 974 } else { | 1019 } else { |
| 975 throw jsonDecoder.missingKey(jsonPath, "files"); | 1020 throw jsonDecoder.missingKey(jsonPath, "files"); |
| 976 } | 1021 } |
| 977 return new AnalysisFlushResultsParams(files); | 1022 return new AnalysisFlushResultsParams(files); |
| 978 } else { | 1023 } else { |
| 979 throw jsonDecoder.mismatch(jsonPath, "analysis.flushResults params"); | 1024 throw jsonDecoder.mismatch(jsonPath, "analysis.flushResults params"); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1025 final String file; | 1070 final String file; |
| 1026 | 1071 |
| 1027 /** | 1072 /** |
| 1028 * The folding regions contained in the file. | 1073 * The folding regions contained in the file. |
| 1029 */ | 1074 */ |
| 1030 final List<FoldingRegion> regions; | 1075 final List<FoldingRegion> regions; |
| 1031 | 1076 |
| 1032 AnalysisFoldingParams(this.file, this.regions); | 1077 AnalysisFoldingParams(this.file, this.regions); |
| 1033 | 1078 |
| 1034 factory AnalysisFoldingParams.fromJson(JsonDecoder jsonDecoder, String jsonPat
h, Object json) { | 1079 factory AnalysisFoldingParams.fromJson(JsonDecoder jsonDecoder, String jsonPat
h, Object json) { |
| 1080 if (json == null) { |
| 1081 json = {}; |
| 1082 } |
| 1035 if (json is Map) { | 1083 if (json is Map) { |
| 1036 String file; | 1084 String file; |
| 1037 if (json.containsKey("file")) { | 1085 if (json.containsKey("file")) { |
| 1038 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 1086 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 1039 } else { | 1087 } else { |
| 1040 throw jsonDecoder.missingKey(jsonPath, "file"); | 1088 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 1041 } | 1089 } |
| 1042 List<FoldingRegion> regions; | 1090 List<FoldingRegion> regions; |
| 1043 if (json.containsKey("regions")) { | 1091 if (json.containsKey("regions")) { |
| 1044 regions = jsonDecoder._decodeList(jsonPath + ".regions", json["regions"]
, (String jsonPath, Object json) => new FoldingRegion.fromJson(jsonDecoder, json
Path, json)); | 1092 regions = jsonDecoder._decodeList(jsonPath + ".regions", json["regions"]
, (String jsonPath, Object json) => new FoldingRegion.fromJson(jsonDecoder, json
Path, json)); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1103 * represents a particular syntactic or semantic meaning associated with some | 1151 * represents a particular syntactic or semantic meaning associated with some |
| 1104 * range. Note that the highlight regions that are returned can overlap other | 1152 * range. Note that the highlight regions that are returned can overlap other |
| 1105 * highlight regions if there is more than one meaning associated with a | 1153 * highlight regions if there is more than one meaning associated with a |
| 1106 * particular region. | 1154 * particular region. |
| 1107 */ | 1155 */ |
| 1108 final List<HighlightRegion> regions; | 1156 final List<HighlightRegion> regions; |
| 1109 | 1157 |
| 1110 AnalysisHighlightsParams(this.file, this.regions); | 1158 AnalysisHighlightsParams(this.file, this.regions); |
| 1111 | 1159 |
| 1112 factory AnalysisHighlightsParams.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { | 1160 factory AnalysisHighlightsParams.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { |
| 1161 if (json == null) { |
| 1162 json = {}; |
| 1163 } |
| 1113 if (json is Map) { | 1164 if (json is Map) { |
| 1114 String file; | 1165 String file; |
| 1115 if (json.containsKey("file")) { | 1166 if (json.containsKey("file")) { |
| 1116 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 1167 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 1117 } else { | 1168 } else { |
| 1118 throw jsonDecoder.missingKey(jsonPath, "file"); | 1169 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 1119 } | 1170 } |
| 1120 List<HighlightRegion> regions; | 1171 List<HighlightRegion> regions; |
| 1121 if (json.containsKey("regions")) { | 1172 if (json.containsKey("regions")) { |
| 1122 regions = jsonDecoder._decodeList(jsonPath + ".regions", json["regions"]
, (String jsonPath, Object json) => new HighlightRegion.fromJson(jsonDecoder, js
onPath, json)); | 1173 regions = jsonDecoder._decodeList(jsonPath + ".regions", json["regions"]
, (String jsonPath, Object json) => new HighlightRegion.fromJson(jsonDecoder, js
onPath, json)); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1182 * usually contain a single target, but can contain more in the case of a | 1233 * usually contain a single target, but can contain more in the case of a |
| 1183 * part that is included in multiple libraries or in Dart code that is | 1234 * part that is included in multiple libraries or in Dart code that is |
| 1184 * compiled against multiple versions of a package. Note that the navigation | 1235 * compiled against multiple versions of a package. Note that the navigation |
| 1185 * regions that are returned do not overlap other navigation regions. | 1236 * regions that are returned do not overlap other navigation regions. |
| 1186 */ | 1237 */ |
| 1187 final List<NavigationRegion> regions; | 1238 final List<NavigationRegion> regions; |
| 1188 | 1239 |
| 1189 AnalysisNavigationParams(this.file, this.regions); | 1240 AnalysisNavigationParams(this.file, this.regions); |
| 1190 | 1241 |
| 1191 factory AnalysisNavigationParams.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { | 1242 factory AnalysisNavigationParams.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { |
| 1243 if (json == null) { |
| 1244 json = {}; |
| 1245 } |
| 1192 if (json is Map) { | 1246 if (json is Map) { |
| 1193 String file; | 1247 String file; |
| 1194 if (json.containsKey("file")) { | 1248 if (json.containsKey("file")) { |
| 1195 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 1249 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 1196 } else { | 1250 } else { |
| 1197 throw jsonDecoder.missingKey(jsonPath, "file"); | 1251 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 1198 } | 1252 } |
| 1199 List<NavigationRegion> regions; | 1253 List<NavigationRegion> regions; |
| 1200 if (json.containsKey("regions")) { | 1254 if (json.containsKey("regions")) { |
| 1201 regions = jsonDecoder._decodeList(jsonPath + ".regions", json["regions"]
, (String jsonPath, Object json) => new NavigationRegion.fromJson(jsonDecoder, j
sonPath, json)); | 1255 regions = jsonDecoder._decodeList(jsonPath + ".regions", json["regions"]
, (String jsonPath, Object json) => new NavigationRegion.fromJson(jsonDecoder, j
sonPath, json)); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 final String file; | 1310 final String file; |
| 1257 | 1311 |
| 1258 /** | 1312 /** |
| 1259 * The occurrences of references to elements within the file. | 1313 * The occurrences of references to elements within the file. |
| 1260 */ | 1314 */ |
| 1261 final List<Occurrences> occurrences; | 1315 final List<Occurrences> occurrences; |
| 1262 | 1316 |
| 1263 AnalysisOccurrencesParams(this.file, this.occurrences); | 1317 AnalysisOccurrencesParams(this.file, this.occurrences); |
| 1264 | 1318 |
| 1265 factory AnalysisOccurrencesParams.fromJson(JsonDecoder jsonDecoder, String jso
nPath, Object json) { | 1319 factory AnalysisOccurrencesParams.fromJson(JsonDecoder jsonDecoder, String jso
nPath, Object json) { |
| 1320 if (json == null) { |
| 1321 json = {}; |
| 1322 } |
| 1266 if (json is Map) { | 1323 if (json is Map) { |
| 1267 String file; | 1324 String file; |
| 1268 if (json.containsKey("file")) { | 1325 if (json.containsKey("file")) { |
| 1269 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 1326 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 1270 } else { | 1327 } else { |
| 1271 throw jsonDecoder.missingKey(jsonPath, "file"); | 1328 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 1272 } | 1329 } |
| 1273 List<Occurrences> occurrences; | 1330 List<Occurrences> occurrences; |
| 1274 if (json.containsKey("occurrences")) { | 1331 if (json.containsKey("occurrences")) { |
| 1275 occurrences = jsonDecoder._decodeList(jsonPath + ".occurrences", json["o
ccurrences"], (String jsonPath, Object json) => new Occurrences.fromJson(jsonDec
oder, jsonPath, json)); | 1332 occurrences = jsonDecoder._decodeList(jsonPath + ".occurrences", json["o
ccurrences"], (String jsonPath, Object json) => new Occurrences.fromJson(jsonDec
oder, jsonPath, json)); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1330 final String file; | 1387 final String file; |
| 1331 | 1388 |
| 1332 /** | 1389 /** |
| 1333 * The outline associated with the file. | 1390 * The outline associated with the file. |
| 1334 */ | 1391 */ |
| 1335 final Outline outline; | 1392 final Outline outline; |
| 1336 | 1393 |
| 1337 AnalysisOutlineParams(this.file, this.outline); | 1394 AnalysisOutlineParams(this.file, this.outline); |
| 1338 | 1395 |
| 1339 factory AnalysisOutlineParams.fromJson(JsonDecoder jsonDecoder, String jsonPat
h, Object json) { | 1396 factory AnalysisOutlineParams.fromJson(JsonDecoder jsonDecoder, String jsonPat
h, Object json) { |
| 1397 if (json == null) { |
| 1398 json = {}; |
| 1399 } |
| 1340 if (json is Map) { | 1400 if (json is Map) { |
| 1341 String file; | 1401 String file; |
| 1342 if (json.containsKey("file")) { | 1402 if (json.containsKey("file")) { |
| 1343 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 1403 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 1344 } else { | 1404 } else { |
| 1345 throw jsonDecoder.missingKey(jsonPath, "file"); | 1405 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 1346 } | 1406 } |
| 1347 Outline outline; | 1407 Outline outline; |
| 1348 if (json.containsKey("outline")) { | 1408 if (json.containsKey("outline")) { |
| 1349 outline = new Outline.fromJson(jsonDecoder, jsonPath + ".outline", json[
"outline"]); | 1409 outline = new Outline.fromJson(jsonDecoder, jsonPath + ".outline", json[
"outline"]); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1404 final String file; | 1464 final String file; |
| 1405 | 1465 |
| 1406 /** | 1466 /** |
| 1407 * The overrides associated with the file. | 1467 * The overrides associated with the file. |
| 1408 */ | 1468 */ |
| 1409 final List<Override> overrides; | 1469 final List<Override> overrides; |
| 1410 | 1470 |
| 1411 AnalysisOverridesParams(this.file, this.overrides); | 1471 AnalysisOverridesParams(this.file, this.overrides); |
| 1412 | 1472 |
| 1413 factory AnalysisOverridesParams.fromJson(JsonDecoder jsonDecoder, String jsonP
ath, Object json) { | 1473 factory AnalysisOverridesParams.fromJson(JsonDecoder jsonDecoder, String jsonP
ath, Object json) { |
| 1474 if (json == null) { |
| 1475 json = {}; |
| 1476 } |
| 1414 if (json is Map) { | 1477 if (json is Map) { |
| 1415 String file; | 1478 String file; |
| 1416 if (json.containsKey("file")) { | 1479 if (json.containsKey("file")) { |
| 1417 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 1480 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 1418 } else { | 1481 } else { |
| 1419 throw jsonDecoder.missingKey(jsonPath, "file"); | 1482 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 1420 } | 1483 } |
| 1421 List<Override> overrides; | 1484 List<Override> overrides; |
| 1422 if (json.containsKey("overrides")) { | 1485 if (json.containsKey("overrides")) { |
| 1423 overrides = jsonDecoder._decodeList(jsonPath + ".overrides", json["overr
ides"], (String jsonPath, Object json) => new Override.fromJson(jsonDecoder, jso
nPath, json)); | 1486 overrides = jsonDecoder._decodeList(jsonPath + ".overrides", json["overr
ides"], (String jsonPath, Object json) => new Override.fromJson(jsonDecoder, jso
nPath, json)); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1478 final String file; | 1541 final String file; |
| 1479 | 1542 |
| 1480 /** | 1543 /** |
| 1481 * The offset within the file at which suggestions are to be made. | 1544 * The offset within the file at which suggestions are to be made. |
| 1482 */ | 1545 */ |
| 1483 final int offset; | 1546 final int offset; |
| 1484 | 1547 |
| 1485 CompletionGetSuggestionsParams(this.file, this.offset); | 1548 CompletionGetSuggestionsParams(this.file, this.offset); |
| 1486 | 1549 |
| 1487 factory CompletionGetSuggestionsParams.fromJson(JsonDecoder jsonDecoder, Strin
g jsonPath, Object json) { | 1550 factory CompletionGetSuggestionsParams.fromJson(JsonDecoder jsonDecoder, Strin
g jsonPath, Object json) { |
| 1551 if (json == null) { |
| 1552 json = {}; |
| 1553 } |
| 1488 if (json is Map) { | 1554 if (json is Map) { |
| 1489 String file; | 1555 String file; |
| 1490 if (json.containsKey("file")) { | 1556 if (json.containsKey("file")) { |
| 1491 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 1557 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 1492 } else { | 1558 } else { |
| 1493 throw jsonDecoder.missingKey(jsonPath, "file"); | 1559 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 1494 } | 1560 } |
| 1495 int offset; | 1561 int offset; |
| 1496 if (json.containsKey("offset")) { | 1562 if (json.containsKey("offset")) { |
| 1497 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 1563 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1550 */ | 1616 */ |
| 1551 class CompletionGetSuggestionsResult implements HasToJson { | 1617 class CompletionGetSuggestionsResult implements HasToJson { |
| 1552 /** | 1618 /** |
| 1553 * The identifier used to associate results with this completion request. | 1619 * The identifier used to associate results with this completion request. |
| 1554 */ | 1620 */ |
| 1555 final String id; | 1621 final String id; |
| 1556 | 1622 |
| 1557 CompletionGetSuggestionsResult(this.id); | 1623 CompletionGetSuggestionsResult(this.id); |
| 1558 | 1624 |
| 1559 factory CompletionGetSuggestionsResult.fromJson(JsonDecoder jsonDecoder, Strin
g jsonPath, Object json) { | 1625 factory CompletionGetSuggestionsResult.fromJson(JsonDecoder jsonDecoder, Strin
g jsonPath, Object json) { |
| 1626 if (json == null) { |
| 1627 json = {}; |
| 1628 } |
| 1560 if (json is Map) { | 1629 if (json is Map) { |
| 1561 String id; | 1630 String id; |
| 1562 if (json.containsKey("id")) { | 1631 if (json.containsKey("id")) { |
| 1563 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); | 1632 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); |
| 1564 } else { | 1633 } else { |
| 1565 throw jsonDecoder.missingKey(jsonPath, "id"); | 1634 throw jsonDecoder.missingKey(jsonPath, "id"); |
| 1566 } | 1635 } |
| 1567 return new CompletionGetSuggestionsResult(id); | 1636 return new CompletionGetSuggestionsResult(id); |
| 1568 } else { | 1637 } else { |
| 1569 throw jsonDecoder.mismatch(jsonPath, "completion.getSuggestions result"); | 1638 throw jsonDecoder.mismatch(jsonPath, "completion.getSuggestions result"); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1643 | 1712 |
| 1644 /** | 1713 /** |
| 1645 * True if this is that last set of results that will be returned for the | 1714 * True if this is that last set of results that will be returned for the |
| 1646 * indicated completion. | 1715 * indicated completion. |
| 1647 */ | 1716 */ |
| 1648 final bool last; | 1717 final bool last; |
| 1649 | 1718 |
| 1650 CompletionResultsParams(this.id, this.replacementOffset, this.replacementLengt
h, this.results, this.last); | 1719 CompletionResultsParams(this.id, this.replacementOffset, this.replacementLengt
h, this.results, this.last); |
| 1651 | 1720 |
| 1652 factory CompletionResultsParams.fromJson(JsonDecoder jsonDecoder, String jsonP
ath, Object json) { | 1721 factory CompletionResultsParams.fromJson(JsonDecoder jsonDecoder, String jsonP
ath, Object json) { |
| 1722 if (json == null) { |
| 1723 json = {}; |
| 1724 } |
| 1653 if (json is Map) { | 1725 if (json is Map) { |
| 1654 String id; | 1726 String id; |
| 1655 if (json.containsKey("id")) { | 1727 if (json.containsKey("id")) { |
| 1656 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); | 1728 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); |
| 1657 } else { | 1729 } else { |
| 1658 throw jsonDecoder.missingKey(jsonPath, "id"); | 1730 throw jsonDecoder.missingKey(jsonPath, "id"); |
| 1659 } | 1731 } |
| 1660 int replacementOffset; | 1732 int replacementOffset; |
| 1661 if (json.containsKey("replacementOffset")) { | 1733 if (json.containsKey("replacementOffset")) { |
| 1662 replacementOffset = jsonDecoder._decodeInt(jsonPath + ".replacementOffse
t", json["replacementOffset"]); | 1734 replacementOffset = jsonDecoder._decodeInt(jsonPath + ".replacementOffse
t", json["replacementOffset"]); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1752 final int offset; | 1824 final int offset; |
| 1753 | 1825 |
| 1754 /** | 1826 /** |
| 1755 * True if potential matches are to be included in the results. | 1827 * True if potential matches are to be included in the results. |
| 1756 */ | 1828 */ |
| 1757 final bool includePotential; | 1829 final bool includePotential; |
| 1758 | 1830 |
| 1759 SearchFindElementReferencesParams(this.file, this.offset, this.includePotentia
l); | 1831 SearchFindElementReferencesParams(this.file, this.offset, this.includePotentia
l); |
| 1760 | 1832 |
| 1761 factory SearchFindElementReferencesParams.fromJson(JsonDecoder jsonDecoder, St
ring jsonPath, Object json) { | 1833 factory SearchFindElementReferencesParams.fromJson(JsonDecoder jsonDecoder, St
ring jsonPath, Object json) { |
| 1834 if (json == null) { |
| 1835 json = {}; |
| 1836 } |
| 1762 if (json is Map) { | 1837 if (json is Map) { |
| 1763 String file; | 1838 String file; |
| 1764 if (json.containsKey("file")) { | 1839 if (json.containsKey("file")) { |
| 1765 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 1840 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 1766 } else { | 1841 } else { |
| 1767 throw jsonDecoder.missingKey(jsonPath, "file"); | 1842 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 1768 } | 1843 } |
| 1769 int offset; | 1844 int offset; |
| 1770 if (json.containsKey("offset")) { | 1845 if (json.containsKey("offset")) { |
| 1771 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 1846 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1840 | 1915 |
| 1841 /** | 1916 /** |
| 1842 * The element referenced or defined at the given offset and whose references | 1917 * The element referenced or defined at the given offset and whose references |
| 1843 * will be returned in the search results. | 1918 * will be returned in the search results. |
| 1844 */ | 1919 */ |
| 1845 final Element element; | 1920 final Element element; |
| 1846 | 1921 |
| 1847 SearchFindElementReferencesResult(this.id, this.element); | 1922 SearchFindElementReferencesResult(this.id, this.element); |
| 1848 | 1923 |
| 1849 factory SearchFindElementReferencesResult.fromJson(JsonDecoder jsonDecoder, St
ring jsonPath, Object json) { | 1924 factory SearchFindElementReferencesResult.fromJson(JsonDecoder jsonDecoder, St
ring jsonPath, Object json) { |
| 1925 if (json == null) { |
| 1926 json = {}; |
| 1927 } |
| 1850 if (json is Map) { | 1928 if (json is Map) { |
| 1851 String id; | 1929 String id; |
| 1852 if (json.containsKey("id")) { | 1930 if (json.containsKey("id")) { |
| 1853 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); | 1931 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); |
| 1854 } else { | 1932 } else { |
| 1855 throw jsonDecoder.missingKey(jsonPath, "id"); | 1933 throw jsonDecoder.missingKey(jsonPath, "id"); |
| 1856 } | 1934 } |
| 1857 Element element; | 1935 Element element; |
| 1858 if (json.containsKey("element")) { | 1936 if (json.containsKey("element")) { |
| 1859 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[
"element"]); | 1937 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[
"element"]); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1908 */ | 1986 */ |
| 1909 class SearchFindMemberDeclarationsParams implements HasToJson { | 1987 class SearchFindMemberDeclarationsParams implements HasToJson { |
| 1910 /** | 1988 /** |
| 1911 * The name of the declarations to be found. | 1989 * The name of the declarations to be found. |
| 1912 */ | 1990 */ |
| 1913 final String name; | 1991 final String name; |
| 1914 | 1992 |
| 1915 SearchFindMemberDeclarationsParams(this.name); | 1993 SearchFindMemberDeclarationsParams(this.name); |
| 1916 | 1994 |
| 1917 factory SearchFindMemberDeclarationsParams.fromJson(JsonDecoder jsonDecoder, S
tring jsonPath, Object json) { | 1995 factory SearchFindMemberDeclarationsParams.fromJson(JsonDecoder jsonDecoder, S
tring jsonPath, Object json) { |
| 1996 if (json == null) { |
| 1997 json = {}; |
| 1998 } |
| 1918 if (json is Map) { | 1999 if (json is Map) { |
| 1919 String name; | 2000 String name; |
| 1920 if (json.containsKey("name")) { | 2001 if (json.containsKey("name")) { |
| 1921 name = jsonDecoder._decodeString(jsonPath + ".name", json["name"]); | 2002 name = jsonDecoder._decodeString(jsonPath + ".name", json["name"]); |
| 1922 } else { | 2003 } else { |
| 1923 throw jsonDecoder.missingKey(jsonPath, "name"); | 2004 throw jsonDecoder.missingKey(jsonPath, "name"); |
| 1924 } | 2005 } |
| 1925 return new SearchFindMemberDeclarationsParams(name); | 2006 return new SearchFindMemberDeclarationsParams(name); |
| 1926 } else { | 2007 } else { |
| 1927 throw jsonDecoder.mismatch(jsonPath, "search.findMemberDeclarations params
"); | 2008 throw jsonDecoder.mismatch(jsonPath, "search.findMemberDeclarations params
"); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1971 */ | 2052 */ |
| 1972 class SearchFindMemberDeclarationsResult implements HasToJson { | 2053 class SearchFindMemberDeclarationsResult implements HasToJson { |
| 1973 /** | 2054 /** |
| 1974 * The identifier used to associate results with this search request. | 2055 * The identifier used to associate results with this search request. |
| 1975 */ | 2056 */ |
| 1976 final String id; | 2057 final String id; |
| 1977 | 2058 |
| 1978 SearchFindMemberDeclarationsResult(this.id); | 2059 SearchFindMemberDeclarationsResult(this.id); |
| 1979 | 2060 |
| 1980 factory SearchFindMemberDeclarationsResult.fromJson(JsonDecoder jsonDecoder, S
tring jsonPath, Object json) { | 2061 factory SearchFindMemberDeclarationsResult.fromJson(JsonDecoder jsonDecoder, S
tring jsonPath, Object json) { |
| 2062 if (json == null) { |
| 2063 json = {}; |
| 2064 } |
| 1981 if (json is Map) { | 2065 if (json is Map) { |
| 1982 String id; | 2066 String id; |
| 1983 if (json.containsKey("id")) { | 2067 if (json.containsKey("id")) { |
| 1984 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); | 2068 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); |
| 1985 } else { | 2069 } else { |
| 1986 throw jsonDecoder.missingKey(jsonPath, "id"); | 2070 throw jsonDecoder.missingKey(jsonPath, "id"); |
| 1987 } | 2071 } |
| 1988 return new SearchFindMemberDeclarationsResult(id); | 2072 return new SearchFindMemberDeclarationsResult(id); |
| 1989 } else { | 2073 } else { |
| 1990 throw jsonDecoder.mismatch(jsonPath, "search.findMemberDeclarations result
"); | 2074 throw jsonDecoder.mismatch(jsonPath, "search.findMemberDeclarations result
"); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2030 */ | 2114 */ |
| 2031 class SearchFindMemberReferencesParams implements HasToJson { | 2115 class SearchFindMemberReferencesParams implements HasToJson { |
| 2032 /** | 2116 /** |
| 2033 * The name of the references to be found. | 2117 * The name of the references to be found. |
| 2034 */ | 2118 */ |
| 2035 final String name; | 2119 final String name; |
| 2036 | 2120 |
| 2037 SearchFindMemberReferencesParams(this.name); | 2121 SearchFindMemberReferencesParams(this.name); |
| 2038 | 2122 |
| 2039 factory SearchFindMemberReferencesParams.fromJson(JsonDecoder jsonDecoder, Str
ing jsonPath, Object json) { | 2123 factory SearchFindMemberReferencesParams.fromJson(JsonDecoder jsonDecoder, Str
ing jsonPath, Object json) { |
| 2124 if (json == null) { |
| 2125 json = {}; |
| 2126 } |
| 2040 if (json is Map) { | 2127 if (json is Map) { |
| 2041 String name; | 2128 String name; |
| 2042 if (json.containsKey("name")) { | 2129 if (json.containsKey("name")) { |
| 2043 name = jsonDecoder._decodeString(jsonPath + ".name", json["name"]); | 2130 name = jsonDecoder._decodeString(jsonPath + ".name", json["name"]); |
| 2044 } else { | 2131 } else { |
| 2045 throw jsonDecoder.missingKey(jsonPath, "name"); | 2132 throw jsonDecoder.missingKey(jsonPath, "name"); |
| 2046 } | 2133 } |
| 2047 return new SearchFindMemberReferencesParams(name); | 2134 return new SearchFindMemberReferencesParams(name); |
| 2048 } else { | 2135 } else { |
| 2049 throw jsonDecoder.mismatch(jsonPath, "search.findMemberReferences params")
; | 2136 throw jsonDecoder.mismatch(jsonPath, "search.findMemberReferences params")
; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2093 */ | 2180 */ |
| 2094 class SearchFindMemberReferencesResult implements HasToJson { | 2181 class SearchFindMemberReferencesResult implements HasToJson { |
| 2095 /** | 2182 /** |
| 2096 * The identifier used to associate results with this search request. | 2183 * The identifier used to associate results with this search request. |
| 2097 */ | 2184 */ |
| 2098 final String id; | 2185 final String id; |
| 2099 | 2186 |
| 2100 SearchFindMemberReferencesResult(this.id); | 2187 SearchFindMemberReferencesResult(this.id); |
| 2101 | 2188 |
| 2102 factory SearchFindMemberReferencesResult.fromJson(JsonDecoder jsonDecoder, Str
ing jsonPath, Object json) { | 2189 factory SearchFindMemberReferencesResult.fromJson(JsonDecoder jsonDecoder, Str
ing jsonPath, Object json) { |
| 2190 if (json == null) { |
| 2191 json = {}; |
| 2192 } |
| 2103 if (json is Map) { | 2193 if (json is Map) { |
| 2104 String id; | 2194 String id; |
| 2105 if (json.containsKey("id")) { | 2195 if (json.containsKey("id")) { |
| 2106 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); | 2196 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); |
| 2107 } else { | 2197 } else { |
| 2108 throw jsonDecoder.missingKey(jsonPath, "id"); | 2198 throw jsonDecoder.missingKey(jsonPath, "id"); |
| 2109 } | 2199 } |
| 2110 return new SearchFindMemberReferencesResult(id); | 2200 return new SearchFindMemberReferencesResult(id); |
| 2111 } else { | 2201 } else { |
| 2112 throw jsonDecoder.mismatch(jsonPath, "search.findMemberReferences result")
; | 2202 throw jsonDecoder.mismatch(jsonPath, "search.findMemberReferences result")
; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2153 class SearchFindTopLevelDeclarationsParams implements HasToJson { | 2243 class SearchFindTopLevelDeclarationsParams implements HasToJson { |
| 2154 /** | 2244 /** |
| 2155 * The regular expression used to match the names of the declarations to be | 2245 * The regular expression used to match the names of the declarations to be |
| 2156 * found. | 2246 * found. |
| 2157 */ | 2247 */ |
| 2158 final String pattern; | 2248 final String pattern; |
| 2159 | 2249 |
| 2160 SearchFindTopLevelDeclarationsParams(this.pattern); | 2250 SearchFindTopLevelDeclarationsParams(this.pattern); |
| 2161 | 2251 |
| 2162 factory SearchFindTopLevelDeclarationsParams.fromJson(JsonDecoder jsonDecoder,
String jsonPath, Object json) { | 2252 factory SearchFindTopLevelDeclarationsParams.fromJson(JsonDecoder jsonDecoder,
String jsonPath, Object json) { |
| 2253 if (json == null) { |
| 2254 json = {}; |
| 2255 } |
| 2163 if (json is Map) { | 2256 if (json is Map) { |
| 2164 String pattern; | 2257 String pattern; |
| 2165 if (json.containsKey("pattern")) { | 2258 if (json.containsKey("pattern")) { |
| 2166 pattern = jsonDecoder._decodeString(jsonPath + ".pattern", json["pattern
"]); | 2259 pattern = jsonDecoder._decodeString(jsonPath + ".pattern", json["pattern
"]); |
| 2167 } else { | 2260 } else { |
| 2168 throw jsonDecoder.missingKey(jsonPath, "pattern"); | 2261 throw jsonDecoder.missingKey(jsonPath, "pattern"); |
| 2169 } | 2262 } |
| 2170 return new SearchFindTopLevelDeclarationsParams(pattern); | 2263 return new SearchFindTopLevelDeclarationsParams(pattern); |
| 2171 } else { | 2264 } else { |
| 2172 throw jsonDecoder.mismatch(jsonPath, "search.findTopLevelDeclarations para
ms"); | 2265 throw jsonDecoder.mismatch(jsonPath, "search.findTopLevelDeclarations para
ms"); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2216 */ | 2309 */ |
| 2217 class SearchFindTopLevelDeclarationsResult implements HasToJson { | 2310 class SearchFindTopLevelDeclarationsResult implements HasToJson { |
| 2218 /** | 2311 /** |
| 2219 * The identifier used to associate results with this search request. | 2312 * The identifier used to associate results with this search request. |
| 2220 */ | 2313 */ |
| 2221 final String id; | 2314 final String id; |
| 2222 | 2315 |
| 2223 SearchFindTopLevelDeclarationsResult(this.id); | 2316 SearchFindTopLevelDeclarationsResult(this.id); |
| 2224 | 2317 |
| 2225 factory SearchFindTopLevelDeclarationsResult.fromJson(JsonDecoder jsonDecoder,
String jsonPath, Object json) { | 2318 factory SearchFindTopLevelDeclarationsResult.fromJson(JsonDecoder jsonDecoder,
String jsonPath, Object json) { |
| 2319 if (json == null) { |
| 2320 json = {}; |
| 2321 } |
| 2226 if (json is Map) { | 2322 if (json is Map) { |
| 2227 String id; | 2323 String id; |
| 2228 if (json.containsKey("id")) { | 2324 if (json.containsKey("id")) { |
| 2229 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); | 2325 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); |
| 2230 } else { | 2326 } else { |
| 2231 throw jsonDecoder.missingKey(jsonPath, "id"); | 2327 throw jsonDecoder.missingKey(jsonPath, "id"); |
| 2232 } | 2328 } |
| 2233 return new SearchFindTopLevelDeclarationsResult(id); | 2329 return new SearchFindTopLevelDeclarationsResult(id); |
| 2234 } else { | 2330 } else { |
| 2235 throw jsonDecoder.mismatch(jsonPath, "search.findTopLevelDeclarations resu
lt"); | 2331 throw jsonDecoder.mismatch(jsonPath, "search.findTopLevelDeclarations resu
lt"); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2282 final String file; | 2378 final String file; |
| 2283 | 2379 |
| 2284 /** | 2380 /** |
| 2285 * The offset of the name of the type within the file. | 2381 * The offset of the name of the type within the file. |
| 2286 */ | 2382 */ |
| 2287 final int offset; | 2383 final int offset; |
| 2288 | 2384 |
| 2289 SearchGetTypeHierarchyParams(this.file, this.offset); | 2385 SearchGetTypeHierarchyParams(this.file, this.offset); |
| 2290 | 2386 |
| 2291 factory SearchGetTypeHierarchyParams.fromJson(JsonDecoder jsonDecoder, String
jsonPath, Object json) { | 2387 factory SearchGetTypeHierarchyParams.fromJson(JsonDecoder jsonDecoder, String
jsonPath, Object json) { |
| 2388 if (json == null) { |
| 2389 json = {}; |
| 2390 } |
| 2292 if (json is Map) { | 2391 if (json is Map) { |
| 2293 String file; | 2392 String file; |
| 2294 if (json.containsKey("file")) { | 2393 if (json.containsKey("file")) { |
| 2295 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 2394 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 2296 } else { | 2395 } else { |
| 2297 throw jsonDecoder.missingKey(jsonPath, "file"); | 2396 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 2298 } | 2397 } |
| 2299 int offset; | 2398 int offset; |
| 2300 if (json.containsKey("offset")) { | 2399 if (json.containsKey("offset")) { |
| 2301 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 2400 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2362 * | 2461 * |
| 2363 * This field will be absent if the code at the given file and offset does | 2462 * This field will be absent if the code at the given file and offset does |
| 2364 * not represent a type, or if the file has not been sufficiently analyzed to | 2463 * not represent a type, or if the file has not been sufficiently analyzed to |
| 2365 * allow a type hierarchy to be produced. | 2464 * allow a type hierarchy to be produced. |
| 2366 */ | 2465 */ |
| 2367 final List<TypeHierarchyItem> hierarchyItems; | 2466 final List<TypeHierarchyItem> hierarchyItems; |
| 2368 | 2467 |
| 2369 SearchGetTypeHierarchyResult({this.hierarchyItems}); | 2468 SearchGetTypeHierarchyResult({this.hierarchyItems}); |
| 2370 | 2469 |
| 2371 factory SearchGetTypeHierarchyResult.fromJson(JsonDecoder jsonDecoder, String
jsonPath, Object json) { | 2470 factory SearchGetTypeHierarchyResult.fromJson(JsonDecoder jsonDecoder, String
jsonPath, Object json) { |
| 2471 if (json == null) { |
| 2472 json = {}; |
| 2473 } |
| 2372 if (json is Map) { | 2474 if (json is Map) { |
| 2373 List<TypeHierarchyItem> hierarchyItems; | 2475 List<TypeHierarchyItem> hierarchyItems; |
| 2374 if (json.containsKey("hierarchyItems")) { | 2476 if (json.containsKey("hierarchyItems")) { |
| 2375 hierarchyItems = jsonDecoder._decodeList(jsonPath + ".hierarchyItems", j
son["hierarchyItems"], (String jsonPath, Object json) => new TypeHierarchyItem.f
romJson(jsonDecoder, jsonPath, json)); | 2477 hierarchyItems = jsonDecoder._decodeList(jsonPath + ".hierarchyItems", j
son["hierarchyItems"], (String jsonPath, Object json) => new TypeHierarchyItem.f
romJson(jsonDecoder, jsonPath, json)); |
| 2376 } | 2478 } |
| 2377 return new SearchGetTypeHierarchyResult(hierarchyItems: hierarchyItems); | 2479 return new SearchGetTypeHierarchyResult(hierarchyItems: hierarchyItems); |
| 2378 } else { | 2480 } else { |
| 2379 throw jsonDecoder.mismatch(jsonPath, "search.getTypeHierarchy result"); | 2481 throw jsonDecoder.mismatch(jsonPath, "search.getTypeHierarchy result"); |
| 2380 } | 2482 } |
| 2381 } | 2483 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2434 | 2536 |
| 2435 /** | 2537 /** |
| 2436 * True if this is that last set of results that will be returned for the | 2538 * True if this is that last set of results that will be returned for the |
| 2437 * indicated search. | 2539 * indicated search. |
| 2438 */ | 2540 */ |
| 2439 final bool last; | 2541 final bool last; |
| 2440 | 2542 |
| 2441 SearchResultsParams(this.id, this.results, this.last); | 2543 SearchResultsParams(this.id, this.results, this.last); |
| 2442 | 2544 |
| 2443 factory SearchResultsParams.fromJson(JsonDecoder jsonDecoder, String jsonPath,
Object json) { | 2545 factory SearchResultsParams.fromJson(JsonDecoder jsonDecoder, String jsonPath,
Object json) { |
| 2546 if (json == null) { |
| 2547 json = {}; |
| 2548 } |
| 2444 if (json is Map) { | 2549 if (json is Map) { |
| 2445 String id; | 2550 String id; |
| 2446 if (json.containsKey("id")) { | 2551 if (json.containsKey("id")) { |
| 2447 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); | 2552 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); |
| 2448 } else { | 2553 } else { |
| 2449 throw jsonDecoder.missingKey(jsonPath, "id"); | 2554 throw jsonDecoder.missingKey(jsonPath, "id"); |
| 2450 } | 2555 } |
| 2451 List<SearchResult> results; | 2556 List<SearchResult> results; |
| 2452 if (json.containsKey("results")) { | 2557 if (json.containsKey("results")) { |
| 2453 results = jsonDecoder._decodeList(jsonPath + ".results", json["results"]
, (String jsonPath, Object json) => new SearchResult.fromJson(jsonDecoder, jsonP
ath, json)); | 2558 results = jsonDecoder._decodeList(jsonPath + ".results", json["results"]
, (String jsonPath, Object json) => new SearchResult.fromJson(jsonDecoder, jsonP
ath, json)); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2523 final int offset; | 2628 final int offset; |
| 2524 | 2629 |
| 2525 /** | 2630 /** |
| 2526 * The length of the code for which assists are being requested. | 2631 * The length of the code for which assists are being requested. |
| 2527 */ | 2632 */ |
| 2528 final int length; | 2633 final int length; |
| 2529 | 2634 |
| 2530 EditGetAssistsParams(this.file, this.offset, this.length); | 2635 EditGetAssistsParams(this.file, this.offset, this.length); |
| 2531 | 2636 |
| 2532 factory EditGetAssistsParams.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { | 2637 factory EditGetAssistsParams.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { |
| 2638 if (json == null) { |
| 2639 json = {}; |
| 2640 } |
| 2533 if (json is Map) { | 2641 if (json is Map) { |
| 2534 String file; | 2642 String file; |
| 2535 if (json.containsKey("file")) { | 2643 if (json.containsKey("file")) { |
| 2536 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 2644 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 2537 } else { | 2645 } else { |
| 2538 throw jsonDecoder.missingKey(jsonPath, "file"); | 2646 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 2539 } | 2647 } |
| 2540 int offset; | 2648 int offset; |
| 2541 if (json.containsKey("offset")) { | 2649 if (json.containsKey("offset")) { |
| 2542 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 2650 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2604 */ | 2712 */ |
| 2605 class EditGetAssistsResult implements HasToJson { | 2713 class EditGetAssistsResult implements HasToJson { |
| 2606 /** | 2714 /** |
| 2607 * The assists that are available at the given location. | 2715 * The assists that are available at the given location. |
| 2608 */ | 2716 */ |
| 2609 final List<SourceChange> assists; | 2717 final List<SourceChange> assists; |
| 2610 | 2718 |
| 2611 EditGetAssistsResult(this.assists); | 2719 EditGetAssistsResult(this.assists); |
| 2612 | 2720 |
| 2613 factory EditGetAssistsResult.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { | 2721 factory EditGetAssistsResult.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { |
| 2722 if (json == null) { |
| 2723 json = {}; |
| 2724 } |
| 2614 if (json is Map) { | 2725 if (json is Map) { |
| 2615 List<SourceChange> assists; | 2726 List<SourceChange> assists; |
| 2616 if (json.containsKey("assists")) { | 2727 if (json.containsKey("assists")) { |
| 2617 assists = jsonDecoder._decodeList(jsonPath + ".assists", json["assists"]
, (String jsonPath, Object json) => new SourceChange.fromJson(jsonDecoder, jsonP
ath, json)); | 2728 assists = jsonDecoder._decodeList(jsonPath + ".assists", json["assists"]
, (String jsonPath, Object json) => new SourceChange.fromJson(jsonDecoder, jsonP
ath, json)); |
| 2618 } else { | 2729 } else { |
| 2619 throw jsonDecoder.missingKey(jsonPath, "assists"); | 2730 throw jsonDecoder.missingKey(jsonPath, "assists"); |
| 2620 } | 2731 } |
| 2621 return new EditGetAssistsResult(assists); | 2732 return new EditGetAssistsResult(assists); |
| 2622 } else { | 2733 } else { |
| 2623 throw jsonDecoder.mismatch(jsonPath, "edit.getAssists result"); | 2734 throw jsonDecoder.mismatch(jsonPath, "edit.getAssists result"); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2675 final int offset; | 2786 final int offset; |
| 2676 | 2787 |
| 2677 /** | 2788 /** |
| 2678 * The length of the code on which the refactoring would be based. | 2789 * The length of the code on which the refactoring would be based. |
| 2679 */ | 2790 */ |
| 2680 final int length; | 2791 final int length; |
| 2681 | 2792 |
| 2682 EditGetAvailableRefactoringsParams(this.file, this.offset, this.length); | 2793 EditGetAvailableRefactoringsParams(this.file, this.offset, this.length); |
| 2683 | 2794 |
| 2684 factory EditGetAvailableRefactoringsParams.fromJson(JsonDecoder jsonDecoder, S
tring jsonPath, Object json) { | 2795 factory EditGetAvailableRefactoringsParams.fromJson(JsonDecoder jsonDecoder, S
tring jsonPath, Object json) { |
| 2796 if (json == null) { |
| 2797 json = {}; |
| 2798 } |
| 2685 if (json is Map) { | 2799 if (json is Map) { |
| 2686 String file; | 2800 String file; |
| 2687 if (json.containsKey("file")) { | 2801 if (json.containsKey("file")) { |
| 2688 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 2802 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 2689 } else { | 2803 } else { |
| 2690 throw jsonDecoder.missingKey(jsonPath, "file"); | 2804 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 2691 } | 2805 } |
| 2692 int offset; | 2806 int offset; |
| 2693 if (json.containsKey("offset")) { | 2807 if (json.containsKey("offset")) { |
| 2694 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 2808 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2756 */ | 2870 */ |
| 2757 class EditGetAvailableRefactoringsResult implements HasToJson { | 2871 class EditGetAvailableRefactoringsResult implements HasToJson { |
| 2758 /** | 2872 /** |
| 2759 * The kinds of refactorings that are valid for the given selection. | 2873 * The kinds of refactorings that are valid for the given selection. |
| 2760 */ | 2874 */ |
| 2761 final List<RefactoringKind> kinds; | 2875 final List<RefactoringKind> kinds; |
| 2762 | 2876 |
| 2763 EditGetAvailableRefactoringsResult(this.kinds); | 2877 EditGetAvailableRefactoringsResult(this.kinds); |
| 2764 | 2878 |
| 2765 factory EditGetAvailableRefactoringsResult.fromJson(JsonDecoder jsonDecoder, S
tring jsonPath, Object json) { | 2879 factory EditGetAvailableRefactoringsResult.fromJson(JsonDecoder jsonDecoder, S
tring jsonPath, Object json) { |
| 2880 if (json == null) { |
| 2881 json = {}; |
| 2882 } |
| 2766 if (json is Map) { | 2883 if (json is Map) { |
| 2767 List<RefactoringKind> kinds; | 2884 List<RefactoringKind> kinds; |
| 2768 if (json.containsKey("kinds")) { | 2885 if (json.containsKey("kinds")) { |
| 2769 kinds = jsonDecoder._decodeList(jsonPath + ".kinds", json["kinds"], (Str
ing jsonPath, Object json) => new RefactoringKind.fromJson(jsonDecoder, jsonPath
, json)); | 2886 kinds = jsonDecoder._decodeList(jsonPath + ".kinds", json["kinds"], (Str
ing jsonPath, Object json) => new RefactoringKind.fromJson(jsonDecoder, jsonPath
, json)); |
| 2770 } else { | 2887 } else { |
| 2771 throw jsonDecoder.missingKey(jsonPath, "kinds"); | 2888 throw jsonDecoder.missingKey(jsonPath, "kinds"); |
| 2772 } | 2889 } |
| 2773 return new EditGetAvailableRefactoringsResult(kinds); | 2890 return new EditGetAvailableRefactoringsResult(kinds); |
| 2774 } else { | 2891 } else { |
| 2775 throw jsonDecoder.mismatch(jsonPath, "edit.getAvailableRefactorings result
"); | 2892 throw jsonDecoder.mismatch(jsonPath, "edit.getAvailableRefactorings result
"); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2821 final String file; | 2938 final String file; |
| 2822 | 2939 |
| 2823 /** | 2940 /** |
| 2824 * The offset used to select the errors for which fixes will be returned. | 2941 * The offset used to select the errors for which fixes will be returned. |
| 2825 */ | 2942 */ |
| 2826 final int offset; | 2943 final int offset; |
| 2827 | 2944 |
| 2828 EditGetFixesParams(this.file, this.offset); | 2945 EditGetFixesParams(this.file, this.offset); |
| 2829 | 2946 |
| 2830 factory EditGetFixesParams.fromJson(JsonDecoder jsonDecoder, String jsonPath,
Object json) { | 2947 factory EditGetFixesParams.fromJson(JsonDecoder jsonDecoder, String jsonPath,
Object json) { |
| 2948 if (json == null) { |
| 2949 json = {}; |
| 2950 } |
| 2831 if (json is Map) { | 2951 if (json is Map) { |
| 2832 String file; | 2952 String file; |
| 2833 if (json.containsKey("file")) { | 2953 if (json.containsKey("file")) { |
| 2834 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 2954 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 2835 } else { | 2955 } else { |
| 2836 throw jsonDecoder.missingKey(jsonPath, "file"); | 2956 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 2837 } | 2957 } |
| 2838 int offset; | 2958 int offset; |
| 2839 if (json.containsKey("offset")) { | 2959 if (json.containsKey("offset")) { |
| 2840 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 2960 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2898 * the lists of changes in the response. In particular, it is always the case | 3018 * the lists of changes in the response. In particular, it is always the case |
| 2899 * that errors.length == fixes.length and that fixes[i] is the list of fixes | 3019 * that errors.length == fixes.length and that fixes[i] is the list of fixes |
| 2900 * for the error in errors[i]. The list of changes corresponding to an error | 3020 * for the error in errors[i]. The list of changes corresponding to an error |
| 2901 * can be empty if there are no fixes available for that error. | 3021 * can be empty if there are no fixes available for that error. |
| 2902 */ | 3022 */ |
| 2903 final List<ErrorFixes> fixes; | 3023 final List<ErrorFixes> fixes; |
| 2904 | 3024 |
| 2905 EditGetFixesResult(this.fixes); | 3025 EditGetFixesResult(this.fixes); |
| 2906 | 3026 |
| 2907 factory EditGetFixesResult.fromJson(JsonDecoder jsonDecoder, String jsonPath,
Object json) { | 3027 factory EditGetFixesResult.fromJson(JsonDecoder jsonDecoder, String jsonPath,
Object json) { |
| 3028 if (json == null) { |
| 3029 json = {}; |
| 3030 } |
| 2908 if (json is Map) { | 3031 if (json is Map) { |
| 2909 List<ErrorFixes> fixes; | 3032 List<ErrorFixes> fixes; |
| 2910 if (json.containsKey("fixes")) { | 3033 if (json.containsKey("fixes")) { |
| 2911 fixes = jsonDecoder._decodeList(jsonPath + ".fixes", json["fixes"], (Str
ing jsonPath, Object json) => new ErrorFixes.fromJson(jsonDecoder, jsonPath, jso
n)); | 3034 fixes = jsonDecoder._decodeList(jsonPath + ".fixes", json["fixes"], (Str
ing jsonPath, Object json) => new ErrorFixes.fromJson(jsonDecoder, jsonPath, jso
n)); |
| 2912 } else { | 3035 } else { |
| 2913 throw jsonDecoder.missingKey(jsonPath, "fixes"); | 3036 throw jsonDecoder.missingKey(jsonPath, "fixes"); |
| 2914 } | 3037 } |
| 2915 return new EditGetFixesResult(fixes); | 3038 return new EditGetFixesResult(fixes); |
| 2916 } else { | 3039 } else { |
| 2917 throw jsonDecoder.mismatch(jsonPath, "edit.getFixes result"); | 3040 throw jsonDecoder.mismatch(jsonPath, "edit.getFixes result"); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2992 * data is dependent on the kind of refactoring being performed. The data | 3115 * data is dependent on the kind of refactoring being performed. The data |
| 2993 * that is expected is documented in the section titled Refactorings, labeled | 3116 * that is expected is documented in the section titled Refactorings, labeled |
| 2994 * as “Options”. This field can be omitted if the refactoring does not | 3117 * as “Options”. This field can be omitted if the refactoring does not |
| 2995 * require any options or if the values of those options are not known. | 3118 * require any options or if the values of those options are not known. |
| 2996 */ | 3119 */ |
| 2997 final Object options; | 3120 final Object options; |
| 2998 | 3121 |
| 2999 EditGetRefactoringParams(this.kindId, this.file, this.offset, this.length, thi
s.validateOnly, {this.options}); | 3122 EditGetRefactoringParams(this.kindId, this.file, this.offset, this.length, thi
s.validateOnly, {this.options}); |
| 3000 | 3123 |
| 3001 factory EditGetRefactoringParams.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { | 3124 factory EditGetRefactoringParams.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { |
| 3125 if (json == null) { |
| 3126 json = {}; |
| 3127 } |
| 3002 if (json is Map) { | 3128 if (json is Map) { |
| 3003 RefactoringKind kindId; | 3129 RefactoringKind kindId; |
| 3004 if (json.containsKey("kindId")) { | 3130 if (json.containsKey("kindId")) { |
| 3005 kindId = new RefactoringKind.fromJson(jsonDecoder, jsonPath + ".kindId",
json["kindId"]); | 3131 kindId = new RefactoringKind.fromJson(jsonDecoder, jsonPath + ".kindId",
json["kindId"]); |
| 3006 } else { | 3132 } else { |
| 3007 throw jsonDecoder.missingKey(jsonPath, "kindId"); | 3133 throw jsonDecoder.missingKey(jsonPath, "kindId"); |
| 3008 } | 3134 } |
| 3009 String file; | 3135 String file; |
| 3010 if (json.containsKey("file")) { | 3136 if (json.containsKey("file")) { |
| 3011 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 3137 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3130 * server to be able to determine whether or not the code needs to be | 3256 * server to be able to determine whether or not the code needs to be |
| 3131 * modified, such as when a member is being renamed and there is a reference | 3257 * modified, such as when a member is being renamed and there is a reference |
| 3132 * to a member from an unknown type. This field will be omitted if the change | 3258 * to a member from an unknown type. This field will be omitted if the change |
| 3133 * field is omitted or if there are no potential edits for the refactoring. | 3259 * field is omitted or if there are no potential edits for the refactoring. |
| 3134 */ | 3260 */ |
| 3135 final List<String> potentialEdits; | 3261 final List<String> potentialEdits; |
| 3136 | 3262 |
| 3137 EditGetRefactoringResult(this.status, {this.feedback, this.change, this.potent
ialEdits}); | 3263 EditGetRefactoringResult(this.status, {this.feedback, this.change, this.potent
ialEdits}); |
| 3138 | 3264 |
| 3139 factory EditGetRefactoringResult.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { | 3265 factory EditGetRefactoringResult.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { |
| 3266 if (json == null) { |
| 3267 json = {}; |
| 3268 } |
| 3140 if (json is Map) { | 3269 if (json is Map) { |
| 3141 List<RefactoringProblem> status; | 3270 List<RefactoringProblem> status; |
| 3142 if (json.containsKey("status")) { | 3271 if (json.containsKey("status")) { |
| 3143 status = jsonDecoder._decodeList(jsonPath + ".status", json["status"], (
String jsonPath, Object json) => new RefactoringProblem.fromJson(jsonDecoder, js
onPath, json)); | 3272 status = jsonDecoder._decodeList(jsonPath + ".status", json["status"], (
String jsonPath, Object json) => new RefactoringProblem.fromJson(jsonDecoder, js
onPath, json)); |
| 3144 } else { | 3273 } else { |
| 3145 throw jsonDecoder.missingKey(jsonPath, "status"); | 3274 throw jsonDecoder.missingKey(jsonPath, "status"); |
| 3146 } | 3275 } |
| 3147 Object feedback; | 3276 Object feedback; |
| 3148 if (json.containsKey("feedback")) { | 3277 if (json.containsKey("feedback")) { |
| 3149 feedback = json["feedback"]; | 3278 feedback = json["feedback"]; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3216 */ | 3345 */ |
| 3217 class DebugCreateContextParams implements HasToJson { | 3346 class DebugCreateContextParams implements HasToJson { |
| 3218 /** | 3347 /** |
| 3219 * The path of the Dart or HTML file that will be launched. | 3348 * The path of the Dart or HTML file that will be launched. |
| 3220 */ | 3349 */ |
| 3221 final String contextRoot; | 3350 final String contextRoot; |
| 3222 | 3351 |
| 3223 DebugCreateContextParams(this.contextRoot); | 3352 DebugCreateContextParams(this.contextRoot); |
| 3224 | 3353 |
| 3225 factory DebugCreateContextParams.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { | 3354 factory DebugCreateContextParams.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { |
| 3355 if (json == null) { |
| 3356 json = {}; |
| 3357 } |
| 3226 if (json is Map) { | 3358 if (json is Map) { |
| 3227 String contextRoot; | 3359 String contextRoot; |
| 3228 if (json.containsKey("contextRoot")) { | 3360 if (json.containsKey("contextRoot")) { |
| 3229 contextRoot = jsonDecoder._decodeString(jsonPath + ".contextRoot", json[
"contextRoot"]); | 3361 contextRoot = jsonDecoder._decodeString(jsonPath + ".contextRoot", json[
"contextRoot"]); |
| 3230 } else { | 3362 } else { |
| 3231 throw jsonDecoder.missingKey(jsonPath, "contextRoot"); | 3363 throw jsonDecoder.missingKey(jsonPath, "contextRoot"); |
| 3232 } | 3364 } |
| 3233 return new DebugCreateContextParams(contextRoot); | 3365 return new DebugCreateContextParams(contextRoot); |
| 3234 } else { | 3366 } else { |
| 3235 throw jsonDecoder.mismatch(jsonPath, "debug.createContext params"); | 3367 throw jsonDecoder.mismatch(jsonPath, "debug.createContext params"); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3279 */ | 3411 */ |
| 3280 class DebugCreateContextResult implements HasToJson { | 3412 class DebugCreateContextResult implements HasToJson { |
| 3281 /** | 3413 /** |
| 3282 * The identifier used to refer to the debugging context that was created. | 3414 * The identifier used to refer to the debugging context that was created. |
| 3283 */ | 3415 */ |
| 3284 final String id; | 3416 final String id; |
| 3285 | 3417 |
| 3286 DebugCreateContextResult(this.id); | 3418 DebugCreateContextResult(this.id); |
| 3287 | 3419 |
| 3288 factory DebugCreateContextResult.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { | 3420 factory DebugCreateContextResult.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { |
| 3421 if (json == null) { |
| 3422 json = {}; |
| 3423 } |
| 3289 if (json is Map) { | 3424 if (json is Map) { |
| 3290 String id; | 3425 String id; |
| 3291 if (json.containsKey("id")) { | 3426 if (json.containsKey("id")) { |
| 3292 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); | 3427 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); |
| 3293 } else { | 3428 } else { |
| 3294 throw jsonDecoder.missingKey(jsonPath, "id"); | 3429 throw jsonDecoder.missingKey(jsonPath, "id"); |
| 3295 } | 3430 } |
| 3296 return new DebugCreateContextResult(id); | 3431 return new DebugCreateContextResult(id); |
| 3297 } else { | 3432 } else { |
| 3298 throw jsonDecoder.mismatch(jsonPath, "debug.createContext result"); | 3433 throw jsonDecoder.mismatch(jsonPath, "debug.createContext result"); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3338 */ | 3473 */ |
| 3339 class DebugDeleteContextParams implements HasToJson { | 3474 class DebugDeleteContextParams implements HasToJson { |
| 3340 /** | 3475 /** |
| 3341 * The identifier of the debugging context that is to be deleted. | 3476 * The identifier of the debugging context that is to be deleted. |
| 3342 */ | 3477 */ |
| 3343 final String id; | 3478 final String id; |
| 3344 | 3479 |
| 3345 DebugDeleteContextParams(this.id); | 3480 DebugDeleteContextParams(this.id); |
| 3346 | 3481 |
| 3347 factory DebugDeleteContextParams.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { | 3482 factory DebugDeleteContextParams.fromJson(JsonDecoder jsonDecoder, String json
Path, Object json) { |
| 3483 if (json == null) { |
| 3484 json = {}; |
| 3485 } |
| 3348 if (json is Map) { | 3486 if (json is Map) { |
| 3349 String id; | 3487 String id; |
| 3350 if (json.containsKey("id")) { | 3488 if (json.containsKey("id")) { |
| 3351 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); | 3489 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); |
| 3352 } else { | 3490 } else { |
| 3353 throw jsonDecoder.missingKey(jsonPath, "id"); | 3491 throw jsonDecoder.missingKey(jsonPath, "id"); |
| 3354 } | 3492 } |
| 3355 return new DebugDeleteContextParams(id); | 3493 return new DebugDeleteContextParams(id); |
| 3356 } else { | 3494 } else { |
| 3357 throw jsonDecoder.mismatch(jsonPath, "debug.deleteContext params"); | 3495 throw jsonDecoder.mismatch(jsonPath, "debug.deleteContext params"); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3413 final String file; | 3551 final String file; |
| 3414 | 3552 |
| 3415 /** | 3553 /** |
| 3416 * The URI to be mapped into a file path. | 3554 * The URI to be mapped into a file path. |
| 3417 */ | 3555 */ |
| 3418 final String uri; | 3556 final String uri; |
| 3419 | 3557 |
| 3420 DebugMapUriParams(this.id, {this.file, this.uri}); | 3558 DebugMapUriParams(this.id, {this.file, this.uri}); |
| 3421 | 3559 |
| 3422 factory DebugMapUriParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, O
bject json) { | 3560 factory DebugMapUriParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, O
bject json) { |
| 3561 if (json == null) { |
| 3562 json = {}; |
| 3563 } |
| 3423 if (json is Map) { | 3564 if (json is Map) { |
| 3424 String id; | 3565 String id; |
| 3425 if (json.containsKey("id")) { | 3566 if (json.containsKey("id")) { |
| 3426 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); | 3567 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); |
| 3427 } else { | 3568 } else { |
| 3428 throw jsonDecoder.missingKey(jsonPath, "id"); | 3569 throw jsonDecoder.missingKey(jsonPath, "id"); |
| 3429 } | 3570 } |
| 3430 String file; | 3571 String file; |
| 3431 if (json.containsKey("file")) { | 3572 if (json.containsKey("file")) { |
| 3432 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 3573 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3502 | 3643 |
| 3503 /** | 3644 /** |
| 3504 * The URI to which the file path was mapped. This field is omitted if the | 3645 * The URI to which the file path was mapped. This field is omitted if the |
| 3505 * file field was not given in the request. | 3646 * file field was not given in the request. |
| 3506 */ | 3647 */ |
| 3507 final String uri; | 3648 final String uri; |
| 3508 | 3649 |
| 3509 DebugMapUriResult({this.file, this.uri}); | 3650 DebugMapUriResult({this.file, this.uri}); |
| 3510 | 3651 |
| 3511 factory DebugMapUriResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, O
bject json) { | 3652 factory DebugMapUriResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, O
bject json) { |
| 3653 if (json == null) { |
| 3654 json = {}; |
| 3655 } |
| 3512 if (json is Map) { | 3656 if (json is Map) { |
| 3513 String file; | 3657 String file; |
| 3514 if (json.containsKey("file")) { | 3658 if (json.containsKey("file")) { |
| 3515 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 3659 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 3516 } | 3660 } |
| 3517 String uri; | 3661 String uri; |
| 3518 if (json.containsKey("uri")) { | 3662 if (json.containsKey("uri")) { |
| 3519 uri = jsonDecoder._decodeString(jsonPath + ".uri", json["uri"]); | 3663 uri = jsonDecoder._decodeString(jsonPath + ".uri", json["uri"]); |
| 3520 } | 3664 } |
| 3521 return new DebugMapUriResult(file: file, uri: uri); | 3665 return new DebugMapUriResult(file: file, uri: uri); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3570 */ | 3714 */ |
| 3571 class DebugSetSubscriptionsParams implements HasToJson { | 3715 class DebugSetSubscriptionsParams implements HasToJson { |
| 3572 /** | 3716 /** |
| 3573 * A list of the services being subscribed to. | 3717 * A list of the services being subscribed to. |
| 3574 */ | 3718 */ |
| 3575 final List<DebugService> subscriptions; | 3719 final List<DebugService> subscriptions; |
| 3576 | 3720 |
| 3577 DebugSetSubscriptionsParams(this.subscriptions); | 3721 DebugSetSubscriptionsParams(this.subscriptions); |
| 3578 | 3722 |
| 3579 factory DebugSetSubscriptionsParams.fromJson(JsonDecoder jsonDecoder, String j
sonPath, Object json) { | 3723 factory DebugSetSubscriptionsParams.fromJson(JsonDecoder jsonDecoder, String j
sonPath, Object json) { |
| 3724 if (json == null) { |
| 3725 json = {}; |
| 3726 } |
| 3580 if (json is Map) { | 3727 if (json is Map) { |
| 3581 List<DebugService> subscriptions; | 3728 List<DebugService> subscriptions; |
| 3582 if (json.containsKey("subscriptions")) { | 3729 if (json.containsKey("subscriptions")) { |
| 3583 subscriptions = jsonDecoder._decodeList(jsonPath + ".subscriptions", jso
n["subscriptions"], (String jsonPath, Object json) => new DebugService.fromJson(
jsonDecoder, jsonPath, json)); | 3730 subscriptions = jsonDecoder._decodeList(jsonPath + ".subscriptions", jso
n["subscriptions"], (String jsonPath, Object json) => new DebugService.fromJson(
jsonDecoder, jsonPath, json)); |
| 3584 } else { | 3731 } else { |
| 3585 throw jsonDecoder.missingKey(jsonPath, "subscriptions"); | 3732 throw jsonDecoder.missingKey(jsonPath, "subscriptions"); |
| 3586 } | 3733 } |
| 3587 return new DebugSetSubscriptionsParams(subscriptions); | 3734 return new DebugSetSubscriptionsParams(subscriptions); |
| 3588 } else { | 3735 } else { |
| 3589 throw jsonDecoder.mismatch(jsonPath, "debug.setSubscriptions params"); | 3736 throw jsonDecoder.mismatch(jsonPath, "debug.setSubscriptions params"); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3648 | 3795 |
| 3649 /** | 3796 /** |
| 3650 * A mapping from the paths of HTML files that reference Dart files to a list | 3797 * A mapping from the paths of HTML files that reference Dart files to a list |
| 3651 * of the Dart files they reference. | 3798 * of the Dart files they reference. |
| 3652 */ | 3799 */ |
| 3653 final Map<String, List<String>> htmlToDart; | 3800 final Map<String, List<String>> htmlToDart; |
| 3654 | 3801 |
| 3655 DebugLaunchDataParams(this.executables, this.dartToHtml, this.htmlToDart); | 3802 DebugLaunchDataParams(this.executables, this.dartToHtml, this.htmlToDart); |
| 3656 | 3803 |
| 3657 factory DebugLaunchDataParams.fromJson(JsonDecoder jsonDecoder, String jsonPat
h, Object json) { | 3804 factory DebugLaunchDataParams.fromJson(JsonDecoder jsonDecoder, String jsonPat
h, Object json) { |
| 3805 if (json == null) { |
| 3806 json = {}; |
| 3807 } |
| 3658 if (json is Map) { | 3808 if (json is Map) { |
| 3659 List<ExecutableFile> executables; | 3809 List<ExecutableFile> executables; |
| 3660 if (json.containsKey("executables")) { | 3810 if (json.containsKey("executables")) { |
| 3661 executables = jsonDecoder._decodeList(jsonPath + ".executables", json["e
xecutables"], (String jsonPath, Object json) => new ExecutableFile.fromJson(json
Decoder, jsonPath, json)); | 3811 executables = jsonDecoder._decodeList(jsonPath + ".executables", json["e
xecutables"], (String jsonPath, Object json) => new ExecutableFile.fromJson(json
Decoder, jsonPath, json)); |
| 3662 } else { | 3812 } else { |
| 3663 throw jsonDecoder.missingKey(jsonPath, "executables"); | 3813 throw jsonDecoder.missingKey(jsonPath, "executables"); |
| 3664 } | 3814 } |
| 3665 Map<String, List<String>> dartToHtml; | 3815 Map<String, List<String>> dartToHtml; |
| 3666 if (json.containsKey("dartToHtml")) { | 3816 if (json.containsKey("dartToHtml")) { |
| 3667 dartToHtml = jsonDecoder._decodeMap(jsonPath + ".dartToHtml", json["dart
ToHtml"], valueDecoder: (String jsonPath, Object json) => jsonDecoder._decodeLis
t(jsonPath, json, jsonDecoder._decodeString)); | 3817 dartToHtml = jsonDecoder._decodeMap(jsonPath + ".dartToHtml", json["dart
ToHtml"], valueDecoder: (String jsonPath, Object json) => jsonDecoder._decodeLis
t(jsonPath, json, jsonDecoder._decodeString)); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3726 */ | 3876 */ |
| 3727 class AddContentOverlay implements HasToJson { | 3877 class AddContentOverlay implements HasToJson { |
| 3728 /** | 3878 /** |
| 3729 * The new content of the file. | 3879 * The new content of the file. |
| 3730 */ | 3880 */ |
| 3731 final String content; | 3881 final String content; |
| 3732 | 3882 |
| 3733 AddContentOverlay(this.content); | 3883 AddContentOverlay(this.content); |
| 3734 | 3884 |
| 3735 factory AddContentOverlay.fromJson(JsonDecoder jsonDecoder, String jsonPath, O
bject json) { | 3885 factory AddContentOverlay.fromJson(JsonDecoder jsonDecoder, String jsonPath, O
bject json) { |
| 3886 if (json == null) { |
| 3887 json = {}; |
| 3888 } |
| 3736 if (json is Map) { | 3889 if (json is Map) { |
| 3737 if (json["type"] != "add") { | 3890 if (json["type"] != "add") { |
| 3738 throw jsonDecoder.mismatch(jsonPath, "equal " + "add"); | 3891 throw jsonDecoder.mismatch(jsonPath, "equal " + "add"); |
| 3739 } | 3892 } |
| 3740 String content; | 3893 String content; |
| 3741 if (json.containsKey("content")) { | 3894 if (json.containsKey("content")) { |
| 3742 content = jsonDecoder._decodeString(jsonPath + ".content", json["content
"]); | 3895 content = jsonDecoder._decodeString(jsonPath + ".content", json["content
"]); |
| 3743 } else { | 3896 } else { |
| 3744 throw jsonDecoder.missingKey(jsonPath, "content"); | 3897 throw jsonDecoder.missingKey(jsonPath, "content"); |
| 3745 } | 3898 } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3812 /** | 3965 /** |
| 3813 * The correction message to be displayed for this error. The correction | 3966 * The correction message to be displayed for this error. The correction |
| 3814 * message should indicate how the user can fix the error. The field is | 3967 * message should indicate how the user can fix the error. The field is |
| 3815 * omitted if there is no correction message associated with the error code. | 3968 * omitted if there is no correction message associated with the error code. |
| 3816 */ | 3969 */ |
| 3817 final String correction; | 3970 final String correction; |
| 3818 | 3971 |
| 3819 AnalysisError(this.severity, this.type, this.location, this.message, {this.cor
rection}); | 3972 AnalysisError(this.severity, this.type, this.location, this.message, {this.cor
rection}); |
| 3820 | 3973 |
| 3821 factory AnalysisError.fromJson(JsonDecoder jsonDecoder, String jsonPath, Objec
t json) { | 3974 factory AnalysisError.fromJson(JsonDecoder jsonDecoder, String jsonPath, Objec
t json) { |
| 3975 if (json == null) { |
| 3976 json = {}; |
| 3977 } |
| 3822 if (json is Map) { | 3978 if (json is Map) { |
| 3823 ErrorSeverity severity; | 3979 ErrorSeverity severity; |
| 3824 if (json.containsKey("severity")) { | 3980 if (json.containsKey("severity")) { |
| 3825 severity = new ErrorSeverity.fromJson(jsonDecoder, jsonPath + ".severity
", json["severity"]); | 3981 severity = new ErrorSeverity.fromJson(jsonDecoder, jsonPath + ".severity
", json["severity"]); |
| 3826 } else { | 3982 } else { |
| 3827 throw jsonDecoder.missingKey(jsonPath, "severity"); | 3983 throw jsonDecoder.missingKey(jsonPath, "severity"); |
| 3828 } | 3984 } |
| 3829 ErrorType type; | 3985 ErrorType type; |
| 3830 if (json.containsKey("type")) { | 3986 if (json.containsKey("type")) { |
| 3831 type = new ErrorType.fromJson(jsonDecoder, jsonPath + ".type", json["typ
e"]); | 3987 type = new ErrorType.fromJson(jsonDecoder, jsonPath + ".type", json["typ
e"]); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3929 | 4085 |
| 3930 /** | 4086 /** |
| 3931 * True is hints should be generated as part of generating errors and | 4087 * True is hints should be generated as part of generating errors and |
| 3932 * warnings. | 4088 * warnings. |
| 3933 */ | 4089 */ |
| 3934 final bool generateHints; | 4090 final bool generateHints; |
| 3935 | 4091 |
| 3936 AnalysisOptions({this.enableAsync, this.enableDeferredLoading, this.enableEnum
s, this.generateDart2jsHints, this.generateHints}); | 4092 AnalysisOptions({this.enableAsync, this.enableDeferredLoading, this.enableEnum
s, this.generateDart2jsHints, this.generateHints}); |
| 3937 | 4093 |
| 3938 factory AnalysisOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obj
ect json) { | 4094 factory AnalysisOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obj
ect json) { |
| 4095 if (json == null) { |
| 4096 json = {}; |
| 4097 } |
| 3939 if (json is Map) { | 4098 if (json is Map) { |
| 3940 bool enableAsync; | 4099 bool enableAsync; |
| 3941 if (json.containsKey("enableAsync")) { | 4100 if (json.containsKey("enableAsync")) { |
| 3942 enableAsync = jsonDecoder._decodeBool(jsonPath + ".enableAsync", json["e
nableAsync"]); | 4101 enableAsync = jsonDecoder._decodeBool(jsonPath + ".enableAsync", json["e
nableAsync"]); |
| 3943 } | 4102 } |
| 3944 bool enableDeferredLoading; | 4103 bool enableDeferredLoading; |
| 3945 if (json.containsKey("enableDeferredLoading")) { | 4104 if (json.containsKey("enableDeferredLoading")) { |
| 3946 enableDeferredLoading = jsonDecoder._decodeBool(jsonPath + ".enableDefer
redLoading", json["enableDeferredLoading"]); | 4105 enableDeferredLoading = jsonDecoder._decodeBool(jsonPath + ".enableDefer
redLoading", json["enableDeferredLoading"]); |
| 3947 } | 4106 } |
| 3948 bool enableEnums; | 4107 bool enableEnums; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4090 | 4249 |
| 4091 /** | 4250 /** |
| 4092 * The name of the current target of analysis. This field is omitted if | 4251 * The name of the current target of analysis. This field is omitted if |
| 4093 * analyzing is false. | 4252 * analyzing is false. |
| 4094 */ | 4253 */ |
| 4095 final String analysisTarget; | 4254 final String analysisTarget; |
| 4096 | 4255 |
| 4097 AnalysisStatus(this.analyzing, {this.analysisTarget}); | 4256 AnalysisStatus(this.analyzing, {this.analysisTarget}); |
| 4098 | 4257 |
| 4099 factory AnalysisStatus.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje
ct json) { | 4258 factory AnalysisStatus.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje
ct json) { |
| 4259 if (json == null) { |
| 4260 json = {}; |
| 4261 } |
| 4100 if (json is Map) { | 4262 if (json is Map) { |
| 4101 bool analyzing; | 4263 bool analyzing; |
| 4102 if (json.containsKey("analyzing")) { | 4264 if (json.containsKey("analyzing")) { |
| 4103 analyzing = jsonDecoder._decodeBool(jsonPath + ".analyzing", json["analy
zing"]); | 4265 analyzing = jsonDecoder._decodeBool(jsonPath + ".analyzing", json["analy
zing"]); |
| 4104 } else { | 4266 } else { |
| 4105 throw jsonDecoder.missingKey(jsonPath, "analyzing"); | 4267 throw jsonDecoder.missingKey(jsonPath, "analyzing"); |
| 4106 } | 4268 } |
| 4107 String analysisTarget; | 4269 String analysisTarget; |
| 4108 if (json.containsKey("analysisTarget")) { | 4270 if (json.containsKey("analysisTarget")) { |
| 4109 analysisTarget = jsonDecoder._decodeString(jsonPath + ".analysisTarget",
json["analysisTarget"]); | 4271 analysisTarget = jsonDecoder._decodeString(jsonPath + ".analysisTarget",
json["analysisTarget"]); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4154 */ | 4316 */ |
| 4155 class ChangeContentOverlay implements HasToJson { | 4317 class ChangeContentOverlay implements HasToJson { |
| 4156 /** | 4318 /** |
| 4157 * The edits to be applied to the file. | 4319 * The edits to be applied to the file. |
| 4158 */ | 4320 */ |
| 4159 final List<SourceEdit> edits; | 4321 final List<SourceEdit> edits; |
| 4160 | 4322 |
| 4161 ChangeContentOverlay(this.edits); | 4323 ChangeContentOverlay(this.edits); |
| 4162 | 4324 |
| 4163 factory ChangeContentOverlay.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { | 4325 factory ChangeContentOverlay.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { |
| 4326 if (json == null) { |
| 4327 json = {}; |
| 4328 } |
| 4164 if (json is Map) { | 4329 if (json is Map) { |
| 4165 if (json["type"] != "change") { | 4330 if (json["type"] != "change") { |
| 4166 throw jsonDecoder.mismatch(jsonPath, "equal " + "change"); | 4331 throw jsonDecoder.mismatch(jsonPath, "equal " + "change"); |
| 4167 } | 4332 } |
| 4168 List<SourceEdit> edits; | 4333 List<SourceEdit> edits; |
| 4169 if (json.containsKey("edits")) { | 4334 if (json.containsKey("edits")) { |
| 4170 edits = jsonDecoder._decodeList(jsonPath + ".edits", json["edits"], (Str
ing jsonPath, Object json) => new SourceEdit.fromJson(jsonDecoder, jsonPath, jso
n)); | 4335 edits = jsonDecoder._decodeList(jsonPath + ".edits", json["edits"], (Str
ing jsonPath, Object json) => new SourceEdit.fromJson(jsonDecoder, jsonPath, jso
n)); |
| 4171 } else { | 4336 } else { |
| 4172 throw jsonDecoder.missingKey(jsonPath, "edits"); | 4337 throw jsonDecoder.missingKey(jsonPath, "edits"); |
| 4173 } | 4338 } |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4377 | 4542 |
| 4378 /** | 4543 /** |
| 4379 * The type of the options parameter being suggested. This field is omitted | 4544 * The type of the options parameter being suggested. This field is omitted |
| 4380 * if the parameterName field is omitted. | 4545 * if the parameterName field is omitted. |
| 4381 */ | 4546 */ |
| 4382 final String parameterType; | 4547 final String parameterType; |
| 4383 | 4548 |
| 4384 CompletionSuggestion(this.kind, this.relevance, this.completion, this.selectio
nOffset, this.selectionLength, this.isDeprecated, this.isPotential, {this.docSum
mary, this.docComplete, this.declaringType, this.returnType, this.parameterNames
, this.parameterTypes, this.requiredParameterCount, this.positionalParameterCoun
t, this.parameterName, this.parameterType}); | 4549 CompletionSuggestion(this.kind, this.relevance, this.completion, this.selectio
nOffset, this.selectionLength, this.isDeprecated, this.isPotential, {this.docSum
mary, this.docComplete, this.declaringType, this.returnType, this.parameterNames
, this.parameterTypes, this.requiredParameterCount, this.positionalParameterCoun
t, this.parameterName, this.parameterType}); |
| 4385 | 4550 |
| 4386 factory CompletionSuggestion.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { | 4551 factory CompletionSuggestion.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { |
| 4552 if (json == null) { |
| 4553 json = {}; |
| 4554 } |
| 4387 if (json is Map) { | 4555 if (json is Map) { |
| 4388 CompletionSuggestionKind kind; | 4556 CompletionSuggestionKind kind; |
| 4389 if (json.containsKey("kind")) { | 4557 if (json.containsKey("kind")) { |
| 4390 kind = new CompletionSuggestionKind.fromJson(jsonDecoder, jsonPath + ".k
ind", json["kind"]); | 4558 kind = new CompletionSuggestionKind.fromJson(jsonDecoder, jsonPath + ".k
ind", json["kind"]); |
| 4391 } else { | 4559 } else { |
| 4392 throw jsonDecoder.missingKey(jsonPath, "kind"); | 4560 throw jsonDecoder.missingKey(jsonPath, "kind"); |
| 4393 } | 4561 } |
| 4394 CompletionRelevance relevance; | 4562 CompletionRelevance relevance; |
| 4395 if (json.containsKey("relevance")) { | 4563 if (json.containsKey("relevance")) { |
| 4396 relevance = new CompletionRelevance.fromJson(jsonDecoder, jsonPath + ".r
elevance", json["relevance"]); | 4564 relevance = new CompletionRelevance.fromJson(jsonDecoder, jsonPath + ".r
elevance", json["relevance"]); |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4791 /** | 4959 /** |
| 4792 * The return type of the element. If the element is not a method or function | 4960 * The return type of the element. If the element is not a method or function |
| 4793 * this field will not be defined. If the element does not have a declared | 4961 * this field will not be defined. If the element does not have a declared |
| 4794 * return type, this field will contain an empty string. | 4962 * return type, this field will contain an empty string. |
| 4795 */ | 4963 */ |
| 4796 final String returnType; | 4964 final String returnType; |
| 4797 | 4965 |
| 4798 Element(this.kind, this.name, this.flags, {this.location, this.parameters, thi
s.returnType}); | 4966 Element(this.kind, this.name, this.flags, {this.location, this.parameters, thi
s.returnType}); |
| 4799 | 4967 |
| 4800 factory Element.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json
) { | 4968 factory Element.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json
) { |
| 4969 if (json == null) { |
| 4970 json = {}; |
| 4971 } |
| 4801 if (json is Map) { | 4972 if (json is Map) { |
| 4802 ElementKind kind; | 4973 ElementKind kind; |
| 4803 if (json.containsKey("kind")) { | 4974 if (json.containsKey("kind")) { |
| 4804 kind = new ElementKind.fromJson(jsonDecoder, jsonPath + ".kind", json["k
ind"]); | 4975 kind = new ElementKind.fromJson(jsonDecoder, jsonPath + ".kind", json["k
ind"]); |
| 4805 } else { | 4976 } else { |
| 4806 throw jsonDecoder.missingKey(jsonPath, "kind"); | 4977 throw jsonDecoder.missingKey(jsonPath, "kind"); |
| 4807 } | 4978 } |
| 4808 String name; | 4979 String name; |
| 4809 if (json.containsKey("name")) { | 4980 if (json.containsKey("name")) { |
| 4810 name = jsonDecoder._decodeString(jsonPath + ".name", json["name"]); | 4981 name = jsonDecoder._decodeString(jsonPath + ".name", json["name"]); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5027 | 5198 |
| 5028 /** | 5199 /** |
| 5029 * Additional data related to the error. This field is omitted if there is no | 5200 * Additional data related to the error. This field is omitted if there is no |
| 5030 * additional data available. | 5201 * additional data available. |
| 5031 */ | 5202 */ |
| 5032 final Object data; | 5203 final Object data; |
| 5033 | 5204 |
| 5034 Error(this.code, this.message, {this.data}); | 5205 Error(this.code, this.message, {this.data}); |
| 5035 | 5206 |
| 5036 factory Error.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json)
{ | 5207 factory Error.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json)
{ |
| 5208 if (json == null) { |
| 5209 json = {}; |
| 5210 } |
| 5037 if (json is Map) { | 5211 if (json is Map) { |
| 5038 String code; | 5212 String code; |
| 5039 if (json.containsKey("code")) { | 5213 if (json.containsKey("code")) { |
| 5040 code = jsonDecoder._decodeString(jsonPath + ".code", json["code"]); | 5214 code = jsonDecoder._decodeString(jsonPath + ".code", json["code"]); |
| 5041 } else { | 5215 } else { |
| 5042 throw jsonDecoder.missingKey(jsonPath, "code"); | 5216 throw jsonDecoder.missingKey(jsonPath, "code"); |
| 5043 } | 5217 } |
| 5044 String message; | 5218 String message; |
| 5045 if (json.containsKey("message")) { | 5219 if (json.containsKey("message")) { |
| 5046 message = jsonDecoder._decodeString(jsonPath + ".message", json["message
"]); | 5220 message = jsonDecoder._decodeString(jsonPath + ".message", json["message
"]); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5105 final AnalysisError error; | 5279 final AnalysisError error; |
| 5106 | 5280 |
| 5107 /** | 5281 /** |
| 5108 * The fixes associated with the error. | 5282 * The fixes associated with the error. |
| 5109 */ | 5283 */ |
| 5110 final List<SourceChange> fixes; | 5284 final List<SourceChange> fixes; |
| 5111 | 5285 |
| 5112 ErrorFixes(this.error, this.fixes); | 5286 ErrorFixes(this.error, this.fixes); |
| 5113 | 5287 |
| 5114 factory ErrorFixes.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object j
son) { | 5288 factory ErrorFixes.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object j
son) { |
| 5289 if (json == null) { |
| 5290 json = {}; |
| 5291 } |
| 5115 if (json is Map) { | 5292 if (json is Map) { |
| 5116 AnalysisError error; | 5293 AnalysisError error; |
| 5117 if (json.containsKey("error")) { | 5294 if (json.containsKey("error")) { |
| 5118 error = new AnalysisError.fromJson(jsonDecoder, jsonPath + ".error", jso
n["error"]); | 5295 error = new AnalysisError.fromJson(jsonDecoder, jsonPath + ".error", jso
n["error"]); |
| 5119 } else { | 5296 } else { |
| 5120 throw jsonDecoder.missingKey(jsonPath, "error"); | 5297 throw jsonDecoder.missingKey(jsonPath, "error"); |
| 5121 } | 5298 } |
| 5122 List<SourceChange> fixes; | 5299 List<SourceChange> fixes; |
| 5123 if (json.containsKey("fixes")) { | 5300 if (json.containsKey("fixes")) { |
| 5124 fixes = jsonDecoder._decodeList(jsonPath + ".fixes", json["fixes"], (Str
ing jsonPath, Object json) => new SourceChange.fromJson(jsonDecoder, jsonPath, j
son)); | 5301 fixes = jsonDecoder._decodeList(jsonPath + ".fixes", json["fixes"], (Str
ing jsonPath, Object json) => new SourceChange.fromJson(jsonDecoder, jsonPath, j
son)); |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5287 final String file; | 5464 final String file; |
| 5288 | 5465 |
| 5289 /** | 5466 /** |
| 5290 * The offset of the region to be highlighted. | 5467 * The offset of the region to be highlighted. |
| 5291 */ | 5468 */ |
| 5292 final ExecutableKind offset; | 5469 final ExecutableKind offset; |
| 5293 | 5470 |
| 5294 ExecutableFile(this.file, this.offset); | 5471 ExecutableFile(this.file, this.offset); |
| 5295 | 5472 |
| 5296 factory ExecutableFile.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje
ct json) { | 5473 factory ExecutableFile.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje
ct json) { |
| 5474 if (json == null) { |
| 5475 json = {}; |
| 5476 } |
| 5297 if (json is Map) { | 5477 if (json is Map) { |
| 5298 String file; | 5478 String file; |
| 5299 if (json.containsKey("file")) { | 5479 if (json.containsKey("file")) { |
| 5300 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 5480 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 5301 } else { | 5481 } else { |
| 5302 throw jsonDecoder.missingKey(jsonPath, "file"); | 5482 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 5303 } | 5483 } |
| 5304 ExecutableKind offset; | 5484 ExecutableKind offset; |
| 5305 if (json.containsKey("offset")) { | 5485 if (json.containsKey("offset")) { |
| 5306 offset = new ExecutableKind.fromJson(jsonDecoder, jsonPath + ".offset",
json["offset"]); | 5486 offset = new ExecutableKind.fromJson(jsonDecoder, jsonPath + ".offset",
json["offset"]); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5470 final int offset; | 5650 final int offset; |
| 5471 | 5651 |
| 5472 /** | 5652 /** |
| 5473 * The length of the region to be folded. | 5653 * The length of the region to be folded. |
| 5474 */ | 5654 */ |
| 5475 final int length; | 5655 final int length; |
| 5476 | 5656 |
| 5477 FoldingRegion(this.kind, this.offset, this.length); | 5657 FoldingRegion(this.kind, this.offset, this.length); |
| 5478 | 5658 |
| 5479 factory FoldingRegion.fromJson(JsonDecoder jsonDecoder, String jsonPath, Objec
t json) { | 5659 factory FoldingRegion.fromJson(JsonDecoder jsonDecoder, String jsonPath, Objec
t json) { |
| 5660 if (json == null) { |
| 5661 json = {}; |
| 5662 } |
| 5480 if (json is Map) { | 5663 if (json is Map) { |
| 5481 FoldingKind kind; | 5664 FoldingKind kind; |
| 5482 if (json.containsKey("kind")) { | 5665 if (json.containsKey("kind")) { |
| 5483 kind = new FoldingKind.fromJson(jsonDecoder, jsonPath + ".kind", json["k
ind"]); | 5666 kind = new FoldingKind.fromJson(jsonDecoder, jsonPath + ".kind", json["k
ind"]); |
| 5484 } else { | 5667 } else { |
| 5485 throw jsonDecoder.missingKey(jsonPath, "kind"); | 5668 throw jsonDecoder.missingKey(jsonPath, "kind"); |
| 5486 } | 5669 } |
| 5487 int offset; | 5670 int offset; |
| 5488 if (json.containsKey("offset")) { | 5671 if (json.containsKey("offset")) { |
| 5489 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 5672 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5554 final int offset; | 5737 final int offset; |
| 5555 | 5738 |
| 5556 /** | 5739 /** |
| 5557 * The length of the region to be highlighted. | 5740 * The length of the region to be highlighted. |
| 5558 */ | 5741 */ |
| 5559 final int length; | 5742 final int length; |
| 5560 | 5743 |
| 5561 HighlightRegion(this.type, this.offset, this.length); | 5744 HighlightRegion(this.type, this.offset, this.length); |
| 5562 | 5745 |
| 5563 factory HighlightRegion.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obj
ect json) { | 5746 factory HighlightRegion.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obj
ect json) { |
| 5747 if (json == null) { |
| 5748 json = {}; |
| 5749 } |
| 5564 if (json is Map) { | 5750 if (json is Map) { |
| 5565 HighlightRegionType type; | 5751 HighlightRegionType type; |
| 5566 if (json.containsKey("type")) { | 5752 if (json.containsKey("type")) { |
| 5567 type = new HighlightRegionType.fromJson(jsonDecoder, jsonPath + ".type",
json["type"]); | 5753 type = new HighlightRegionType.fromJson(jsonDecoder, jsonPath + ".type",
json["type"]); |
| 5568 } else { | 5754 } else { |
| 5569 throw jsonDecoder.missingKey(jsonPath, "type"); | 5755 throw jsonDecoder.missingKey(jsonPath, "type"); |
| 5570 } | 5756 } |
| 5571 int offset; | 5757 int offset; |
| 5572 if (json.containsKey("offset")) { | 5758 if (json.containsKey("offset")) { |
| 5573 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 5759 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5905 | 6091 |
| 5906 /** | 6092 /** |
| 5907 * The name of the static type of the expression. This data is omitted if the | 6093 * The name of the static type of the expression. This data is omitted if the |
| 5908 * location does not correspond to an expression. | 6094 * location does not correspond to an expression. |
| 5909 */ | 6095 */ |
| 5910 final String staticType; | 6096 final String staticType; |
| 5911 | 6097 |
| 5912 HoverInformation(this.offset, this.length, {this.containingLibraryPath, this.c
ontainingLibraryName, this.dartdoc, this.elementDescription, this.elementKind, t
his.parameter, this.propagatedType, this.staticType}); | 6098 HoverInformation(this.offset, this.length, {this.containingLibraryPath, this.c
ontainingLibraryName, this.dartdoc, this.elementDescription, this.elementKind, t
his.parameter, this.propagatedType, this.staticType}); |
| 5913 | 6099 |
| 5914 factory HoverInformation.fromJson(JsonDecoder jsonDecoder, String jsonPath, Ob
ject json) { | 6100 factory HoverInformation.fromJson(JsonDecoder jsonDecoder, String jsonPath, Ob
ject json) { |
| 6101 if (json == null) { |
| 6102 json = {}; |
| 6103 } |
| 5915 if (json is Map) { | 6104 if (json is Map) { |
| 5916 int offset; | 6105 int offset; |
| 5917 if (json.containsKey("offset")) { | 6106 if (json.containsKey("offset")) { |
| 5918 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 6107 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| 5919 } else { | 6108 } else { |
| 5920 throw jsonDecoder.missingKey(jsonPath, "offset"); | 6109 throw jsonDecoder.missingKey(jsonPath, "offset"); |
| 5921 } | 6110 } |
| 5922 int length; | 6111 int length; |
| 5923 if (json.containsKey("length")) { | 6112 if (json.containsKey("length")) { |
| 5924 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); | 6113 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6053 | 6242 |
| 6054 /** | 6243 /** |
| 6055 * Pre-computed suggestions for what every region might want to be changed | 6244 * Pre-computed suggestions for what every region might want to be changed |
| 6056 * to. | 6245 * to. |
| 6057 */ | 6246 */ |
| 6058 final List<LinkedEditSuggestion> suggestions; | 6247 final List<LinkedEditSuggestion> suggestions; |
| 6059 | 6248 |
| 6060 LinkedEditGroup(this.positions, this.length, this.suggestions); | 6249 LinkedEditGroup(this.positions, this.length, this.suggestions); |
| 6061 | 6250 |
| 6062 factory LinkedEditGroup.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obj
ect json) { | 6251 factory LinkedEditGroup.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obj
ect json) { |
| 6252 if (json == null) { |
| 6253 json = {}; |
| 6254 } |
| 6063 if (json is Map) { | 6255 if (json is Map) { |
| 6064 List<Position> positions; | 6256 List<Position> positions; |
| 6065 if (json.containsKey("positions")) { | 6257 if (json.containsKey("positions")) { |
| 6066 positions = jsonDecoder._decodeList(jsonPath + ".positions", json["posit
ions"], (String jsonPath, Object json) => new Position.fromJson(jsonDecoder, jso
nPath, json)); | 6258 positions = jsonDecoder._decodeList(jsonPath + ".positions", json["posit
ions"], (String jsonPath, Object json) => new Position.fromJson(jsonDecoder, jso
nPath, json)); |
| 6067 } else { | 6259 } else { |
| 6068 throw jsonDecoder.missingKey(jsonPath, "positions"); | 6260 throw jsonDecoder.missingKey(jsonPath, "positions"); |
| 6069 } | 6261 } |
| 6070 int length; | 6262 int length; |
| 6071 if (json.containsKey("length")) { | 6263 if (json.containsKey("length")) { |
| 6072 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); | 6264 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6131 final String value; | 6323 final String value; |
| 6132 | 6324 |
| 6133 /** | 6325 /** |
| 6134 * The kind of value being proposed. | 6326 * The kind of value being proposed. |
| 6135 */ | 6327 */ |
| 6136 final LinkedEditSuggestionKind kind; | 6328 final LinkedEditSuggestionKind kind; |
| 6137 | 6329 |
| 6138 LinkedEditSuggestion(this.value, this.kind); | 6330 LinkedEditSuggestion(this.value, this.kind); |
| 6139 | 6331 |
| 6140 factory LinkedEditSuggestion.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { | 6332 factory LinkedEditSuggestion.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { |
| 6333 if (json == null) { |
| 6334 json = {}; |
| 6335 } |
| 6141 if (json is Map) { | 6336 if (json is Map) { |
| 6142 String value; | 6337 String value; |
| 6143 if (json.containsKey("value")) { | 6338 if (json.containsKey("value")) { |
| 6144 value = jsonDecoder._decodeString(jsonPath + ".value", json["value"]); | 6339 value = jsonDecoder._decodeString(jsonPath + ".value", json["value"]); |
| 6145 } else { | 6340 } else { |
| 6146 throw jsonDecoder.missingKey(jsonPath, "value"); | 6341 throw jsonDecoder.missingKey(jsonPath, "value"); |
| 6147 } | 6342 } |
| 6148 LinkedEditSuggestionKind kind; | 6343 LinkedEditSuggestionKind kind; |
| 6149 if (json.containsKey("kind")) { | 6344 if (json.containsKey("kind")) { |
| 6150 kind = new LinkedEditSuggestionKind.fromJson(jsonDecoder, jsonPath + ".k
ind", json["kind"]); | 6345 kind = new LinkedEditSuggestionKind.fromJson(jsonDecoder, jsonPath + ".k
ind", json["kind"]); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6274 | 6469 |
| 6275 /** | 6470 /** |
| 6276 * The one-based index of the column containing the first character of the | 6471 * The one-based index of the column containing the first character of the |
| 6277 * range. | 6472 * range. |
| 6278 */ | 6473 */ |
| 6279 final int startColumn; | 6474 final int startColumn; |
| 6280 | 6475 |
| 6281 Location(this.file, this.offset, this.length, this.startLine, this.startColumn
); | 6476 Location(this.file, this.offset, this.length, this.startLine, this.startColumn
); |
| 6282 | 6477 |
| 6283 factory Location.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object jso
n) { | 6478 factory Location.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object jso
n) { |
| 6479 if (json == null) { |
| 6480 json = {}; |
| 6481 } |
| 6284 if (json is Map) { | 6482 if (json is Map) { |
| 6285 String file; | 6483 String file; |
| 6286 if (json.containsKey("file")) { | 6484 if (json.containsKey("file")) { |
| 6287 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 6485 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 6288 } else { | 6486 } else { |
| 6289 throw jsonDecoder.missingKey(jsonPath, "file"); | 6487 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 6290 } | 6488 } |
| 6291 int offset; | 6489 int offset; |
| 6292 if (json.containsKey("offset")) { | 6490 if (json.containsKey("offset")) { |
| 6293 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 6491 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6377 | 6575 |
| 6378 /** | 6576 /** |
| 6379 * The elements to which the given region is bound. By opening the | 6577 * The elements to which the given region is bound. By opening the |
| 6380 * declaration of the elements, clients can implement one form of navigation. | 6578 * declaration of the elements, clients can implement one form of navigation. |
| 6381 */ | 6579 */ |
| 6382 final List<Element> targets; | 6580 final List<Element> targets; |
| 6383 | 6581 |
| 6384 NavigationRegion(this.offset, this.length, this.targets); | 6582 NavigationRegion(this.offset, this.length, this.targets); |
| 6385 | 6583 |
| 6386 factory NavigationRegion.fromJson(JsonDecoder jsonDecoder, String jsonPath, Ob
ject json) { | 6584 factory NavigationRegion.fromJson(JsonDecoder jsonDecoder, String jsonPath, Ob
ject json) { |
| 6585 if (json == null) { |
| 6586 json = {}; |
| 6587 } |
| 6387 if (json is Map) { | 6588 if (json is Map) { |
| 6388 int offset; | 6589 int offset; |
| 6389 if (json.containsKey("offset")) { | 6590 if (json.containsKey("offset")) { |
| 6390 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 6591 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| 6391 } else { | 6592 } else { |
| 6392 throw jsonDecoder.missingKey(jsonPath, "offset"); | 6593 throw jsonDecoder.missingKey(jsonPath, "offset"); |
| 6393 } | 6594 } |
| 6394 int length; | 6595 int length; |
| 6395 if (json.containsKey("length")) { | 6596 if (json.containsKey("length")) { |
| 6396 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); | 6597 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6461 final List<int> offsets; | 6662 final List<int> offsets; |
| 6462 | 6663 |
| 6463 /** | 6664 /** |
| 6464 * The length of the name of the referenced element. | 6665 * The length of the name of the referenced element. |
| 6465 */ | 6666 */ |
| 6466 final int length; | 6667 final int length; |
| 6467 | 6668 |
| 6468 Occurrences(this.element, this.offsets, this.length); | 6669 Occurrences(this.element, this.offsets, this.length); |
| 6469 | 6670 |
| 6470 factory Occurrences.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object
json) { | 6671 factory Occurrences.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object
json) { |
| 6672 if (json == null) { |
| 6673 json = {}; |
| 6674 } |
| 6471 if (json is Map) { | 6675 if (json is Map) { |
| 6472 Element element; | 6676 Element element; |
| 6473 if (json.containsKey("element")) { | 6677 if (json.containsKey("element")) { |
| 6474 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[
"element"]); | 6678 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[
"element"]); |
| 6475 } else { | 6679 } else { |
| 6476 throw jsonDecoder.missingKey(jsonPath, "element"); | 6680 throw jsonDecoder.missingKey(jsonPath, "element"); |
| 6477 } | 6681 } |
| 6478 List<int> offsets; | 6682 List<int> offsets; |
| 6479 if (json.containsKey("offsets")) { | 6683 if (json.containsKey("offsets")) { |
| 6480 offsets = jsonDecoder._decodeList(jsonPath + ".offsets", json["offsets"]
, jsonDecoder._decodeInt); | 6684 offsets = jsonDecoder._decodeList(jsonPath + ".offsets", json["offsets"]
, jsonDecoder._decodeInt); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6555 | 6759 |
| 6556 /** | 6760 /** |
| 6557 * The children of the node. The field will be omitted if the node has no | 6761 * The children of the node. The field will be omitted if the node has no |
| 6558 * children. | 6762 * children. |
| 6559 */ | 6763 */ |
| 6560 final List<Outline> children; | 6764 final List<Outline> children; |
| 6561 | 6765 |
| 6562 Outline(this.element, this.offset, this.length, {this.children}); | 6766 Outline(this.element, this.offset, this.length, {this.children}); |
| 6563 | 6767 |
| 6564 factory Outline.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json
) { | 6768 factory Outline.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json
) { |
| 6769 if (json == null) { |
| 6770 json = {}; |
| 6771 } |
| 6565 if (json is Map) { | 6772 if (json is Map) { |
| 6566 Element element; | 6773 Element element; |
| 6567 if (json.containsKey("element")) { | 6774 if (json.containsKey("element")) { |
| 6568 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[
"element"]); | 6775 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[
"element"]); |
| 6569 } else { | 6776 } else { |
| 6570 throw jsonDecoder.missingKey(jsonPath, "element"); | 6777 throw jsonDecoder.missingKey(jsonPath, "element"); |
| 6571 } | 6778 } |
| 6572 int offset; | 6779 int offset; |
| 6573 if (json.containsKey("offset")) { | 6780 if (json.containsKey("offset")) { |
| 6574 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 6781 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6658 /** | 6865 /** |
| 6659 * The members inherited from interfaces that are overridden by the | 6866 * The members inherited from interfaces that are overridden by the |
| 6660 * overriding member. The field is omitted if there are no interface members, | 6867 * overriding member. The field is omitted if there are no interface members, |
| 6661 * in which case there must be a superclass member. | 6868 * in which case there must be a superclass member. |
| 6662 */ | 6869 */ |
| 6663 final List<OverriddenMember> interfaceMembers; | 6870 final List<OverriddenMember> interfaceMembers; |
| 6664 | 6871 |
| 6665 Override(this.offset, this.length, {this.superclassMember, this.interfaceMembe
rs}); | 6872 Override(this.offset, this.length, {this.superclassMember, this.interfaceMembe
rs}); |
| 6666 | 6873 |
| 6667 factory Override.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object jso
n) { | 6874 factory Override.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object jso
n) { |
| 6875 if (json == null) { |
| 6876 json = {}; |
| 6877 } |
| 6668 if (json is Map) { | 6878 if (json is Map) { |
| 6669 int offset; | 6879 int offset; |
| 6670 if (json.containsKey("offset")) { | 6880 if (json.containsKey("offset")) { |
| 6671 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 6881 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| 6672 } else { | 6882 } else { |
| 6673 throw jsonDecoder.missingKey(jsonPath, "offset"); | 6883 throw jsonDecoder.missingKey(jsonPath, "offset"); |
| 6674 } | 6884 } |
| 6675 int length; | 6885 int length; |
| 6676 if (json.containsKey("length")) { | 6886 if (json.containsKey("length")) { |
| 6677 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); | 6887 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6745 final Element element; | 6955 final Element element; |
| 6746 | 6956 |
| 6747 /** | 6957 /** |
| 6748 * The name of the class in which the member is defined. | 6958 * The name of the class in which the member is defined. |
| 6749 */ | 6959 */ |
| 6750 final String className; | 6960 final String className; |
| 6751 | 6961 |
| 6752 OverriddenMember(this.element, this.className); | 6962 OverriddenMember(this.element, this.className); |
| 6753 | 6963 |
| 6754 factory OverriddenMember.fromJson(JsonDecoder jsonDecoder, String jsonPath, Ob
ject json) { | 6964 factory OverriddenMember.fromJson(JsonDecoder jsonDecoder, String jsonPath, Ob
ject json) { |
| 6965 if (json == null) { |
| 6966 json = {}; |
| 6967 } |
| 6755 if (json is Map) { | 6968 if (json is Map) { |
| 6756 Element element; | 6969 Element element; |
| 6757 if (json.containsKey("element")) { | 6970 if (json.containsKey("element")) { |
| 6758 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[
"element"]); | 6971 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[
"element"]); |
| 6759 } else { | 6972 } else { |
| 6760 throw jsonDecoder.missingKey(jsonPath, "element"); | 6973 throw jsonDecoder.missingKey(jsonPath, "element"); |
| 6761 } | 6974 } |
| 6762 String className; | 6975 String className; |
| 6763 if (json.containsKey("className")) { | 6976 if (json.containsKey("className")) { |
| 6764 className = jsonDecoder._decodeString(jsonPath + ".className", json["cla
ssName"]); | 6977 className = jsonDecoder._decodeString(jsonPath + ".className", json["cla
ssName"]); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6814 final String file; | 7027 final String file; |
| 6815 | 7028 |
| 6816 /** | 7029 /** |
| 6817 * The offset of the position. | 7030 * The offset of the position. |
| 6818 */ | 7031 */ |
| 6819 final int offset; | 7032 final int offset; |
| 6820 | 7033 |
| 6821 Position(this.file, this.offset); | 7034 Position(this.file, this.offset); |
| 6822 | 7035 |
| 6823 factory Position.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object jso
n) { | 7036 factory Position.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object jso
n) { |
| 7037 if (json == null) { |
| 7038 json = {}; |
| 7039 } |
| 6824 if (json is Map) { | 7040 if (json is Map) { |
| 6825 String file; | 7041 String file; |
| 6826 if (json.containsKey("file")) { | 7042 if (json.containsKey("file")) { |
| 6827 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 7043 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 6828 } else { | 7044 } else { |
| 6829 throw jsonDecoder.missingKey(jsonPath, "file"); | 7045 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 6830 } | 7046 } |
| 6831 int offset; | 7047 int offset; |
| 6832 if (json.containsKey("offset")) { | 7048 if (json.containsKey("offset")) { |
| 6833 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 7049 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6974 /** | 7190 /** |
| 6975 * The parameter list of the parameter's function type. If the parameter is | 7191 * The parameter list of the parameter's function type. If the parameter is |
| 6976 * not of a function type, this field will not be defined. If the function | 7192 * not of a function type, this field will not be defined. If the function |
| 6977 * type has zero parameters, this field will have a value of "()". | 7193 * type has zero parameters, this field will have a value of "()". |
| 6978 */ | 7194 */ |
| 6979 final String parameters; | 7195 final String parameters; |
| 6980 | 7196 |
| 6981 RefactoringMethodParameter(this.kind, this.type, this.name, {this.id, this.par
ameters}); | 7197 RefactoringMethodParameter(this.kind, this.type, this.name, {this.id, this.par
ameters}); |
| 6982 | 7198 |
| 6983 factory RefactoringMethodParameter.fromJson(JsonDecoder jsonDecoder, String js
onPath, Object json) { | 7199 factory RefactoringMethodParameter.fromJson(JsonDecoder jsonDecoder, String js
onPath, Object json) { |
| 7200 if (json == null) { |
| 7201 json = {}; |
| 7202 } |
| 6984 if (json is Map) { | 7203 if (json is Map) { |
| 6985 String id; | 7204 String id; |
| 6986 if (json.containsKey("id")) { | 7205 if (json.containsKey("id")) { |
| 6987 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); | 7206 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); |
| 6988 } | 7207 } |
| 6989 RefactoringMethodParameterKind kind; | 7208 RefactoringMethodParameterKind kind; |
| 6990 if (json.containsKey("kind")) { | 7209 if (json.containsKey("kind")) { |
| 6991 kind = new RefactoringMethodParameterKind.fromJson(jsonDecoder, jsonPath
+ ".kind", json["kind"]); | 7210 kind = new RefactoringMethodParameterKind.fromJson(jsonDecoder, jsonPath
+ ".kind", json["kind"]); |
| 6992 } else { | 7211 } else { |
| 6993 throw jsonDecoder.missingKey(jsonPath, "kind"); | 7212 throw jsonDecoder.missingKey(jsonPath, "kind"); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7125 final String message; | 7344 final String message; |
| 7126 | 7345 |
| 7127 /** | 7346 /** |
| 7128 * The location of the problem being represented. | 7347 * The location of the problem being represented. |
| 7129 */ | 7348 */ |
| 7130 final Location location; | 7349 final Location location; |
| 7131 | 7350 |
| 7132 RefactoringProblem(this.severity, this.message, this.location); | 7351 RefactoringProblem(this.severity, this.message, this.location); |
| 7133 | 7352 |
| 7134 factory RefactoringProblem.fromJson(JsonDecoder jsonDecoder, String jsonPath,
Object json) { | 7353 factory RefactoringProblem.fromJson(JsonDecoder jsonDecoder, String jsonPath,
Object json) { |
| 7354 if (json == null) { |
| 7355 json = {}; |
| 7356 } |
| 7135 if (json is Map) { | 7357 if (json is Map) { |
| 7136 RefactoringProblemSeverity severity; | 7358 RefactoringProblemSeverity severity; |
| 7137 if (json.containsKey("severity")) { | 7359 if (json.containsKey("severity")) { |
| 7138 severity = new RefactoringProblemSeverity.fromJson(jsonDecoder, jsonPath
+ ".severity", json["severity"]); | 7360 severity = new RefactoringProblemSeverity.fromJson(jsonDecoder, jsonPath
+ ".severity", json["severity"]); |
| 7139 } else { | 7361 } else { |
| 7140 throw jsonDecoder.missingKey(jsonPath, "severity"); | 7362 throw jsonDecoder.missingKey(jsonPath, "severity"); |
| 7141 } | 7363 } |
| 7142 String message; | 7364 String message; |
| 7143 if (json.containsKey("message")) { | 7365 if (json.containsKey("message")) { |
| 7144 message = jsonDecoder._decodeString(jsonPath + ".message", json["message
"]); | 7366 message = jsonDecoder._decodeString(jsonPath + ".message", json["message
"]); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7246 * RemoveContentOverlay | 7468 * RemoveContentOverlay |
| 7247 * | 7469 * |
| 7248 * { | 7470 * { |
| 7249 * "type": "remove" | 7471 * "type": "remove" |
| 7250 * } | 7472 * } |
| 7251 */ | 7473 */ |
| 7252 class RemoveContentOverlay implements HasToJson { | 7474 class RemoveContentOverlay implements HasToJson { |
| 7253 RemoveContentOverlay(); | 7475 RemoveContentOverlay(); |
| 7254 | 7476 |
| 7255 factory RemoveContentOverlay.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { | 7477 factory RemoveContentOverlay.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { |
| 7478 if (json == null) { |
| 7479 json = {}; |
| 7480 } |
| 7256 if (json is Map) { | 7481 if (json is Map) { |
| 7257 if (json["type"] != "remove") { | 7482 if (json["type"] != "remove") { |
| 7258 throw jsonDecoder.mismatch(jsonPath, "equal " + "remove"); | 7483 throw jsonDecoder.mismatch(jsonPath, "equal " + "remove"); |
| 7259 } | 7484 } |
| 7260 return new RemoveContentOverlay(); | 7485 return new RemoveContentOverlay(); |
| 7261 } else { | 7486 } else { |
| 7262 throw jsonDecoder.mismatch(jsonPath, "RemoveContentOverlay"); | 7487 throw jsonDecoder.mismatch(jsonPath, "RemoveContentOverlay"); |
| 7263 } | 7488 } |
| 7264 } | 7489 } |
| 7265 | 7490 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7320 | 7545 |
| 7321 /** | 7546 /** |
| 7322 * The elements that contain the result, starting with the most immediately | 7547 * The elements that contain the result, starting with the most immediately |
| 7323 * enclosing ancestor and ending with the library. | 7548 * enclosing ancestor and ending with the library. |
| 7324 */ | 7549 */ |
| 7325 final List<Element> path; | 7550 final List<Element> path; |
| 7326 | 7551 |
| 7327 SearchResult(this.location, this.kind, this.isPotential, this.path); | 7552 SearchResult(this.location, this.kind, this.isPotential, this.path); |
| 7328 | 7553 |
| 7329 factory SearchResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object
json) { | 7554 factory SearchResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object
json) { |
| 7555 if (json == null) { |
| 7556 json = {}; |
| 7557 } |
| 7330 if (json is Map) { | 7558 if (json is Map) { |
| 7331 Location location; | 7559 Location location; |
| 7332 if (json.containsKey("location")) { | 7560 if (json.containsKey("location")) { |
| 7333 location = new Location.fromJson(jsonDecoder, jsonPath + ".location", js
on["location"]); | 7561 location = new Location.fromJson(jsonDecoder, jsonPath + ".location", js
on["location"]); |
| 7334 } else { | 7562 } else { |
| 7335 throw jsonDecoder.missingKey(jsonPath, "location"); | 7563 throw jsonDecoder.missingKey(jsonPath, "location"); |
| 7336 } | 7564 } |
| 7337 SearchResultKind kind; | 7565 SearchResultKind kind; |
| 7338 if (json.containsKey("kind")) { | 7566 if (json.containsKey("kind")) { |
| 7339 kind = new SearchResultKind.fromJson(jsonDecoder, jsonPath + ".kind", js
on["kind"]); | 7567 kind = new SearchResultKind.fromJson(jsonDecoder, jsonPath + ".kind", js
on["kind"]); |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7542 final List<LinkedEditGroup> linkedEditGroups; | 7770 final List<LinkedEditGroup> linkedEditGroups; |
| 7543 | 7771 |
| 7544 /** | 7772 /** |
| 7545 * The position that should be selected after the edits have been applied. | 7773 * The position that should be selected after the edits have been applied. |
| 7546 */ | 7774 */ |
| 7547 final Position selection; | 7775 final Position selection; |
| 7548 | 7776 |
| 7549 SourceChange(this.message, this.edits, this.linkedEditGroups, {this.selection}
); | 7777 SourceChange(this.message, this.edits, this.linkedEditGroups, {this.selection}
); |
| 7550 | 7778 |
| 7551 factory SourceChange.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object
json) { | 7779 factory SourceChange.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object
json) { |
| 7780 if (json == null) { |
| 7781 json = {}; |
| 7782 } |
| 7552 if (json is Map) { | 7783 if (json is Map) { |
| 7553 String message; | 7784 String message; |
| 7554 if (json.containsKey("message")) { | 7785 if (json.containsKey("message")) { |
| 7555 message = jsonDecoder._decodeString(jsonPath + ".message", json["message
"]); | 7786 message = jsonDecoder._decodeString(jsonPath + ".message", json["message
"]); |
| 7556 } else { | 7787 } else { |
| 7557 throw jsonDecoder.missingKey(jsonPath, "message"); | 7788 throw jsonDecoder.missingKey(jsonPath, "message"); |
| 7558 } | 7789 } |
| 7559 List<SourceFileEdit> edits; | 7790 List<SourceFileEdit> edits; |
| 7560 if (json.containsKey("edits")) { | 7791 if (json.containsKey("edits")) { |
| 7561 edits = jsonDecoder._decodeList(jsonPath + ".edits", json["edits"], (Str
ing jsonPath, Object json) => new SourceFileEdit.fromJson(jsonDecoder, jsonPath,
json)); | 7792 edits = jsonDecoder._decodeList(jsonPath + ".edits", json["edits"], (Str
ing jsonPath, Object json) => new SourceFileEdit.fromJson(jsonDecoder, jsonPath,
json)); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7648 * For example, some refactoring operations can produce edits that might not | 7879 * For example, some refactoring operations can produce edits that might not |
| 7649 * be appropriate (referred to as potential edits). Such edits will have an | 7880 * be appropriate (referred to as potential edits). Such edits will have an |
| 7650 * id so that they can be referenced. Edits in the same response that do not | 7881 * id so that they can be referenced. Edits in the same response that do not |
| 7651 * need to be referenced will not have an id. | 7882 * need to be referenced will not have an id. |
| 7652 */ | 7883 */ |
| 7653 final String id; | 7884 final String id; |
| 7654 | 7885 |
| 7655 SourceEdit(this.offset, this.length, this.replacement, {this.id}); | 7886 SourceEdit(this.offset, this.length, this.replacement, {this.id}); |
| 7656 | 7887 |
| 7657 factory SourceEdit.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object j
son) { | 7888 factory SourceEdit.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object j
son) { |
| 7889 if (json == null) { |
| 7890 json = {}; |
| 7891 } |
| 7658 if (json is Map) { | 7892 if (json is Map) { |
| 7659 int offset; | 7893 int offset; |
| 7660 if (json.containsKey("offset")) { | 7894 if (json.containsKey("offset")) { |
| 7661 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 7895 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| 7662 } else { | 7896 } else { |
| 7663 throw jsonDecoder.missingKey(jsonPath, "offset"); | 7897 throw jsonDecoder.missingKey(jsonPath, "offset"); |
| 7664 } | 7898 } |
| 7665 int length; | 7899 int length; |
| 7666 if (json.containsKey("length")) { | 7900 if (json.containsKey("length")) { |
| 7667 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); | 7901 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7735 final String file; | 7969 final String file; |
| 7736 | 7970 |
| 7737 /** | 7971 /** |
| 7738 * A list of the edits used to effect the change. | 7972 * A list of the edits used to effect the change. |
| 7739 */ | 7973 */ |
| 7740 final List<SourceEdit> edits; | 7974 final List<SourceEdit> edits; |
| 7741 | 7975 |
| 7742 SourceFileEdit(this.file, this.edits); | 7976 SourceFileEdit(this.file, this.edits); |
| 7743 | 7977 |
| 7744 factory SourceFileEdit.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje
ct json) { | 7978 factory SourceFileEdit.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje
ct json) { |
| 7979 if (json == null) { |
| 7980 json = {}; |
| 7981 } |
| 7745 if (json is Map) { | 7982 if (json is Map) { |
| 7746 String file; | 7983 String file; |
| 7747 if (json.containsKey("file")) { | 7984 if (json.containsKey("file")) { |
| 7748 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 7985 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 7749 } else { | 7986 } else { |
| 7750 throw jsonDecoder.missingKey(jsonPath, "file"); | 7987 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 7751 } | 7988 } |
| 7752 List<SourceEdit> edits; | 7989 List<SourceEdit> edits; |
| 7753 if (json.containsKey("edits")) { | 7990 if (json.containsKey("edits")) { |
| 7754 edits = jsonDecoder._decodeList(jsonPath + ".edits", json["edits"], (Str
ing jsonPath, Object json) => new SourceEdit.fromJson(jsonDecoder, jsonPath, jso
n)); | 7991 edits = jsonDecoder._decodeList(jsonPath + ".edits", json["edits"], (Str
ing jsonPath, Object json) => new SourceEdit.fromJson(jsonDecoder, jsonPath, jso
n)); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7845 /** | 8082 /** |
| 7846 * The indexes of the items representing the subtypes of this class. The list | 8083 * The indexes of the items representing the subtypes of this class. The list |
| 7847 * will be empty if there are no subtypes or if this item represents a | 8084 * will be empty if there are no subtypes or if this item represents a |
| 7848 * supertype of the pivot type. | 8085 * supertype of the pivot type. |
| 7849 */ | 8086 */ |
| 7850 final List<int> subclasses; | 8087 final List<int> subclasses; |
| 7851 | 8088 |
| 7852 TypeHierarchyItem(this.classElement, this.interfaces, this.mixins, this.subcla
sses, {this.displayName, this.memberElement, this.superclass}); | 8089 TypeHierarchyItem(this.classElement, this.interfaces, this.mixins, this.subcla
sses, {this.displayName, this.memberElement, this.superclass}); |
| 7853 | 8090 |
| 7854 factory TypeHierarchyItem.fromJson(JsonDecoder jsonDecoder, String jsonPath, O
bject json) { | 8091 factory TypeHierarchyItem.fromJson(JsonDecoder jsonDecoder, String jsonPath, O
bject json) { |
| 8092 if (json == null) { |
| 8093 json = {}; |
| 8094 } |
| 7855 if (json is Map) { | 8095 if (json is Map) { |
| 7856 Element classElement; | 8096 Element classElement; |
| 7857 if (json.containsKey("classElement")) { | 8097 if (json.containsKey("classElement")) { |
| 7858 classElement = new Element.fromJson(jsonDecoder, jsonPath + ".classEleme
nt", json["classElement"]); | 8098 classElement = new Element.fromJson(jsonDecoder, jsonPath + ".classEleme
nt", json["classElement"]); |
| 7859 } else { | 8099 } else { |
| 7860 throw jsonDecoder.missingKey(jsonPath, "classElement"); | 8100 throw jsonDecoder.missingKey(jsonPath, "classElement"); |
| 7861 } | 8101 } |
| 7862 String displayName; | 8102 String displayName; |
| 7863 if (json.containsKey("displayName")) { | 8103 if (json.containsKey("displayName")) { |
| 7864 displayName = jsonDecoder._decodeString(jsonPath + ".displayName", json[
"displayName"]); | 8104 displayName = jsonDecoder._decodeString(jsonPath + ".displayName", json[
"displayName"]); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7969 * The lengths of the expressions that would be replaced by a reference to | 8209 * The lengths of the expressions that would be replaced by a reference to |
| 7970 * the variable. The lengths correspond to the offsets. In other words, for a | 8210 * the variable. The lengths correspond to the offsets. In other words, for a |
| 7971 * given expression, if the offset of that expression is offsets[i], then the | 8211 * given expression, if the offset of that expression is offsets[i], then the |
| 7972 * length of that expression is lengths[i]. | 8212 * length of that expression is lengths[i]. |
| 7973 */ | 8213 */ |
| 7974 final List<int> lengths; | 8214 final List<int> lengths; |
| 7975 | 8215 |
| 7976 ExtractLocalVariableFeedback(this.names, this.offsets, this.lengths); | 8216 ExtractLocalVariableFeedback(this.names, this.offsets, this.lengths); |
| 7977 | 8217 |
| 7978 factory ExtractLocalVariableFeedback.fromJson(JsonDecoder jsonDecoder, String
jsonPath, Object json) { | 8218 factory ExtractLocalVariableFeedback.fromJson(JsonDecoder jsonDecoder, String
jsonPath, Object json) { |
| 8219 if (json == null) { |
| 8220 json = {}; |
| 8221 } |
| 7979 if (json is Map) { | 8222 if (json is Map) { |
| 7980 List<String> names; | 8223 List<String> names; |
| 7981 if (json.containsKey("names")) { | 8224 if (json.containsKey("names")) { |
| 7982 names = jsonDecoder._decodeList(jsonPath + ".names", json["names"], json
Decoder._decodeString); | 8225 names = jsonDecoder._decodeList(jsonPath + ".names", json["names"], json
Decoder._decodeString); |
| 7983 } else { | 8226 } else { |
| 7984 throw jsonDecoder.missingKey(jsonPath, "names"); | 8227 throw jsonDecoder.missingKey(jsonPath, "names"); |
| 7985 } | 8228 } |
| 7986 List<int> offsets; | 8229 List<int> offsets; |
| 7987 if (json.containsKey("offsets")) { | 8230 if (json.containsKey("offsets")) { |
| 7988 offsets = jsonDecoder._decodeList(jsonPath + ".offsets", json["offsets"]
, jsonDecoder._decodeInt); | 8231 offsets = jsonDecoder._decodeList(jsonPath + ".offsets", json["offsets"]
, jsonDecoder._decodeInt); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8055 * True if all occurrences of the expression within the scope in which the | 8298 * True if all occurrences of the expression within the scope in which the |
| 8056 * variable will be defined should be replaced by a reference to the local | 8299 * variable will be defined should be replaced by a reference to the local |
| 8057 * variable. The expression used to initiate the refactoring will always be | 8300 * variable. The expression used to initiate the refactoring will always be |
| 8058 * replaced. | 8301 * replaced. |
| 8059 */ | 8302 */ |
| 8060 final bool extractAll; | 8303 final bool extractAll; |
| 8061 | 8304 |
| 8062 ExtractLocalVariableOptions(this.name, this.extractAll); | 8305 ExtractLocalVariableOptions(this.name, this.extractAll); |
| 8063 | 8306 |
| 8064 factory ExtractLocalVariableOptions.fromJson(JsonDecoder jsonDecoder, String j
sonPath, Object json) { | 8307 factory ExtractLocalVariableOptions.fromJson(JsonDecoder jsonDecoder, String j
sonPath, Object json) { |
| 8308 if (json == null) { |
| 8309 json = {}; |
| 8310 } |
| 8065 if (json is Map) { | 8311 if (json is Map) { |
| 8066 String name; | 8312 String name; |
| 8067 if (json.containsKey("name")) { | 8313 if (json.containsKey("name")) { |
| 8068 name = jsonDecoder._decodeString(jsonPath + ".name", json["name"]); | 8314 name = jsonDecoder._decodeString(jsonPath + ".name", json["name"]); |
| 8069 } else { | 8315 } else { |
| 8070 throw jsonDecoder.missingKey(jsonPath, "name"); | 8316 throw jsonDecoder.missingKey(jsonPath, "name"); |
| 8071 } | 8317 } |
| 8072 bool extractAll; | 8318 bool extractAll; |
| 8073 if (json.containsKey("extractAll")) { | 8319 if (json.containsKey("extractAll")) { |
| 8074 extractAll = jsonDecoder._decodeBool(jsonPath + ".extractAll", json["ext
ractAll"]); | 8320 extractAll = jsonDecoder._decodeBool(jsonPath + ".extractAll", json["ext
ractAll"]); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8177 * invocation of the method. The lengths correspond to the offsets. In other | 8423 * invocation of the method. The lengths correspond to the offsets. In other |
| 8178 * words, for a given expression (or block of statements), if the offset of | 8424 * words, for a given expression (or block of statements), if the offset of |
| 8179 * that expression is offsets[i], then the length of that expression is | 8425 * that expression is offsets[i], then the length of that expression is |
| 8180 * lengths[i]. | 8426 * lengths[i]. |
| 8181 */ | 8427 */ |
| 8182 final List<int> lengths; | 8428 final List<int> lengths; |
| 8183 | 8429 |
| 8184 ExtractMethodFeedback(this.offset, this.length, this.returnType, this.names, t
his.canCreateGetter, this.parameters, this.occurrences, this.offsets, this.lengt
hs); | 8430 ExtractMethodFeedback(this.offset, this.length, this.returnType, this.names, t
his.canCreateGetter, this.parameters, this.occurrences, this.offsets, this.lengt
hs); |
| 8185 | 8431 |
| 8186 factory ExtractMethodFeedback.fromJson(JsonDecoder jsonDecoder, String jsonPat
h, Object json) { | 8432 factory ExtractMethodFeedback.fromJson(JsonDecoder jsonDecoder, String jsonPat
h, Object json) { |
| 8433 if (json == null) { |
| 8434 json = {}; |
| 8435 } |
| 8187 if (json is Map) { | 8436 if (json is Map) { |
| 8188 int offset; | 8437 int offset; |
| 8189 if (json.containsKey("offset")) { | 8438 if (json.containsKey("offset")) { |
| 8190 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 8439 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| 8191 } else { | 8440 } else { |
| 8192 throw jsonDecoder.missingKey(jsonPath, "offset"); | 8441 throw jsonDecoder.missingKey(jsonPath, "offset"); |
| 8193 } | 8442 } |
| 8194 int length; | 8443 int length; |
| 8195 if (json.containsKey("length")) { | 8444 if (json.containsKey("length")) { |
| 8196 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); | 8445 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8344 /** | 8593 /** |
| 8345 * True if all occurrences of the expression or statements should be replaced | 8594 * True if all occurrences of the expression or statements should be replaced |
| 8346 * by an invocation of the method. The expression or statements used to | 8595 * by an invocation of the method. The expression or statements used to |
| 8347 * initiate the refactoring will always be replaced. | 8596 * initiate the refactoring will always be replaced. |
| 8348 */ | 8597 */ |
| 8349 final bool extractAll; | 8598 final bool extractAll; |
| 8350 | 8599 |
| 8351 ExtractMethodOptions(this.returnType, this.createGetter, this.name, this.param
eters, this.extractAll); | 8600 ExtractMethodOptions(this.returnType, this.createGetter, this.name, this.param
eters, this.extractAll); |
| 8352 | 8601 |
| 8353 factory ExtractMethodOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { | 8602 factory ExtractMethodOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath
, Object json) { |
| 8603 if (json == null) { |
| 8604 json = {}; |
| 8605 } |
| 8354 if (json is Map) { | 8606 if (json is Map) { |
| 8355 String returnType; | 8607 String returnType; |
| 8356 if (json.containsKey("returnType")) { | 8608 if (json.containsKey("returnType")) { |
| 8357 returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["r
eturnType"]); | 8609 returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["r
eturnType"]); |
| 8358 } else { | 8610 } else { |
| 8359 throw jsonDecoder.missingKey(jsonPath, "returnType"); | 8611 throw jsonDecoder.missingKey(jsonPath, "returnType"); |
| 8360 } | 8612 } |
| 8361 bool createGetter; | 8613 bool createGetter; |
| 8362 if (json.containsKey("createGetter")) { | 8614 if (json.containsKey("createGetter")) { |
| 8363 createGetter = jsonDecoder._decodeBool(jsonPath + ".createGetter", json[
"createGetter"]); | 8615 createGetter = jsonDecoder._decodeBool(jsonPath + ".createGetter", json[
"createGetter"]); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8447 | 8699 |
| 8448 /** | 8700 /** |
| 8449 * True if all invocations of the method should be inlined, or false if only | 8701 * True if all invocations of the method should be inlined, or false if only |
| 8450 * the invocation site used to create this refactoring should be inlined. | 8702 * the invocation site used to create this refactoring should be inlined. |
| 8451 */ | 8703 */ |
| 8452 final bool inlineAll; | 8704 final bool inlineAll; |
| 8453 | 8705 |
| 8454 InlineMethodOptions(this.deleteSource, this.inlineAll); | 8706 InlineMethodOptions(this.deleteSource, this.inlineAll); |
| 8455 | 8707 |
| 8456 factory InlineMethodOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath,
Object json) { | 8708 factory InlineMethodOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath,
Object json) { |
| 8709 if (json == null) { |
| 8710 json = {}; |
| 8711 } |
| 8457 if (json is Map) { | 8712 if (json is Map) { |
| 8458 bool deleteSource; | 8713 bool deleteSource; |
| 8459 if (json.containsKey("deleteSource")) { | 8714 if (json.containsKey("deleteSource")) { |
| 8460 deleteSource = jsonDecoder._decodeBool(jsonPath + ".deleteSource", json[
"deleteSource"]); | 8715 deleteSource = jsonDecoder._decodeBool(jsonPath + ".deleteSource", json[
"deleteSource"]); |
| 8461 } else { | 8716 } else { |
| 8462 throw jsonDecoder.missingKey(jsonPath, "deleteSource"); | 8717 throw jsonDecoder.missingKey(jsonPath, "deleteSource"); |
| 8463 } | 8718 } |
| 8464 bool inlineAll; | 8719 bool inlineAll; |
| 8465 if (json.containsKey("inlineAll")) { | 8720 if (json.containsKey("inlineAll")) { |
| 8466 inlineAll = jsonDecoder._decodeBool(jsonPath + ".inlineAll", json["inlin
eAll"]); | 8721 inlineAll = jsonDecoder._decodeBool(jsonPath + ".inlineAll", json["inlin
eAll"]); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8521 final int offset; | 8776 final int offset; |
| 8522 | 8777 |
| 8523 /** | 8778 /** |
| 8524 * The length of the name selected to be renamed. | 8779 * The length of the name selected to be renamed. |
| 8525 */ | 8780 */ |
| 8526 final int length; | 8781 final int length; |
| 8527 | 8782 |
| 8528 RenameFeedback(this.offset, this.length); | 8783 RenameFeedback(this.offset, this.length); |
| 8529 | 8784 |
| 8530 factory RenameFeedback.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje
ct json) { | 8785 factory RenameFeedback.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje
ct json) { |
| 8786 if (json == null) { |
| 8787 json = {}; |
| 8788 } |
| 8531 if (json is Map) { | 8789 if (json is Map) { |
| 8532 int offset; | 8790 int offset; |
| 8533 if (json.containsKey("offset")) { | 8791 if (json.containsKey("offset")) { |
| 8534 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 8792 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
| 8535 } else { | 8793 } else { |
| 8536 throw jsonDecoder.missingKey(jsonPath, "offset"); | 8794 throw jsonDecoder.missingKey(jsonPath, "offset"); |
| 8537 } | 8795 } |
| 8538 int length; | 8796 int length; |
| 8539 if (json.containsKey("length")) { | 8797 if (json.containsKey("length")) { |
| 8540 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); | 8798 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8589 */ | 8847 */ |
| 8590 class RenameOptions implements HasToJson { | 8848 class RenameOptions implements HasToJson { |
| 8591 /** | 8849 /** |
| 8592 * The name that the element should have after the refactoring. | 8850 * The name that the element should have after the refactoring. |
| 8593 */ | 8851 */ |
| 8594 final String newName; | 8852 final String newName; |
| 8595 | 8853 |
| 8596 RenameOptions(this.newName); | 8854 RenameOptions(this.newName); |
| 8597 | 8855 |
| 8598 factory RenameOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath, Objec
t json) { | 8856 factory RenameOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath, Objec
t json) { |
| 8857 if (json == null) { |
| 8858 json = {}; |
| 8859 } |
| 8599 if (json is Map) { | 8860 if (json is Map) { |
| 8600 String newName; | 8861 String newName; |
| 8601 if (json.containsKey("newName")) { | 8862 if (json.containsKey("newName")) { |
| 8602 newName = jsonDecoder._decodeString(jsonPath + ".newName", json["newName
"]); | 8863 newName = jsonDecoder._decodeString(jsonPath + ".newName", json["newName
"]); |
| 8603 } else { | 8864 } else { |
| 8604 throw jsonDecoder.missingKey(jsonPath, "newName"); | 8865 throw jsonDecoder.missingKey(jsonPath, "newName"); |
| 8605 } | 8866 } |
| 8606 return new RenameOptions(newName); | 8867 return new RenameOptions(newName); |
| 8607 } else { | 8868 } else { |
| 8608 throw jsonDecoder.mismatch(jsonPath, "rename options"); | 8869 throw jsonDecoder.mismatch(jsonPath, "rename options"); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 8631 return false; | 8892 return false; |
| 8632 } | 8893 } |
| 8633 | 8894 |
| 8634 @override | 8895 @override |
| 8635 int get hashCode { | 8896 int get hashCode { |
| 8636 int hash = 0; | 8897 int hash = 0; |
| 8637 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); | 8898 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); |
| 8638 return _JenkinsSmiHash.finish(hash); | 8899 return _JenkinsSmiHash.finish(hash); |
| 8639 } | 8900 } |
| 8640 } | 8901 } |
| OLD | NEW |