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

Unified Diff: pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart

Issue 1416093007: Experimental `getDiagnostics` request (#24480). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Review fixes. Created 5 years, 1 month 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/domain_experimental.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart
diff --git a/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart b/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart
index 69021cbcfa88f939e47632800b84f669ae5960c1..d076bd052a4aa61883c96a231711af822386482d 100644
--- a/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart
+++ b/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart
@@ -7421,6 +7421,109 @@ class ExecutionLaunchDataParams implements HasToJson {
return JenkinsSmiHash.finish(hash);
}
}
+/**
+ * experimental.getDiagnostics params
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class ExperimentalGetDiagnosticsParams {
+ Request toRequest(String id) {
+ return new Request(id, "experimental.getDiagnostics", null);
+ }
+
+ @override
+ bool operator==(other) {
+ if (other is ExperimentalGetDiagnosticsParams) {
+ return true;
+ }
+ return false;
+ }
+
+ @override
+ int get hashCode {
+ return 876666064;
+ }
+}
+
+/**
+ * experimental.getDiagnostics result
+ *
+ * {
+ * "contexts": List<ContextData>
+ * }
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class ExperimentalGetDiagnosticsResult implements HasToJson {
+ List<ContextData> _contexts;
+
+ /**
+ * The list of analysis contexts.
+ */
+ List<ContextData> get contexts => _contexts;
+
+ /**
+ * The list of analysis contexts.
+ */
+ void set contexts(List<ContextData> value) {
+ assert(value != null);
+ this._contexts = value;
+ }
+
+ ExperimentalGetDiagnosticsResult(List<ContextData> contexts) {
+ this.contexts = contexts;
+ }
+
+ factory ExperimentalGetDiagnosticsResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
+ if (json == null) {
+ json = {};
+ }
+ if (json is Map) {
+ List<ContextData> contexts;
+ if (json.containsKey("contexts")) {
+ contexts = jsonDecoder.decodeList(jsonPath + ".contexts", json["contexts"], (String jsonPath, Object json) => new ContextData.fromJson(jsonDecoder, jsonPath, json));
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "contexts");
+ }
+ return new ExperimentalGetDiagnosticsResult(contexts);
+ } else {
+ throw jsonDecoder.mismatch(jsonPath, "experimental.getDiagnostics result", json);
+ }
+ }
+
+ factory ExperimentalGetDiagnosticsResult.fromResponse(Response response) {
+ return new ExperimentalGetDiagnosticsResult.fromJson(
+ new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), "result", response._result);
+ }
+
+ Map<String, dynamic> toJson() {
+ Map<String, dynamic> result = {};
+ result["contexts"] = contexts.map((ContextData 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 ExperimentalGetDiagnosticsResult) {
+ return listEqual(contexts, other.contexts, (ContextData a, ContextData b) => a == b);
+ }
+ return false;
+ }
+
+ @override
+ int get hashCode {
+ int hash = 0;
+ hash = JenkinsSmiHash.combine(hash, contexts.hashCode);
+ return JenkinsSmiHash.finish(hash);
+ }
+}
/**
* AddContentOverlay
@@ -9167,6 +9270,181 @@ class CompletionSuggestionKind implements Enum {
}
/**
+ * ContextData
+ *
+ * {
+ * "name": String
+ * "explicitFileCount": int
+ * "implicitFileCount": int
+ * "workItemQueueLength": int
+ * "cacheEntryExceptions": List<String>
+ * }
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class ContextData implements HasToJson {
+ String _name;
+
+ int _explicitFileCount;
+
+ int _implicitFileCount;
+
+ int _workItemQueueLength;
+
+ List<String> _cacheEntryExceptions;
+
+ /**
+ * The name of the context.
+ */
+ String get name => _name;
+
+ /**
+ * The name of the context.
+ */
+ void set name(String value) {
+ assert(value != null);
+ this._name = value;
+ }
+
+ /**
+ * Explicitly analyzed files.
+ */
+ int get explicitFileCount => _explicitFileCount;
+
+ /**
+ * Explicitly analyzed files.
+ */
+ void set explicitFileCount(int value) {
+ assert(value != null);
+ this._explicitFileCount = value;
+ }
+
+ /**
+ * Implicitly analyzed files.
+ */
+ int get implicitFileCount => _implicitFileCount;
+
+ /**
+ * Implicitly analyzed files.
+ */
+ void set implicitFileCount(int value) {
+ assert(value != null);
+ this._implicitFileCount = value;
+ }
+
+ /**
+ * The number of work items in the queue.
+ */
+ int get workItemQueueLength => _workItemQueueLength;
+
+ /**
+ * The number of work items in the queue.
+ */
+ void set workItemQueueLength(int value) {
+ assert(value != null);
+ this._workItemQueueLength = value;
+ }
+
+ /**
+ * Exceptions associated with cache entries.
+ */
+ List<String> get cacheEntryExceptions => _cacheEntryExceptions;
+
+ /**
+ * Exceptions associated with cache entries.
+ */
+ void set cacheEntryExceptions(List<String> value) {
+ assert(value != null);
+ this._cacheEntryExceptions = value;
+ }
+
+ ContextData(String name, int explicitFileCount, int implicitFileCount, int workItemQueueLength, List<String> cacheEntryExceptions) {
+ this.name = name;
+ this.explicitFileCount = explicitFileCount;
+ this.implicitFileCount = implicitFileCount;
+ this.workItemQueueLength = workItemQueueLength;
+ this.cacheEntryExceptions = cacheEntryExceptions;
+ }
+
+ factory ContextData.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
+ if (json == null) {
+ json = {};
+ }
+ if (json is Map) {
+ String name;
+ if (json.containsKey("name")) {
+ name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "name");
+ }
+ int explicitFileCount;
+ if (json.containsKey("explicitFileCount")) {
+ explicitFileCount = jsonDecoder.decodeInt(jsonPath + ".explicitFileCount", json["explicitFileCount"]);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "explicitFileCount");
+ }
+ int implicitFileCount;
+ if (json.containsKey("implicitFileCount")) {
+ implicitFileCount = jsonDecoder.decodeInt(jsonPath + ".implicitFileCount", json["implicitFileCount"]);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "implicitFileCount");
+ }
+ int workItemQueueLength;
+ if (json.containsKey("workItemQueueLength")) {
+ workItemQueueLength = jsonDecoder.decodeInt(jsonPath + ".workItemQueueLength", json["workItemQueueLength"]);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "workItemQueueLength");
+ }
+ List<String> cacheEntryExceptions;
+ if (json.containsKey("cacheEntryExceptions")) {
+ cacheEntryExceptions = jsonDecoder.decodeList(jsonPath + ".cacheEntryExceptions", json["cacheEntryExceptions"], jsonDecoder.decodeString);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "cacheEntryExceptions");
+ }
+ return new ContextData(name, explicitFileCount, implicitFileCount, workItemQueueLength, cacheEntryExceptions);
+ } else {
+ throw jsonDecoder.mismatch(jsonPath, "ContextData", json);
+ }
+ }
+
+ Map<String, dynamic> toJson() {
+ Map<String, dynamic> result = {};
+ result["name"] = name;
+ result["explicitFileCount"] = explicitFileCount;
+ result["implicitFileCount"] = implicitFileCount;
+ result["workItemQueueLength"] = workItemQueueLength;
+ result["cacheEntryExceptions"] = cacheEntryExceptions;
+ return result;
+ }
+
+ @override
+ String toString() => JSON.encode(toJson());
+
+ @override
+ bool operator==(other) {
+ if (other is ContextData) {
+ return name == other.name &&
+ explicitFileCount == other.explicitFileCount &&
+ implicitFileCount == other.implicitFileCount &&
+ workItemQueueLength == other.workItemQueueLength &&
+ listEqual(cacheEntryExceptions, other.cacheEntryExceptions, (String a, String b) => a == b);
+ }
+ return false;
+ }
+
+ @override
+ int get hashCode {
+ int hash = 0;
+ hash = JenkinsSmiHash.combine(hash, name.hashCode);
+ hash = JenkinsSmiHash.combine(hash, explicitFileCount.hashCode);
+ hash = JenkinsSmiHash.combine(hash, implicitFileCount.hashCode);
+ hash = JenkinsSmiHash.combine(hash, workItemQueueLength.hashCode);
+ hash = JenkinsSmiHash.combine(hash, cacheEntryExceptions.hashCode);
+ return JenkinsSmiHash.finish(hash);
+ }
+}
+
+/**
* Element
*
* {
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/lib/src/domain_experimental.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698