| 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 protocol; | 9 part of protocol; |
| 10 /** | 10 /** |
| (...skipping 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2208 hash = _JenkinsSmiHash.combine(hash, offset.hashCode); | 2208 hash = _JenkinsSmiHash.combine(hash, offset.hashCode); |
| 2209 hash = _JenkinsSmiHash.combine(hash, includePotential.hashCode); | 2209 hash = _JenkinsSmiHash.combine(hash, includePotential.hashCode); |
| 2210 return _JenkinsSmiHash.finish(hash); | 2210 return _JenkinsSmiHash.finish(hash); |
| 2211 } | 2211 } |
| 2212 } | 2212 } |
| 2213 | 2213 |
| 2214 /** | 2214 /** |
| 2215 * search.findElementReferences result | 2215 * search.findElementReferences result |
| 2216 * | 2216 * |
| 2217 * { | 2217 * { |
| 2218 * "id": SearchId | 2218 * "id": optional SearchId |
| 2219 * "element": optional Element | 2219 * "element": optional Element |
| 2220 * } | 2220 * } |
| 2221 */ | 2221 */ |
| 2222 class SearchFindElementReferencesResult implements HasToJson { | 2222 class SearchFindElementReferencesResult implements HasToJson { |
| 2223 /** | 2223 /** |
| 2224 * The identifier used to associate results with this search request. | 2224 * The identifier used to associate results with this search request. |
| 2225 * |
| 2226 * If no element was found at the given location, this field will be absent, |
| 2227 * and no results will be reported via the search.results notification. |
| 2225 */ | 2228 */ |
| 2226 String id; | 2229 String id; |
| 2227 | 2230 |
| 2228 /** | 2231 /** |
| 2229 * The element referenced or defined at the given offset and whose references | 2232 * The element referenced or defined at the given offset and whose references |
| 2230 * will be returned in the search results. | 2233 * will be returned in the search results. |
| 2231 * | 2234 * |
| 2232 * If no element was found at the given location, this field will be absent. | 2235 * If no element was found at the given location, this field will be absent. |
| 2233 */ | 2236 */ |
| 2234 Element element; | 2237 Element element; |
| 2235 | 2238 |
| 2236 SearchFindElementReferencesResult(this.id, {this.element}); | 2239 SearchFindElementReferencesResult({this.id, this.element}); |
| 2237 | 2240 |
| 2238 factory SearchFindElementReferencesResult.fromJson(JsonDecoder jsonDecoder, St
ring jsonPath, Object json) { | 2241 factory SearchFindElementReferencesResult.fromJson(JsonDecoder jsonDecoder, St
ring jsonPath, Object json) { |
| 2239 if (json == null) { | 2242 if (json == null) { |
| 2240 json = {}; | 2243 json = {}; |
| 2241 } | 2244 } |
| 2242 if (json is Map) { | 2245 if (json is Map) { |
| 2243 String id; | 2246 String id; |
| 2244 if (json.containsKey("id")) { | 2247 if (json.containsKey("id")) { |
| 2245 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); | 2248 id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]); |
| 2246 } else { | |
| 2247 throw jsonDecoder.missingKey(jsonPath, "id"); | |
| 2248 } | 2249 } |
| 2249 Element element; | 2250 Element element; |
| 2250 if (json.containsKey("element")) { | 2251 if (json.containsKey("element")) { |
| 2251 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[
"element"]); | 2252 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[
"element"]); |
| 2252 } | 2253 } |
| 2253 return new SearchFindElementReferencesResult(id, element: element); | 2254 return new SearchFindElementReferencesResult(id: id, element: element); |
| 2254 } else { | 2255 } else { |
| 2255 throw jsonDecoder.mismatch(jsonPath, "search.findElementReferences result"
); | 2256 throw jsonDecoder.mismatch(jsonPath, "search.findElementReferences result"
); |
| 2256 } | 2257 } |
| 2257 } | 2258 } |
| 2258 | 2259 |
| 2259 factory SearchFindElementReferencesResult.fromResponse(Response response) { | 2260 factory SearchFindElementReferencesResult.fromResponse(Response response) { |
| 2260 return new SearchFindElementReferencesResult.fromJson( | 2261 return new SearchFindElementReferencesResult.fromJson( |
| 2261 new ResponseDecoder(), "result", response._result); | 2262 new ResponseDecoder(), "result", response._result); |
| 2262 } | 2263 } |
| 2263 | 2264 |
| 2264 Map<String, dynamic> toJson() { | 2265 Map<String, dynamic> toJson() { |
| 2265 Map<String, dynamic> result = {}; | 2266 Map<String, dynamic> result = {}; |
| 2266 result["id"] = id; | 2267 if (id != null) { |
| 2268 result["id"] = id; |
| 2269 } |
| 2267 if (element != null) { | 2270 if (element != null) { |
| 2268 result["element"] = element.toJson(); | 2271 result["element"] = element.toJson(); |
| 2269 } | 2272 } |
| 2270 return result; | 2273 return result; |
| 2271 } | 2274 } |
| 2272 | 2275 |
| 2273 Response toResponse(String id) { | 2276 Response toResponse(String id) { |
| 2274 return new Response(id, result: toJson()); | 2277 return new Response(id, result: toJson()); |
| 2275 } | 2278 } |
| 2276 | 2279 |
| (...skipping 7483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9760 return false; | 9763 return false; |
| 9761 } | 9764 } |
| 9762 | 9765 |
| 9763 @override | 9766 @override |
| 9764 int get hashCode { | 9767 int get hashCode { |
| 9765 int hash = 0; | 9768 int hash = 0; |
| 9766 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); | 9769 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); |
| 9767 return _JenkinsSmiHash.finish(hash); | 9770 return _JenkinsSmiHash.finish(hash); |
| 9768 } | 9771 } |
| 9769 } | 9772 } |
| OLD | NEW |