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

Side by Side Diff: pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart

Issue 1491013002: Analysis request `getReachableSources` (#24893). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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
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 analysis_server.plugin.protocol.protocol; 9 part of analysis_server.plugin.protocol.protocol;
10 10
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 return false; 931 return false;
932 } 932 }
933 933
934 @override 934 @override
935 int get hashCode { 935 int get hashCode {
936 int hash = 0; 936 int hash = 0;
937 hash = JenkinsSmiHash.combine(hash, hovers.hashCode); 937 hash = JenkinsSmiHash.combine(hash, hovers.hashCode);
938 return JenkinsSmiHash.finish(hash); 938 return JenkinsSmiHash.finish(hash);
939 } 939 }
940 } 940 }
941
942 /**
943 * analysis.getReachableSources params
944 *
945 * {
946 * "file": FilePath
947 * }
948 *
949 * Clients may not extend, implement or mix-in this class.
950 */
951 class AnalysisGetReachableSourcesParams implements HasToJson {
952 String _file;
953
954 /**
955 * The file for which reachable source information is being requested.
956 */
957 String get file => _file;
958
959 /**
960 * The file for which reachable source information is being requested.
961 */
962 void set file(String value) {
963 assert(value != null);
964 this._file = value;
965 }
966
967 AnalysisGetReachableSourcesParams(String file) {
968 this.file = file;
969 }
970
971 factory AnalysisGetReachableSourcesParams.fromJson(JsonDecoder jsonDecoder, St ring jsonPath, Object json) {
972 if (json == null) {
973 json = {};
974 }
975 if (json is Map) {
976 String file;
977 if (json.containsKey("file")) {
978 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
979 } else {
980 throw jsonDecoder.missingKey(jsonPath, "file");
981 }
982 return new AnalysisGetReachableSourcesParams(file);
983 } else {
984 throw jsonDecoder.mismatch(jsonPath, "analysis.getReachableSources params" , json);
985 }
986 }
987
988 factory AnalysisGetReachableSourcesParams.fromRequest(Request request) {
989 return new AnalysisGetReachableSourcesParams.fromJson(
990 new RequestDecoder(request), "params", request._params);
991 }
992
993 Map<String, dynamic> toJson() {
994 Map<String, dynamic> result = {};
995 result["file"] = file;
996 return result;
997 }
998
999 Request toRequest(String id) {
1000 return new Request(id, "analysis.getReachableSources", toJson());
1001 }
1002
1003 @override
1004 String toString() => JSON.encode(toJson());
1005
1006 @override
1007 bool operator==(other) {
1008 if (other is AnalysisGetReachableSourcesParams) {
1009 return file == other.file;
1010 }
1011 return false;
1012 }
1013
1014 @override
1015 int get hashCode {
1016 int hash = 0;
1017 hash = JenkinsSmiHash.combine(hash, file.hashCode);
1018 return JenkinsSmiHash.finish(hash);
1019 }
1020 }
1021
1022 /**
1023 * analysis.getReachableSources result
1024 *
1025 * {
1026 * "sources": Map<String, List<String>>
1027 * }
1028 *
1029 * Clients may not extend, implement or mix-in this class.
1030 */
1031 class AnalysisGetReachableSourcesResult implements HasToJson {
1032 Map<String, List<String>> _sources;
1033
1034 /**
1035 * A mapping from source URIs to directly reachable source URIs. For example,
1036 * a file "foo.dart" that imports "bar.dart" would have the corresponding
1037 * mapping { "file:///foo.dart" : ["file:///bar.dart"] }. If "bar.dart" has
1038 * further imports (or exports) there will be a mapping from the URI
1039 * "file:///bar.dart" to them. To check if a specific URI is reachable from a
1040 * given file, clients can check for its presence in the resulting key set.
1041 */
1042 Map<String, List<String>> get sources => _sources;
1043
1044 /**
1045 * A mapping from source URIs to directly reachable source URIs. For example,
1046 * a file "foo.dart" that imports "bar.dart" would have the corresponding
1047 * mapping { "file:///foo.dart" : ["file:///bar.dart"] }. If "bar.dart" has
1048 * further imports (or exports) there will be a mapping from the URI
1049 * "file:///bar.dart" to them. To check if a specific URI is reachable from a
1050 * given file, clients can check for its presence in the resulting key set.
1051 */
1052 void set sources(Map<String, List<String>> value) {
1053 assert(value != null);
1054 this._sources = value;
1055 }
1056
1057 AnalysisGetReachableSourcesResult(Map<String, List<String>> sources) {
1058 this.sources = sources;
1059 }
1060
1061 factory AnalysisGetReachableSourcesResult.fromJson(JsonDecoder jsonDecoder, St ring jsonPath, Object json) {
1062 if (json == null) {
1063 json = {};
1064 }
1065 if (json is Map) {
1066 Map<String, List<String>> sources;
1067 if (json.containsKey("sources")) {
1068 sources = jsonDecoder.decodeMap(jsonPath + ".sources", json["sources"], valueDecoder: (String jsonPath, Object json) => jsonDecoder.decodeList(jsonPath, json, jsonDecoder.decodeString));
1069 } else {
1070 throw jsonDecoder.missingKey(jsonPath, "sources");
1071 }
1072 return new AnalysisGetReachableSourcesResult(sources);
1073 } else {
1074 throw jsonDecoder.mismatch(jsonPath, "analysis.getReachableSources result" , json);
1075 }
1076 }
1077
1078 factory AnalysisGetReachableSourcesResult.fromResponse(Response response) {
1079 return new AnalysisGetReachableSourcesResult.fromJson(
1080 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), " result", response._result);
1081 }
1082
1083 Map<String, dynamic> toJson() {
1084 Map<String, dynamic> result = {};
1085 result["sources"] = sources;
1086 return result;
1087 }
1088
1089 Response toResponse(String id) {
1090 return new Response(id, result: toJson());
1091 }
1092
1093 @override
1094 String toString() => JSON.encode(toJson());
1095
1096 @override
1097 bool operator==(other) {
1098 if (other is AnalysisGetReachableSourcesResult) {
1099 return mapEqual(sources, other.sources, (List<String> a, List<String> b) = > listEqual(a, b, (String a, String b) => a == b));
1100 }
1101 return false;
1102 }
1103
1104 @override
1105 int get hashCode {
1106 int hash = 0;
1107 hash = JenkinsSmiHash.combine(hash, sources.hashCode);
1108 return JenkinsSmiHash.finish(hash);
1109 }
1110 }
941 /** 1111 /**
942 * analysis.getLibraryDependencies params 1112 * analysis.getLibraryDependencies params
943 * 1113 *
944 * Clients may not extend, implement or mix-in this class. 1114 * Clients may not extend, implement or mix-in this class.
945 */ 1115 */
946 class AnalysisGetLibraryDependenciesParams { 1116 class AnalysisGetLibraryDependenciesParams {
947 Request toRequest(String id) { 1117 Request toRequest(String id) {
948 return new Request(id, "analysis.getLibraryDependencies", null); 1118 return new Request(id, "analysis.getLibraryDependencies", null);
949 } 1119 }
950 1120
(...skipping 15777 matching lines...) Expand 10 before | Expand all | Expand 10 after
16728 return false; 16898 return false;
16729 } 16899 }
16730 16900
16731 @override 16901 @override
16732 int get hashCode { 16902 int get hashCode {
16733 int hash = 0; 16903 int hash = 0;
16734 hash = JenkinsSmiHash.combine(hash, newName.hashCode); 16904 hash = JenkinsSmiHash.combine(hash, newName.hashCode);
16735 return JenkinsSmiHash.finish(hash); 16905 return JenkinsSmiHash.finish(hash);
16736 } 16906 }
16737 } 16907 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698