| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // | 4 // |
| 5 // This file has been automatically generated. Please do not edit it manually. | 5 // This file has been automatically generated. Please do not edit it manually. |
| 6 // To regenerate the file, use the script | 6 // To regenerate the file, use the script |
| 7 // "pkg/analysis_server/tool/spec/generate_files". | 7 // "pkg/analysis_server/tool/spec/generate_files". |
| 8 | 8 |
| 9 part of protocol; | 9 part of protocol; |
| 10 /** | 10 /** |
| (...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 int get hashCode { | 728 int get hashCode { |
| 729 return 246577680; | 729 return 246577680; |
| 730 } | 730 } |
| 731 } | 731 } |
| 732 | 732 |
| 733 /** | 733 /** |
| 734 * analysis.getLibraryDependencies result | 734 * analysis.getLibraryDependencies result |
| 735 * | 735 * |
| 736 * { | 736 * { |
| 737 * "libraries": List<FilePath> | 737 * "libraries": List<FilePath> |
| 738 * "packageMap": Map<String, Map<String, List<FilePath>>> |
| 738 * } | 739 * } |
| 739 */ | 740 */ |
| 740 class AnalysisGetLibraryDependenciesResult implements HasToJson { | 741 class AnalysisGetLibraryDependenciesResult implements HasToJson { |
| 741 /** | 742 /** |
| 742 * A list of the paths of library elements referenced by files in existing | 743 * A list of the paths of library elements referenced by files in existing |
| 743 * analysis roots. | 744 * analysis roots. |
| 744 */ | 745 */ |
| 745 List<String> libraries; | 746 List<String> libraries; |
| 746 | 747 |
| 747 AnalysisGetLibraryDependenciesResult(this.libraries); | 748 /** |
| 749 * A mapping from context source roots to package maps which map package |
| 750 * names to source directories for use in client-side package URI resolution. |
| 751 */ |
| 752 Map<String, Map<String, List<String>>> packageMap; |
| 753 |
| 754 AnalysisGetLibraryDependenciesResult(this.libraries, this.packageMap); |
| 748 | 755 |
| 749 factory AnalysisGetLibraryDependenciesResult.fromJson(JsonDecoder jsonDecoder,
String jsonPath, Object json) { | 756 factory AnalysisGetLibraryDependenciesResult.fromJson(JsonDecoder jsonDecoder,
String jsonPath, Object json) { |
| 750 if (json == null) { | 757 if (json == null) { |
| 751 json = {}; | 758 json = {}; |
| 752 } | 759 } |
| 753 if (json is Map) { | 760 if (json is Map) { |
| 754 List<String> libraries; | 761 List<String> libraries; |
| 755 if (json.containsKey("libraries")) { | 762 if (json.containsKey("libraries")) { |
| 756 libraries = jsonDecoder._decodeList(jsonPath + ".libraries", json["libra
ries"], jsonDecoder._decodeString); | 763 libraries = jsonDecoder._decodeList(jsonPath + ".libraries", json["libra
ries"], jsonDecoder._decodeString); |
| 757 } else { | 764 } else { |
| 758 throw jsonDecoder.missingKey(jsonPath, "libraries"); | 765 throw jsonDecoder.missingKey(jsonPath, "libraries"); |
| 759 } | 766 } |
| 760 return new AnalysisGetLibraryDependenciesResult(libraries); | 767 Map<String, Map<String, List<String>>> packageMap; |
| 768 if (json.containsKey("packageMap")) { |
| 769 packageMap = jsonDecoder._decodeMap(jsonPath + ".packageMap", json["pack
ageMap"], valueDecoder: (String jsonPath, Object json) => jsonDecoder._decodeMap
(jsonPath, json, valueDecoder: (String jsonPath, Object json) => jsonDecoder._de
codeList(jsonPath, json, jsonDecoder._decodeString))); |
| 770 } else { |
| 771 throw jsonDecoder.missingKey(jsonPath, "packageMap"); |
| 772 } |
| 773 return new AnalysisGetLibraryDependenciesResult(libraries, packageMap); |
| 761 } else { | 774 } else { |
| 762 throw jsonDecoder.mismatch(jsonPath, "analysis.getLibraryDependencies resu
lt"); | 775 throw jsonDecoder.mismatch(jsonPath, "analysis.getLibraryDependencies resu
lt"); |
| 763 } | 776 } |
| 764 } | 777 } |
| 765 | 778 |
| 766 factory AnalysisGetLibraryDependenciesResult.fromResponse(Response response) { | 779 factory AnalysisGetLibraryDependenciesResult.fromResponse(Response response) { |
| 767 return new AnalysisGetLibraryDependenciesResult.fromJson( | 780 return new AnalysisGetLibraryDependenciesResult.fromJson( |
| 768 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), "
result", response._result); | 781 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), "
result", response._result); |
| 769 } | 782 } |
| 770 | 783 |
| 771 Map<String, dynamic> toJson() { | 784 Map<String, dynamic> toJson() { |
| 772 Map<String, dynamic> result = {}; | 785 Map<String, dynamic> result = {}; |
| 773 result["libraries"] = libraries; | 786 result["libraries"] = libraries; |
| 787 result["packageMap"] = packageMap; |
| 774 return result; | 788 return result; |
| 775 } | 789 } |
| 776 | 790 |
| 777 Response toResponse(String id) { | 791 Response toResponse(String id) { |
| 778 return new Response(id, result: toJson()); | 792 return new Response(id, result: toJson()); |
| 779 } | 793 } |
| 780 | 794 |
| 781 @override | 795 @override |
| 782 String toString() => JSON.encode(toJson()); | 796 String toString() => JSON.encode(toJson()); |
| 783 | 797 |
| 784 @override | 798 @override |
| 785 bool operator==(other) { | 799 bool operator==(other) { |
| 786 if (other is AnalysisGetLibraryDependenciesResult) { | 800 if (other is AnalysisGetLibraryDependenciesResult) { |
| 787 return _listEqual(libraries, other.libraries, (String a, String b) => a ==
b); | 801 return _listEqual(libraries, other.libraries, (String a, String b) => a ==
b) && |
| 802 _mapEqual(packageMap, other.packageMap, (Map<String, List<String>> a,
Map<String, List<String>> b) => _mapEqual(a, b, (List<String> a, List<String> b)
=> _listEqual(a, b, (String a, String b) => a == b))); |
| 788 } | 803 } |
| 789 return false; | 804 return false; |
| 790 } | 805 } |
| 791 | 806 |
| 792 @override | 807 @override |
| 793 int get hashCode { | 808 int get hashCode { |
| 794 int hash = 0; | 809 int hash = 0; |
| 795 hash = _JenkinsSmiHash.combine(hash, libraries.hashCode); | 810 hash = _JenkinsSmiHash.combine(hash, libraries.hashCode); |
| 811 hash = _JenkinsSmiHash.combine(hash, packageMap.hashCode); |
| 796 return _JenkinsSmiHash.finish(hash); | 812 return _JenkinsSmiHash.finish(hash); |
| 797 } | 813 } |
| 798 } | 814 } |
| 799 | 815 |
| 800 /** | 816 /** |
| 801 * analysis.getNavigation params | 817 * analysis.getNavigation params |
| 802 * | 818 * |
| 803 * { | 819 * { |
| 804 * "file": FilePath | 820 * "file": FilePath |
| 805 * "offset": int | 821 * "offset": int |
| (...skipping 10358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11164 return false; | 11180 return false; |
| 11165 } | 11181 } |
| 11166 | 11182 |
| 11167 @override | 11183 @override |
| 11168 int get hashCode { | 11184 int get hashCode { |
| 11169 int hash = 0; | 11185 int hash = 0; |
| 11170 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); | 11186 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); |
| 11171 return _JenkinsSmiHash.finish(hash); | 11187 return _JenkinsSmiHash.finish(hash); |
| 11172 } | 11188 } |
| 11173 } | 11189 } |
| OLD | NEW |