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

Unified Diff: pkg/analysis_server/lib/src/generated_protocol.dart

Issue 529123002: Make findElementReferences' "id" result optional. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/lib/src/search/search_domain.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/generated_protocol.dart
diff --git a/pkg/analysis_server/lib/src/generated_protocol.dart b/pkg/analysis_server/lib/src/generated_protocol.dart
index 36e4b9bd8389a7490fdac062793fe8d1d2cd0881..77140adb1c7dcbd1384bc513217d3252e9c4be80 100644
--- a/pkg/analysis_server/lib/src/generated_protocol.dart
+++ b/pkg/analysis_server/lib/src/generated_protocol.dart
@@ -2215,13 +2215,16 @@ class SearchFindElementReferencesParams implements HasToJson {
* search.findElementReferences result
*
* {
- * "id": SearchId
+ * "id": optional SearchId
* "element": optional Element
* }
*/
class SearchFindElementReferencesResult implements HasToJson {
/**
* The identifier used to associate results with this search request.
+ *
+ * If no element was found at the given location, this field will be absent,
+ * and no results will be reported via the search.results notification.
*/
String id;
@@ -2233,7 +2236,7 @@ class SearchFindElementReferencesResult implements HasToJson {
*/
Element element;
- SearchFindElementReferencesResult(this.id, {this.element});
+ SearchFindElementReferencesResult({this.id, this.element});
factory SearchFindElementReferencesResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
@@ -2243,14 +2246,12 @@ class SearchFindElementReferencesResult implements HasToJson {
String id;
if (json.containsKey("id")) {
id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]);
- } else {
- throw jsonDecoder.missingKey(jsonPath, "id");
}
Element element;
if (json.containsKey("element")) {
element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json["element"]);
}
- return new SearchFindElementReferencesResult(id, element: element);
+ return new SearchFindElementReferencesResult(id: id, element: element);
} else {
throw jsonDecoder.mismatch(jsonPath, "search.findElementReferences result");
}
@@ -2263,7 +2264,9 @@ class SearchFindElementReferencesResult implements HasToJson {
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
- result["id"] = id;
+ if (id != null) {
+ result["id"] = id;
+ }
if (element != null) {
result["element"] = element.toJson();
}
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/lib/src/search/search_domain.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698