Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Side by Side Diff: pkg/analysis_server/lib/src/generated_protocol.dart

Issue 625413002: Remove special list behavior in analysis server protocol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script 6 // To regenerate the file, use the script
7 // "pkg/analysis_server/tool/spec/generate_files". 7 // "pkg/analysis_server/tool/spec/generate_files".
8 8
9 part of protocol; 9 part of protocol;
10 /** 10 /**
(...skipping 2780 matching lines...) Expand 10 before | Expand all | Expand 10 after
2791 * requested. The index of other elements of the list is unspecified, but 2791 * requested. The index of other elements of the list is unspecified, but
2792 * correspond to the integers used to reference supertype and subtype items 2792 * correspond to the integers used to reference supertype and subtype items
2793 * within the items. 2793 * within the items.
2794 * 2794 *
2795 * This field will be absent if the code at the given file and offset does 2795 * This field will be absent if the code at the given file and offset does
2796 * not represent a type, or if the file has not been sufficiently analyzed to 2796 * not represent a type, or if the file has not been sufficiently analyzed to
2797 * allow a type hierarchy to be produced. 2797 * allow a type hierarchy to be produced.
2798 */ 2798 */
2799 List<TypeHierarchyItem> hierarchyItems; 2799 List<TypeHierarchyItem> hierarchyItems;
2800 2800
2801 SearchGetTypeHierarchyResult({this.hierarchyItems}) { 2801 SearchGetTypeHierarchyResult({this.hierarchyItems});
2802 if (hierarchyItems == null) {
2803 hierarchyItems = <TypeHierarchyItem>[];
2804 }
2805 }
2806 2802
2807 factory SearchGetTypeHierarchyResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 2803 factory SearchGetTypeHierarchyResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
2808 if (json == null) { 2804 if (json == null) {
2809 json = {}; 2805 json = {};
2810 } 2806 }
2811 if (json is Map) { 2807 if (json is Map) {
2812 List<TypeHierarchyItem> hierarchyItems; 2808 List<TypeHierarchyItem> hierarchyItems;
2813 if (json.containsKey("hierarchyItems")) { 2809 if (json.containsKey("hierarchyItems")) {
2814 hierarchyItems = jsonDecoder._decodeList(jsonPath + ".hierarchyItems", j son["hierarchyItems"], (String jsonPath, Object json) => new TypeHierarchyItem.f romJson(jsonDecoder, jsonPath, json)); 2810 hierarchyItems = jsonDecoder._decodeList(jsonPath + ".hierarchyItems", j son["hierarchyItems"], (String jsonPath, Object json) => new TypeHierarchyItem.f romJson(jsonDecoder, jsonPath, json));
2815 } else {
2816 hierarchyItems = <TypeHierarchyItem>[];
2817 } 2811 }
2818 return new SearchGetTypeHierarchyResult(hierarchyItems: hierarchyItems); 2812 return new SearchGetTypeHierarchyResult(hierarchyItems: hierarchyItems);
2819 } else { 2813 } else {
2820 throw jsonDecoder.mismatch(jsonPath, "search.getTypeHierarchy result"); 2814 throw jsonDecoder.mismatch(jsonPath, "search.getTypeHierarchy result");
2821 } 2815 }
2822 } 2816 }
2823 2817
2824 factory SearchGetTypeHierarchyResult.fromResponse(Response response) { 2818 factory SearchGetTypeHierarchyResult.fromResponse(Response response) {
2825 return new SearchGetTypeHierarchyResult.fromJson( 2819 return new SearchGetTypeHierarchyResult.fromJson(
2826 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), " result", response._result); 2820 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), " result", response._result);
2827 } 2821 }
2828 2822
2829 Map<String, dynamic> toJson() { 2823 Map<String, dynamic> toJson() {
2830 Map<String, dynamic> result = {}; 2824 Map<String, dynamic> result = {};
2831 if (hierarchyItems.isNotEmpty) { 2825 if (hierarchyItems != null) {
2832 result["hierarchyItems"] = hierarchyItems.map((TypeHierarchyItem value) => value.toJson()).toList(); 2826 result["hierarchyItems"] = hierarchyItems.map((TypeHierarchyItem value) => value.toJson()).toList();
2833 } 2827 }
2834 return result; 2828 return result;
2835 } 2829 }
2836 2830
2837 Response toResponse(String id) { 2831 Response toResponse(String id) {
2838 return new Response(id, result: toJson()); 2832 return new Response(id, result: toJson());
2839 } 2833 }
2840 2834
2841 @override 2835 @override
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
3626 /** 3620 /**
3627 * The ids of source edits that are not known to be valid. An edit is not 3621 * The ids of source edits that are not known to be valid. An edit is not
3628 * known to be valid if there was insufficient type information for the 3622 * known to be valid if there was insufficient type information for the
3629 * server to be able to determine whether or not the code needs to be 3623 * server to be able to determine whether or not the code needs to be
3630 * modified, such as when a member is being renamed and there is a reference 3624 * modified, such as when a member is being renamed and there is a reference
3631 * to a member from an unknown type. This field will be omitted if the change 3625 * to a member from an unknown type. This field will be omitted if the change
3632 * field is omitted or if there are no potential edits for the refactoring. 3626 * field is omitted or if there are no potential edits for the refactoring.
3633 */ 3627 */
3634 List<String> potentialEdits; 3628 List<String> potentialEdits;
3635 3629
3636 EditGetRefactoringResult(this.initialProblems, this.optionsProblems, this.fina lProblems, {this.feedback, this.change, this.potentialEdits}) { 3630 EditGetRefactoringResult(this.initialProblems, this.optionsProblems, this.fina lProblems, {this.feedback, this.change, this.potentialEdits});
3637 if (potentialEdits == null) {
3638 potentialEdits = <String>[];
3639 }
3640 }
3641 3631
3642 factory EditGetRefactoringResult.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) { 3632 factory EditGetRefactoringResult.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) {
3643 if (json == null) { 3633 if (json == null) {
3644 json = {}; 3634 json = {};
3645 } 3635 }
3646 if (json is Map) { 3636 if (json is Map) {
3647 List<RefactoringProblem> initialProblems; 3637 List<RefactoringProblem> initialProblems;
3648 if (json.containsKey("initialProblems")) { 3638 if (json.containsKey("initialProblems")) {
3649 initialProblems = jsonDecoder._decodeList(jsonPath + ".initialProblems", json["initialProblems"], (String jsonPath, Object json) => new RefactoringProbl em.fromJson(jsonDecoder, jsonPath, json)); 3639 initialProblems = jsonDecoder._decodeList(jsonPath + ".initialProblems", json["initialProblems"], (String jsonPath, Object json) => new RefactoringProbl em.fromJson(jsonDecoder, jsonPath, json));
3650 } else { 3640 } else {
(...skipping 15 matching lines...) Expand all
3666 if (json.containsKey("feedback")) { 3656 if (json.containsKey("feedback")) {
3667 feedback = new RefactoringFeedback.fromJson(jsonDecoder, jsonPath + ".fe edback", json["feedback"], json); 3657 feedback = new RefactoringFeedback.fromJson(jsonDecoder, jsonPath + ".fe edback", json["feedback"], json);
3668 } 3658 }
3669 SourceChange change; 3659 SourceChange change;
3670 if (json.containsKey("change")) { 3660 if (json.containsKey("change")) {
3671 change = new SourceChange.fromJson(jsonDecoder, jsonPath + ".change", js on["change"]); 3661 change = new SourceChange.fromJson(jsonDecoder, jsonPath + ".change", js on["change"]);
3672 } 3662 }
3673 List<String> potentialEdits; 3663 List<String> potentialEdits;
3674 if (json.containsKey("potentialEdits")) { 3664 if (json.containsKey("potentialEdits")) {
3675 potentialEdits = jsonDecoder._decodeList(jsonPath + ".potentialEdits", j son["potentialEdits"], jsonDecoder._decodeString); 3665 potentialEdits = jsonDecoder._decodeList(jsonPath + ".potentialEdits", j son["potentialEdits"], jsonDecoder._decodeString);
3676 } else {
3677 potentialEdits = <String>[];
3678 } 3666 }
3679 return new EditGetRefactoringResult(initialProblems, optionsProblems, fina lProblems, feedback: feedback, change: change, potentialEdits: potentialEdits); 3667 return new EditGetRefactoringResult(initialProblems, optionsProblems, fina lProblems, feedback: feedback, change: change, potentialEdits: potentialEdits);
3680 } else { 3668 } else {
3681 throw jsonDecoder.mismatch(jsonPath, "edit.getRefactoring result"); 3669 throw jsonDecoder.mismatch(jsonPath, "edit.getRefactoring result");
3682 } 3670 }
3683 } 3671 }
3684 3672
3685 factory EditGetRefactoringResult.fromResponse(Response response) { 3673 factory EditGetRefactoringResult.fromResponse(Response response) {
3686 return new EditGetRefactoringResult.fromJson( 3674 return new EditGetRefactoringResult.fromJson(
3687 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), " result", response._result); 3675 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), " result", response._result);
3688 } 3676 }
3689 3677
3690 Map<String, dynamic> toJson() { 3678 Map<String, dynamic> toJson() {
3691 Map<String, dynamic> result = {}; 3679 Map<String, dynamic> result = {};
3692 result["initialProblems"] = initialProblems.map((RefactoringProblem value) = > value.toJson()).toList(); 3680 result["initialProblems"] = initialProblems.map((RefactoringProblem value) = > value.toJson()).toList();
3693 result["optionsProblems"] = optionsProblems.map((RefactoringProblem value) = > value.toJson()).toList(); 3681 result["optionsProblems"] = optionsProblems.map((RefactoringProblem value) = > value.toJson()).toList();
3694 result["finalProblems"] = finalProblems.map((RefactoringProblem value) => va lue.toJson()).toList(); 3682 result["finalProblems"] = finalProblems.map((RefactoringProblem value) => va lue.toJson()).toList();
3695 if (feedback != null) { 3683 if (feedback != null) {
3696 result["feedback"] = feedback.toJson(); 3684 result["feedback"] = feedback.toJson();
3697 } 3685 }
3698 if (change != null) { 3686 if (change != null) {
3699 result["change"] = change.toJson(); 3687 result["change"] = change.toJson();
3700 } 3688 }
3701 if (potentialEdits.isNotEmpty) { 3689 if (potentialEdits != null) {
3702 result["potentialEdits"] = potentialEdits; 3690 result["potentialEdits"] = potentialEdits;
3703 } 3691 }
3704 return result; 3692 return result;
3705 } 3693 }
3706 3694
3707 Response toResponse(String id) { 3695 Response toResponse(String id) {
3708 return new Response(id, result: toJson()); 3696 return new Response(id, result: toJson());
3709 } 3697 }
3710 3698
3711 @override 3699 @override
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
4376 * a Dart file. 4364 * a Dart file.
4377 */ 4365 */
4378 ExecutableKind kind; 4366 ExecutableKind kind;
4379 4367
4380 /** 4368 /**
4381 * A list of the Dart files that are referenced by the file. This field is 4369 * A list of the Dart files that are referenced by the file. This field is
4382 * omitted if the file is not an HTML file. 4370 * omitted if the file is not an HTML file.
4383 */ 4371 */
4384 List<String> referencedFiles; 4372 List<String> referencedFiles;
4385 4373
4386 ExecutionLaunchDataParams(this.file, {this.kind, this.referencedFiles}) { 4374 ExecutionLaunchDataParams(this.file, {this.kind, this.referencedFiles});
4387 if (referencedFiles == null) {
4388 referencedFiles = <String>[];
4389 }
4390 }
4391 4375
4392 factory ExecutionLaunchDataParams.fromJson(JsonDecoder jsonDecoder, String jso nPath, Object json) { 4376 factory ExecutionLaunchDataParams.fromJson(JsonDecoder jsonDecoder, String jso nPath, Object json) {
4393 if (json == null) { 4377 if (json == null) {
4394 json = {}; 4378 json = {};
4395 } 4379 }
4396 if (json is Map) { 4380 if (json is Map) {
4397 String file; 4381 String file;
4398 if (json.containsKey("file")) { 4382 if (json.containsKey("file")) {
4399 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); 4383 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
4400 } else { 4384 } else {
4401 throw jsonDecoder.missingKey(jsonPath, "file"); 4385 throw jsonDecoder.missingKey(jsonPath, "file");
4402 } 4386 }
4403 ExecutableKind kind; 4387 ExecutableKind kind;
4404 if (json.containsKey("kind")) { 4388 if (json.containsKey("kind")) {
4405 kind = new ExecutableKind.fromJson(jsonDecoder, jsonPath + ".kind", json ["kind"]); 4389 kind = new ExecutableKind.fromJson(jsonDecoder, jsonPath + ".kind", json ["kind"]);
4406 } 4390 }
4407 List<String> referencedFiles; 4391 List<String> referencedFiles;
4408 if (json.containsKey("referencedFiles")) { 4392 if (json.containsKey("referencedFiles")) {
4409 referencedFiles = jsonDecoder._decodeList(jsonPath + ".referencedFiles", json["referencedFiles"], jsonDecoder._decodeString); 4393 referencedFiles = jsonDecoder._decodeList(jsonPath + ".referencedFiles", json["referencedFiles"], jsonDecoder._decodeString);
4410 } else {
4411 referencedFiles = <String>[];
4412 } 4394 }
4413 return new ExecutionLaunchDataParams(file, kind: kind, referencedFiles: re ferencedFiles); 4395 return new ExecutionLaunchDataParams(file, kind: kind, referencedFiles: re ferencedFiles);
4414 } else { 4396 } else {
4415 throw jsonDecoder.mismatch(jsonPath, "execution.launchData params"); 4397 throw jsonDecoder.mismatch(jsonPath, "execution.launchData params");
4416 } 4398 }
4417 } 4399 }
4418 4400
4419 factory ExecutionLaunchDataParams.fromNotification(Notification notification) { 4401 factory ExecutionLaunchDataParams.fromNotification(Notification notification) {
4420 return new ExecutionLaunchDataParams.fromJson( 4402 return new ExecutionLaunchDataParams.fromJson(
4421 new ResponseDecoder(null), "params", notification._params); 4403 new ResponseDecoder(null), "params", notification._params);
4422 } 4404 }
4423 4405
4424 Map<String, dynamic> toJson() { 4406 Map<String, dynamic> toJson() {
4425 Map<String, dynamic> result = {}; 4407 Map<String, dynamic> result = {};
4426 result["file"] = file; 4408 result["file"] = file;
4427 if (kind != null) { 4409 if (kind != null) {
4428 result["kind"] = kind.toJson(); 4410 result["kind"] = kind.toJson();
4429 } 4411 }
4430 if (referencedFiles.isNotEmpty) { 4412 if (referencedFiles != null) {
4431 result["referencedFiles"] = referencedFiles; 4413 result["referencedFiles"] = referencedFiles;
4432 } 4414 }
4433 return result; 4415 return result;
4434 } 4416 }
4435 4417
4436 Notification toNotification() { 4418 Notification toNotification() {
4437 return new Notification("execution.launchData", toJson()); 4419 return new Notification("execution.launchData", toJson());
4438 } 4420 }
4439 4421
4440 @override 4422 @override
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
5358 * argument list. 5340 * argument list.
5359 */ 5341 */
5360 String parameterName; 5342 String parameterName;
5361 5343
5362 /** 5344 /**
5363 * The type of the options parameter being suggested. This field is omitted 5345 * The type of the options parameter being suggested. This field is omitted
5364 * if the parameterName field is omitted. 5346 * if the parameterName field is omitted.
5365 */ 5347 */
5366 String parameterType; 5348 String parameterType;
5367 5349
5368 CompletionSuggestion(this.kind, this.relevance, this.completion, this.selectio nOffset, this.selectionLength, this.isDeprecated, this.isPotential, {this.docSum mary, this.docComplete, this.declaringType, this.element, this.returnType, this. parameterNames, this.parameterTypes, this.requiredParameterCount, this.positiona lParameterCount, this.parameterName, this.parameterType}) { 5350 CompletionSuggestion(this.kind, this.relevance, this.completion, this.selectio nOffset, this.selectionLength, this.isDeprecated, this.isPotential, {this.docSum mary, this.docComplete, this.declaringType, this.element, this.returnType, this. parameterNames, this.parameterTypes, this.requiredParameterCount, this.positiona lParameterCount, this.parameterName, this.parameterType});
5369 if (parameterNames == null) {
5370 parameterNames = <String>[];
5371 }
5372 if (parameterTypes == null) {
5373 parameterTypes = <String>[];
5374 }
5375 }
5376 5351
5377 factory CompletionSuggestion.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) { 5352 factory CompletionSuggestion.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) {
5378 if (json == null) { 5353 if (json == null) {
5379 json = {}; 5354 json = {};
5380 } 5355 }
5381 if (json is Map) { 5356 if (json is Map) {
5382 CompletionSuggestionKind kind; 5357 CompletionSuggestionKind kind;
5383 if (json.containsKey("kind")) { 5358 if (json.containsKey("kind")) {
5384 kind = new CompletionSuggestionKind.fromJson(jsonDecoder, jsonPath + ".k ind", json["kind"]); 5359 kind = new CompletionSuggestionKind.fromJson(jsonDecoder, jsonPath + ".k ind", json["kind"]);
5385 } else { 5360 } else {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
5437 if (json.containsKey("element")) { 5412 if (json.containsKey("element")) {
5438 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[ "element"]); 5413 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[ "element"]);
5439 } 5414 }
5440 String returnType; 5415 String returnType;
5441 if (json.containsKey("returnType")) { 5416 if (json.containsKey("returnType")) {
5442 returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["r eturnType"]); 5417 returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["r eturnType"]);
5443 } 5418 }
5444 List<String> parameterNames; 5419 List<String> parameterNames;
5445 if (json.containsKey("parameterNames")) { 5420 if (json.containsKey("parameterNames")) {
5446 parameterNames = jsonDecoder._decodeList(jsonPath + ".parameterNames", j son["parameterNames"], jsonDecoder._decodeString); 5421 parameterNames = jsonDecoder._decodeList(jsonPath + ".parameterNames", j son["parameterNames"], jsonDecoder._decodeString);
5447 } else {
5448 parameterNames = <String>[];
5449 } 5422 }
5450 List<String> parameterTypes; 5423 List<String> parameterTypes;
5451 if (json.containsKey("parameterTypes")) { 5424 if (json.containsKey("parameterTypes")) {
5452 parameterTypes = jsonDecoder._decodeList(jsonPath + ".parameterTypes", j son["parameterTypes"], jsonDecoder._decodeString); 5425 parameterTypes = jsonDecoder._decodeList(jsonPath + ".parameterTypes", j son["parameterTypes"], jsonDecoder._decodeString);
5453 } else {
5454 parameterTypes = <String>[];
5455 } 5426 }
5456 int requiredParameterCount; 5427 int requiredParameterCount;
5457 if (json.containsKey("requiredParameterCount")) { 5428 if (json.containsKey("requiredParameterCount")) {
5458 requiredParameterCount = jsonDecoder._decodeInt(jsonPath + ".requiredPar ameterCount", json["requiredParameterCount"]); 5429 requiredParameterCount = jsonDecoder._decodeInt(jsonPath + ".requiredPar ameterCount", json["requiredParameterCount"]);
5459 } 5430 }
5460 int positionalParameterCount; 5431 int positionalParameterCount;
5461 if (json.containsKey("positionalParameterCount")) { 5432 if (json.containsKey("positionalParameterCount")) {
5462 positionalParameterCount = jsonDecoder._decodeInt(jsonPath + ".positiona lParameterCount", json["positionalParameterCount"]); 5433 positionalParameterCount = jsonDecoder._decodeInt(jsonPath + ".positiona lParameterCount", json["positionalParameterCount"]);
5463 } 5434 }
5464 String parameterName; 5435 String parameterName;
(...skipping 27 matching lines...) Expand all
5492 } 5463 }
5493 if (declaringType != null) { 5464 if (declaringType != null) {
5494 result["declaringType"] = declaringType; 5465 result["declaringType"] = declaringType;
5495 } 5466 }
5496 if (element != null) { 5467 if (element != null) {
5497 result["element"] = element.toJson(); 5468 result["element"] = element.toJson();
5498 } 5469 }
5499 if (returnType != null) { 5470 if (returnType != null) {
5500 result["returnType"] = returnType; 5471 result["returnType"] = returnType;
5501 } 5472 }
5502 if (parameterNames.isNotEmpty) { 5473 if (parameterNames != null) {
5503 result["parameterNames"] = parameterNames; 5474 result["parameterNames"] = parameterNames;
5504 } 5475 }
5505 if (parameterTypes.isNotEmpty) { 5476 if (parameterTypes != null) {
5506 result["parameterTypes"] = parameterTypes; 5477 result["parameterTypes"] = parameterTypes;
5507 } 5478 }
5508 if (requiredParameterCount != null) { 5479 if (requiredParameterCount != null) {
5509 result["requiredParameterCount"] = requiredParameterCount; 5480 result["requiredParameterCount"] = requiredParameterCount;
5510 } 5481 }
5511 if (positionalParameterCount != null) { 5482 if (positionalParameterCount != null) {
5512 result["positionalParameterCount"] = positionalParameterCount; 5483 result["positionalParameterCount"] = positionalParameterCount;
5513 } 5484 }
5514 if (parameterName != null) { 5485 if (parameterName != null) {
5515 result["parameterName"] = parameterName; 5486 result["parameterName"] = parameterName;
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
7435 * The length of the element. 7406 * The length of the element.
7436 */ 7407 */
7437 int length; 7408 int length;
7438 7409
7439 /** 7410 /**
7440 * The children of the node. The field will be omitted if the node has no 7411 * The children of the node. The field will be omitted if the node has no
7441 * children. 7412 * children.
7442 */ 7413 */
7443 List<Outline> children; 7414 List<Outline> children;
7444 7415
7445 Outline(this.element, this.offset, this.length, {this.children}) { 7416 Outline(this.element, this.offset, this.length, {this.children});
7446 if (children == null) {
7447 children = <Outline>[];
7448 }
7449 }
7450 7417
7451 factory Outline.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json ) { 7418 factory Outline.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json ) {
7452 if (json == null) { 7419 if (json == null) {
7453 json = {}; 7420 json = {};
7454 } 7421 }
7455 if (json is Map) { 7422 if (json is Map) {
7456 Element element; 7423 Element element;
7457 if (json.containsKey("element")) { 7424 if (json.containsKey("element")) {
7458 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[ "element"]); 7425 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[ "element"]);
7459 } else { 7426 } else {
7460 throw jsonDecoder.missingKey(jsonPath, "element"); 7427 throw jsonDecoder.missingKey(jsonPath, "element");
7461 } 7428 }
7462 int offset; 7429 int offset;
7463 if (json.containsKey("offset")) { 7430 if (json.containsKey("offset")) {
7464 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); 7431 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
7465 } else { 7432 } else {
7466 throw jsonDecoder.missingKey(jsonPath, "offset"); 7433 throw jsonDecoder.missingKey(jsonPath, "offset");
7467 } 7434 }
7468 int length; 7435 int length;
7469 if (json.containsKey("length")) { 7436 if (json.containsKey("length")) {
7470 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); 7437 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
7471 } else { 7438 } else {
7472 throw jsonDecoder.missingKey(jsonPath, "length"); 7439 throw jsonDecoder.missingKey(jsonPath, "length");
7473 } 7440 }
7474 List<Outline> children; 7441 List<Outline> children;
7475 if (json.containsKey("children")) { 7442 if (json.containsKey("children")) {
7476 children = jsonDecoder._decodeList(jsonPath + ".children", json["childre n"], (String jsonPath, Object json) => new Outline.fromJson(jsonDecoder, jsonPat h, json)); 7443 children = jsonDecoder._decodeList(jsonPath + ".children", json["childre n"], (String jsonPath, Object json) => new Outline.fromJson(jsonDecoder, jsonPat h, json));
7477 } else {
7478 children = <Outline>[];
7479 } 7444 }
7480 return new Outline(element, offset, length, children: children); 7445 return new Outline(element, offset, length, children: children);
7481 } else { 7446 } else {
7482 throw jsonDecoder.mismatch(jsonPath, "Outline"); 7447 throw jsonDecoder.mismatch(jsonPath, "Outline");
7483 } 7448 }
7484 } 7449 }
7485 7450
7486 Map<String, dynamic> toJson() { 7451 Map<String, dynamic> toJson() {
7487 Map<String, dynamic> result = {}; 7452 Map<String, dynamic> result = {};
7488 result["element"] = element.toJson(); 7453 result["element"] = element.toJson();
7489 result["offset"] = offset; 7454 result["offset"] = offset;
7490 result["length"] = length; 7455 result["length"] = length;
7491 if (children.isNotEmpty) { 7456 if (children != null) {
7492 result["children"] = children.map((Outline value) => value.toJson()).toLis t(); 7457 result["children"] = children.map((Outline value) => value.toJson()).toLis t();
7493 } 7458 }
7494 return result; 7459 return result;
7495 } 7460 }
7496 7461
7497 @override 7462 @override
7498 String toString() => JSON.encode(toJson()); 7463 String toString() => JSON.encode(toJson());
7499 7464
7500 @override 7465 @override
7501 bool operator==(other) { 7466 bool operator==(other) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
7547 */ 7512 */
7548 OverriddenMember superclassMember; 7513 OverriddenMember superclassMember;
7549 7514
7550 /** 7515 /**
7551 * The members inherited from interfaces that are overridden by the 7516 * The members inherited from interfaces that are overridden by the
7552 * overriding member. The field is omitted if there are no interface members, 7517 * overriding member. The field is omitted if there are no interface members,
7553 * in which case there must be a superclass member. 7518 * in which case there must be a superclass member.
7554 */ 7519 */
7555 List<OverriddenMember> interfaceMembers; 7520 List<OverriddenMember> interfaceMembers;
7556 7521
7557 Override(this.offset, this.length, {this.superclassMember, this.interfaceMembe rs}) { 7522 Override(this.offset, this.length, {this.superclassMember, this.interfaceMembe rs});
7558 if (interfaceMembers == null) {
7559 interfaceMembers = <OverriddenMember>[];
7560 }
7561 }
7562 7523
7563 factory Override.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object jso n) { 7524 factory Override.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object jso n) {
7564 if (json == null) { 7525 if (json == null) {
7565 json = {}; 7526 json = {};
7566 } 7527 }
7567 if (json is Map) { 7528 if (json is Map) {
7568 int offset; 7529 int offset;
7569 if (json.containsKey("offset")) { 7530 if (json.containsKey("offset")) {
7570 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); 7531 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
7571 } else { 7532 } else {
7572 throw jsonDecoder.missingKey(jsonPath, "offset"); 7533 throw jsonDecoder.missingKey(jsonPath, "offset");
7573 } 7534 }
7574 int length; 7535 int length;
7575 if (json.containsKey("length")) { 7536 if (json.containsKey("length")) {
7576 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); 7537 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
7577 } else { 7538 } else {
7578 throw jsonDecoder.missingKey(jsonPath, "length"); 7539 throw jsonDecoder.missingKey(jsonPath, "length");
7579 } 7540 }
7580 OverriddenMember superclassMember; 7541 OverriddenMember superclassMember;
7581 if (json.containsKey("superclassMember")) { 7542 if (json.containsKey("superclassMember")) {
7582 superclassMember = new OverriddenMember.fromJson(jsonDecoder, jsonPath + ".superclassMember", json["superclassMember"]); 7543 superclassMember = new OverriddenMember.fromJson(jsonDecoder, jsonPath + ".superclassMember", json["superclassMember"]);
7583 } 7544 }
7584 List<OverriddenMember> interfaceMembers; 7545 List<OverriddenMember> interfaceMembers;
7585 if (json.containsKey("interfaceMembers")) { 7546 if (json.containsKey("interfaceMembers")) {
7586 interfaceMembers = jsonDecoder._decodeList(jsonPath + ".interfaceMembers ", json["interfaceMembers"], (String jsonPath, Object json) => new OverriddenMem ber.fromJson(jsonDecoder, jsonPath, json)); 7547 interfaceMembers = jsonDecoder._decodeList(jsonPath + ".interfaceMembers ", json["interfaceMembers"], (String jsonPath, Object json) => new OverriddenMem ber.fromJson(jsonDecoder, jsonPath, json));
7587 } else {
7588 interfaceMembers = <OverriddenMember>[];
7589 } 7548 }
7590 return new Override(offset, length, superclassMember: superclassMember, in terfaceMembers: interfaceMembers); 7549 return new Override(offset, length, superclassMember: superclassMember, in terfaceMembers: interfaceMembers);
7591 } else { 7550 } else {
7592 throw jsonDecoder.mismatch(jsonPath, "Override"); 7551 throw jsonDecoder.mismatch(jsonPath, "Override");
7593 } 7552 }
7594 } 7553 }
7595 7554
7596 Map<String, dynamic> toJson() { 7555 Map<String, dynamic> toJson() {
7597 Map<String, dynamic> result = {}; 7556 Map<String, dynamic> result = {};
7598 result["offset"] = offset; 7557 result["offset"] = offset;
7599 result["length"] = length; 7558 result["length"] = length;
7600 if (superclassMember != null) { 7559 if (superclassMember != null) {
7601 result["superclassMember"] = superclassMember.toJson(); 7560 result["superclassMember"] = superclassMember.toJson();
7602 } 7561 }
7603 if (interfaceMembers.isNotEmpty) { 7562 if (interfaceMembers != null) {
7604 result["interfaceMembers"] = interfaceMembers.map((OverriddenMember value) => value.toJson()).toList(); 7563 result["interfaceMembers"] = interfaceMembers.map((OverriddenMember value) => value.toJson()).toList();
7605 } 7564 }
7606 return result; 7565 return result;
7607 } 7566 }
7608 7567
7609 @override 7568 @override
7610 String toString() => JSON.encode(toJson()); 7569 String toString() => JSON.encode(toJson());
7611 7570
7612 @override 7571 @override
7613 bool operator==(other) { 7572 bool operator==(other) {
(...skipping 2754 matching lines...) Expand 10 before | Expand all | Expand 10 after
10368 return false; 10327 return false;
10369 } 10328 }
10370 10329
10371 @override 10330 @override
10372 int get hashCode { 10331 int get hashCode {
10373 int hash = 0; 10332 int hash = 0;
10374 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); 10333 hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
10375 return _JenkinsSmiHash.finish(hash); 10334 return _JenkinsSmiHash.finish(hash);
10376 } 10335 }
10377 } 10336 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/edit/edit_domain.dart ('k') | pkg/analysis_server/lib/src/protocol.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698