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

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

Issue 769963003: Add paging support (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
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 b8eaa8d077cd7a3be3b83c2c878c4ec97c49abe1..bcc283697aaacc5e624befaac13fd49a23f61d6e 100644
--- a/pkg/analysis_server/lib/src/generated_protocol.dart
+++ b/pkg/analysis_server/lib/src/generated_protocol.dart
@@ -692,6 +692,202 @@ class AnalysisGetHoverResult implements HasToJson {
return _JenkinsSmiHash.finish(hash);
}
}
+
+/**
+ * analysis.getNavigation params
+ *
+ * {
+ * "file": FilePath
+ * "start": int
+ * "end": int
+ * }
+ */
+class AnalysisGetNavigationParams implements HasToJson {
+ /**
+ * The file in which navigation information is being requested.
+ */
+ String file;
+
+ /**
+ * The offset of the start of the region for which hover information is being
+ * requested.
+ */
+ int start;
+
+ /**
+ * The offset of the end of the region for which hover information is being
+ * requested.
+ */
+ int end;
+
+ AnalysisGetNavigationParams(this.file, this.start, this.end);
+
+ factory AnalysisGetNavigationParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
+ if (json == null) {
+ json = {};
+ }
+ if (json is Map) {
+ String file;
+ if (json.containsKey("file")) {
+ file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "file");
+ }
+ int start;
+ if (json.containsKey("start")) {
+ start = jsonDecoder._decodeInt(jsonPath + ".start", json["start"]);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "start");
+ }
+ int end;
+ if (json.containsKey("end")) {
+ end = jsonDecoder._decodeInt(jsonPath + ".end", json["end"]);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "end");
+ }
+ return new AnalysisGetNavigationParams(file, start, end);
+ } else {
+ throw jsonDecoder.mismatch(jsonPath, "analysis.getNavigation params");
+ }
+ }
+
+ factory AnalysisGetNavigationParams.fromRequest(Request request) {
+ return new AnalysisGetNavigationParams.fromJson(
+ new RequestDecoder(request), "params", request._params);
+ }
+
+ Map<String, dynamic> toJson() {
+ Map<String, dynamic> result = {};
+ result["file"] = file;
+ result["start"] = start;
+ result["end"] = end;
+ return result;
+ }
+
+ Request toRequest(String id) {
+ return new Request(id, "analysis.getNavigation", toJson());
+ }
+
+ @override
+ String toString() => JSON.encode(toJson());
+
+ @override
+ bool operator==(other) {
+ if (other is AnalysisGetNavigationParams) {
+ return file == other.file &&
+ start == other.start &&
+ end == other.end;
+ }
+ return false;
+ }
+
+ @override
+ int get hashCode {
+ int hash = 0;
+ hash = _JenkinsSmiHash.combine(hash, file.hashCode);
+ hash = _JenkinsSmiHash.combine(hash, start.hashCode);
+ hash = _JenkinsSmiHash.combine(hash, end.hashCode);
+ return _JenkinsSmiHash.finish(hash);
+ }
+}
+
+/**
+ * analysis.getNavigation result
+ *
+ * {
+ * "files": List<FilePath>
+ * "targets": List<NavigationTarget>
+ * "regions": List<NavigationRegion>
+ * }
+ */
+class AnalysisGetNavigationResult implements HasToJson {
+ /**
+ * A list of the paths of files that are referenced by the navigation
+ * targets.
+ */
+ List<String> files;
+
+ /**
+ * A list of the navigation targets that are referenced by the navigation
+ * regions.
+ */
+ List<NavigationTarget> targets;
+
+ /**
+ * A list of the navigation regions within the requested region of the file.
+ */
+ List<NavigationRegion> regions;
+
+ AnalysisGetNavigationResult(this.files, this.targets, this.regions);
+
+ factory AnalysisGetNavigationResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
+ if (json == null) {
+ json = {};
+ }
+ if (json is Map) {
+ List<String> files;
+ if (json.containsKey("files")) {
+ files = jsonDecoder._decodeList(jsonPath + ".files", json["files"], jsonDecoder._decodeString);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "files");
+ }
+ List<NavigationTarget> targets;
+ if (json.containsKey("targets")) {
+ targets = jsonDecoder._decodeList(jsonPath + ".targets", json["targets"], (String jsonPath, Object json) => new NavigationTarget.fromJson(jsonDecoder, jsonPath, json));
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "targets");
+ }
+ List<NavigationRegion> regions;
+ if (json.containsKey("regions")) {
+ regions = jsonDecoder._decodeList(jsonPath + ".regions", json["regions"], (String jsonPath, Object json) => new NavigationRegion.fromJson(jsonDecoder, jsonPath, json));
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "regions");
+ }
+ return new AnalysisGetNavigationResult(files, targets, regions);
+ } else {
+ throw jsonDecoder.mismatch(jsonPath, "analysis.getNavigation result");
+ }
+ }
+
+ factory AnalysisGetNavigationResult.fromResponse(Response response) {
+ return new AnalysisGetNavigationResult.fromJson(
+ new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), "result", response._result);
+ }
+
+ Map<String, dynamic> toJson() {
+ Map<String, dynamic> result = {};
+ result["files"] = files;
+ result["targets"] = targets.map((NavigationTarget value) => value.toJson()).toList();
+ result["regions"] = regions.map((NavigationRegion value) => value.toJson()).toList();
+ return result;
+ }
+
+ Response toResponse(String id) {
+ return new Response(id, result: toJson());
+ }
+
+ @override
+ String toString() => JSON.encode(toJson());
+
+ @override
+ bool operator==(other) {
+ if (other is AnalysisGetNavigationResult) {
+ return _listEqual(files, other.files, (String a, String b) => a == b) &&
+ _listEqual(targets, other.targets, (NavigationTarget a, NavigationTarget b) => a == b) &&
+ _listEqual(regions, other.regions, (NavigationRegion a, NavigationRegion b) => a == b);
+ }
+ return false;
+ }
+
+ @override
+ int get hashCode {
+ int hash = 0;
+ hash = _JenkinsSmiHash.combine(hash, files.hashCode);
+ hash = _JenkinsSmiHash.combine(hash, targets.hashCode);
+ hash = _JenkinsSmiHash.combine(hash, regions.hashCode);
+ return _JenkinsSmiHash.finish(hash);
+ }
+}
/**
* analysis.reanalyze params
*/
@@ -1528,6 +1724,119 @@ class AnalysisHighlightsParams implements HasToJson {
}
/**
+ * analysis.invalidate params
+ *
+ * {
+ * "file": FilePath
+ * "start": int
+ * "end": int
+ * "delta": int
+ * }
+ */
+class AnalysisInvalidateParams implements HasToJson {
+ /**
+ * The file whose information has been invalidated.
+ */
+ String file;
+
+ /**
+ * The offset of the start of the invalidated region.
+ */
+ int start;
+
+ /**
+ * The offset of the end of the invalidated region.
+ */
+ int end;
+
+ /**
+ * The delta to be applied to the offsets in information that follows the
+ * invalidated region in order to update it so that it doesn't need to be
+ * re-requested.
+ */
+ int delta;
+
+ AnalysisInvalidateParams(this.file, this.start, this.end, this.delta);
+
+ factory AnalysisInvalidateParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
+ if (json == null) {
+ json = {};
+ }
+ if (json is Map) {
+ String file;
+ if (json.containsKey("file")) {
+ file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "file");
+ }
+ int start;
+ if (json.containsKey("start")) {
+ start = jsonDecoder._decodeInt(jsonPath + ".start", json["start"]);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "start");
+ }
+ int end;
+ if (json.containsKey("end")) {
+ end = jsonDecoder._decodeInt(jsonPath + ".end", json["end"]);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "end");
+ }
+ int delta;
+ if (json.containsKey("delta")) {
+ delta = jsonDecoder._decodeInt(jsonPath + ".delta", json["delta"]);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "delta");
+ }
+ return new AnalysisInvalidateParams(file, start, end, delta);
+ } else {
+ throw jsonDecoder.mismatch(jsonPath, "analysis.invalidate params");
+ }
+ }
+
+ factory AnalysisInvalidateParams.fromNotification(Notification notification) {
+ return new AnalysisInvalidateParams.fromJson(
+ new ResponseDecoder(null), "params", notification._params);
+ }
+
+ Map<String, dynamic> toJson() {
+ Map<String, dynamic> result = {};
+ result["file"] = file;
+ result["start"] = start;
+ result["end"] = end;
+ result["delta"] = delta;
+ return result;
+ }
+
+ Notification toNotification() {
+ return new Notification("analysis.invalidate", toJson());
+ }
+
+ @override
+ String toString() => JSON.encode(toJson());
+
+ @override
+ bool operator==(other) {
+ if (other is AnalysisInvalidateParams) {
+ return file == other.file &&
+ start == other.start &&
+ end == other.end &&
+ delta == other.delta;
+ }
+ return false;
+ }
+
+ @override
+ int get hashCode {
+ int hash = 0;
+ hash = _JenkinsSmiHash.combine(hash, file.hashCode);
+ hash = _JenkinsSmiHash.combine(hash, start.hashCode);
+ hash = _JenkinsSmiHash.combine(hash, end.hashCode);
+ hash = _JenkinsSmiHash.combine(hash, delta.hashCode);
+ return _JenkinsSmiHash.finish(hash);
+ }
+}
+
+/**
* analysis.navigation params
*
* {
@@ -5014,6 +5323,7 @@ class AnalysisOptions implements HasToJson {
* enum {
* FOLDING
* HIGHLIGHTS
+ * INVALIDATE
* NAVIGATION
* OCCURRENCES
* OUTLINE
@@ -5025,6 +5335,8 @@ class AnalysisService implements Enum {
static const HIGHLIGHTS = const AnalysisService._("HIGHLIGHTS");
+ static const INVALIDATE = const AnalysisService._("INVALIDATE");
+
static const NAVIGATION = const AnalysisService._("NAVIGATION");
static const OCCURRENCES = const AnalysisService._("OCCURRENCES");
@@ -5043,6 +5355,8 @@ class AnalysisService implements Enum {
return FOLDING;
case "HIGHLIGHTS":
return HIGHLIGHTS;
+ case "INVALIDATE":
+ return INVALIDATE;
case "NAVIGATION":
return NAVIGATION;
case "OCCURRENCES":

Powered by Google App Engine
This is Rietveld 408576698