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

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

Issue 2088663004: Adds PID to `server.connected` notification (#26744). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
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 c547af5f9e2d404a08d19163ecb228428f55d46c..683ee6b3e6d237c6c2ba7c38efb847b5aa7b55cc 100644
--- a/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart
+++ b/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart
@@ -266,6 +266,7 @@ class ServerSetSubscriptionsResult {
*
* {
* "version": String
+ * "pid": String
* }
*
* Clients may not extend, implement or mix-in this class.
@@ -273,6 +274,8 @@ class ServerSetSubscriptionsResult {
class ServerConnectedParams implements HasToJson {
String _version;
+ String _pid;
+
/**
* The version number of the analysis server.
*/
@@ -286,8 +289,22 @@ class ServerConnectedParams implements HasToJson {
this._version = value;
}
- ServerConnectedParams(String version) {
+ /**
+ * The process id of the analysis server process.
+ */
+ String get pid => _pid;
+
+ /**
+ * The process id of the analysis server process.
+ */
+ void set pid(String value) {
+ assert(value != null);
+ this._pid = value;
+ }
+
+ ServerConnectedParams(String version, String pid) {
this.version = version;
+ this.pid = pid;
}
factory ServerConnectedParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
@@ -301,7 +318,13 @@ class ServerConnectedParams implements HasToJson {
} else {
throw jsonDecoder.missingKey(jsonPath, "version");
}
- return new ServerConnectedParams(version);
+ String pid;
+ if (json.containsKey("pid")) {
+ pid = jsonDecoder.decodeString(jsonPath + ".pid", json["pid"]);
+ } else {
+ throw jsonDecoder.missingKey(jsonPath, "pid");
+ }
+ return new ServerConnectedParams(version, pid);
} else {
throw jsonDecoder.mismatch(jsonPath, "server.connected params", json);
}
@@ -315,6 +338,7 @@ class ServerConnectedParams implements HasToJson {
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["version"] = version;
+ result["pid"] = pid;
return result;
}
@@ -328,7 +352,8 @@ class ServerConnectedParams implements HasToJson {
@override
bool operator==(other) {
if (other is ServerConnectedParams) {
- return version == other.version;
+ return version == other.version &&
+ pid == other.pid;
}
return false;
}
@@ -337,6 +362,7 @@ class ServerConnectedParams implements HasToJson {
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, version.hashCode);
+ hash = JenkinsSmiHash.combine(hash, pid.hashCode);
return JenkinsSmiHash.finish(hash);
}
}

Powered by Google App Engine
This is Rietveld 408576698