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

Side by Side Diff: pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart

Issue 2359233002: Add support for getting the sessionId from instrumentation and sending it to the client (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/lib/src/analysis_server.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/tool/spec/generate_files". 7 // "pkg/analysis_server/tool/spec/generate_files".
8 8
9 part of analysis_server.plugin.protocol.protocol; 9 part of analysis_server.plugin.protocol.protocol;
10 10
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 return 748820900; 260 return 748820900;
261 } 261 }
262 } 262 }
263 263
264 /** 264 /**
265 * server.connected params 265 * server.connected params
266 * 266 *
267 * { 267 * {
268 * "version": String 268 * "version": String
269 * "pid": int 269 * "pid": int
270 * "sessionId": optional String
270 * } 271 * }
271 * 272 *
272 * Clients may not extend, implement or mix-in this class. 273 * Clients may not extend, implement or mix-in this class.
273 */ 274 */
274 class ServerConnectedParams implements HasToJson { 275 class ServerConnectedParams implements HasToJson {
275 String _version; 276 String _version;
276 277
277 int _pid; 278 int _pid;
278 279
280 String _sessionId;
281
279 /** 282 /**
280 * The version number of the analysis server. 283 * The version number of the analysis server.
281 */ 284 */
282 String get version => _version; 285 String get version => _version;
283 286
284 /** 287 /**
285 * The version number of the analysis server. 288 * The version number of the analysis server.
286 */ 289 */
287 void set version(String value) { 290 void set version(String value) {
288 assert(value != null); 291 assert(value != null);
289 this._version = value; 292 this._version = value;
290 } 293 }
291 294
292 /** 295 /**
293 * The process id of the analysis server process. 296 * The process id of the analysis server process.
294 */ 297 */
295 int get pid => _pid; 298 int get pid => _pid;
296 299
297 /** 300 /**
298 * The process id of the analysis server process. 301 * The process id of the analysis server process.
299 */ 302 */
300 void set pid(int value) { 303 void set pid(int value) {
301 assert(value != null); 304 assert(value != null);
302 this._pid = value; 305 this._pid = value;
303 } 306 }
304 307
305 ServerConnectedParams(String version, int pid) { 308 /**
309 * The session id for this session.
310 */
311 String get sessionId => _sessionId;
312
313 /**
314 * The session id for this session.
315 */
316 void set sessionId(String value) {
317 this._sessionId = value;
318 }
319
320 ServerConnectedParams(String version, int pid, {String sessionId}) {
306 this.version = version; 321 this.version = version;
307 this.pid = pid; 322 this.pid = pid;
323 this.sessionId = sessionId;
308 } 324 }
309 325
310 factory ServerConnectedParams.fromJson(JsonDecoder jsonDecoder, String jsonPat h, Object json) { 326 factory ServerConnectedParams.fromJson(JsonDecoder jsonDecoder, String jsonPat h, Object json) {
311 if (json == null) { 327 if (json == null) {
312 json = {}; 328 json = {};
313 } 329 }
314 if (json is Map) { 330 if (json is Map) {
315 String version; 331 String version;
316 if (json.containsKey("version")) { 332 if (json.containsKey("version")) {
317 version = jsonDecoder.decodeString(jsonPath + ".version", json["version" ]); 333 version = jsonDecoder.decodeString(jsonPath + ".version", json["version" ]);
318 } else { 334 } else {
319 throw jsonDecoder.missingKey(jsonPath, "version"); 335 throw jsonDecoder.missingKey(jsonPath, "version");
320 } 336 }
321 int pid; 337 int pid;
322 if (json.containsKey("pid")) { 338 if (json.containsKey("pid")) {
323 pid = jsonDecoder.decodeInt(jsonPath + ".pid", json["pid"]); 339 pid = jsonDecoder.decodeInt(jsonPath + ".pid", json["pid"]);
324 } else { 340 } else {
325 throw jsonDecoder.missingKey(jsonPath, "pid"); 341 throw jsonDecoder.missingKey(jsonPath, "pid");
326 } 342 }
327 return new ServerConnectedParams(version, pid); 343 String sessionId;
344 if (json.containsKey("sessionId")) {
345 sessionId = jsonDecoder.decodeString(jsonPath + ".sessionId", json["sess ionId"]);
346 }
347 return new ServerConnectedParams(version, pid, sessionId: sessionId);
328 } else { 348 } else {
329 throw jsonDecoder.mismatch(jsonPath, "server.connected params", json); 349 throw jsonDecoder.mismatch(jsonPath, "server.connected params", json);
330 } 350 }
331 } 351 }
332 352
333 factory ServerConnectedParams.fromNotification(Notification notification) { 353 factory ServerConnectedParams.fromNotification(Notification notification) {
334 return new ServerConnectedParams.fromJson( 354 return new ServerConnectedParams.fromJson(
335 new ResponseDecoder(null), "params", notification._params); 355 new ResponseDecoder(null), "params", notification._params);
336 } 356 }
337 357
338 Map<String, dynamic> toJson() { 358 Map<String, dynamic> toJson() {
339 Map<String, dynamic> result = {}; 359 Map<String, dynamic> result = {};
340 result["version"] = version; 360 result["version"] = version;
341 result["pid"] = pid; 361 result["pid"] = pid;
362 if (sessionId != null) {
363 result["sessionId"] = sessionId;
364 }
342 return result; 365 return result;
343 } 366 }
344 367
345 Notification toNotification() { 368 Notification toNotification() {
346 return new Notification("server.connected", toJson()); 369 return new Notification("server.connected", toJson());
347 } 370 }
348 371
349 @override 372 @override
350 String toString() => JSON.encode(toJson()); 373 String toString() => JSON.encode(toJson());
351 374
352 @override 375 @override
353 bool operator==(other) { 376 bool operator==(other) {
354 if (other is ServerConnectedParams) { 377 if (other is ServerConnectedParams) {
355 return version == other.version && 378 return version == other.version &&
356 pid == other.pid; 379 pid == other.pid &&
380 sessionId == other.sessionId;
357 } 381 }
358 return false; 382 return false;
359 } 383 }
360 384
361 @override 385 @override
362 int get hashCode { 386 int get hashCode {
363 int hash = 0; 387 int hash = 0;
364 hash = JenkinsSmiHash.combine(hash, version.hashCode); 388 hash = JenkinsSmiHash.combine(hash, version.hashCode);
365 hash = JenkinsSmiHash.combine(hash, pid.hashCode); 389 hash = JenkinsSmiHash.combine(hash, pid.hashCode);
390 hash = JenkinsSmiHash.combine(hash, sessionId.hashCode);
366 return JenkinsSmiHash.finish(hash); 391 return JenkinsSmiHash.finish(hash);
367 } 392 }
368 } 393 }
369 394
370 /** 395 /**
371 * server.error params 396 * server.error params
372 * 397 *
373 * { 398 * {
374 * "isFatal": bool 399 * "isFatal": bool
375 * "message": String 400 * "message": String
(...skipping 16634 matching lines...) Expand 10 before | Expand all | Expand 10 after
17010 return false; 17035 return false;
17011 } 17036 }
17012 17037
17013 @override 17038 @override
17014 int get hashCode { 17039 int get hashCode {
17015 int hash = 0; 17040 int hash = 0;
17016 hash = JenkinsSmiHash.combine(hash, newName.hashCode); 17041 hash = JenkinsSmiHash.combine(hash, newName.hashCode);
17017 return JenkinsSmiHash.finish(hash); 17042 return JenkinsSmiHash.finish(hash);
17018 } 17043 }
17019 } 17044 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/lib/src/analysis_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698