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

Side by Side Diff: pkg/analysis_server/lib/src/generated_protocol.dart

Issue 483393002: Analysis server code generation improvements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/protocol.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/spec/generate_files". 7 // "pkg/analysis_server/spec/generate_files".
8 8
9 part of protocol2; 9 part of protocol2;
10 10
11 /** 11 /**
12 * server.getVersion result 12 * server.getVersion result
13 * 13 *
14 * { 14 * {
15 * "version": String 15 * "version": String
16 * } 16 * }
17 */ 17 */
18 class ServerGetVersionResult { 18 class ServerGetVersionResult implements HasToJson {
19 /** 19 /**
20 * The version number of the analysis server. 20 * The version number of the analysis server.
21 */ 21 */
22 final String version; 22 final String version;
23 23
24 ServerGetVersionResult(this.version); 24 ServerGetVersionResult(this.version);
25 25
26 factory ServerGetVersionResult.fromJson(JsonDecoder jsonDecoder, String jsonPa th, Object json) { 26 factory ServerGetVersionResult.fromJson(JsonDecoder jsonDecoder, String jsonPa th, Object json) {
27 if (json is Map) { 27 if (json is Map) {
28 String version; 28 String version;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 } 68 }
69 69
70 /** 70 /**
71 * server.setSubscriptions params 71 * server.setSubscriptions params
72 * 72 *
73 * { 73 * {
74 * "subscriptions": List<ServerService> 74 * "subscriptions": List<ServerService>
75 * } 75 * }
76 */ 76 */
77 class ServerSetSubscriptionsParams { 77 class ServerSetSubscriptionsParams implements HasToJson {
78 /** 78 /**
79 * A list of the services being subscribed to. 79 * A list of the services being subscribed to.
80 */ 80 */
81 final List<ServerService> subscriptions; 81 final List<ServerService> subscriptions;
82 82
83 ServerSetSubscriptionsParams(this.subscriptions); 83 ServerSetSubscriptionsParams(this.subscriptions);
84 84
85 factory ServerSetSubscriptionsParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 85 factory ServerSetSubscriptionsParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
86 if (json is Map) { 86 if (json is Map) {
87 List<ServerService> subscriptions; 87 List<ServerService> subscriptions;
88 if (json.containsKey("subscriptions")) { 88 if (json.containsKey("subscriptions")) {
89 subscriptions = jsonDecoder._decodeList(jsonPath + ".subscriptions", jso n["subscriptions"], (String jsonPath, Object json) => new ServerService.fromJson (jsonDecoder, jsonPath, json)); 89 subscriptions = jsonDecoder._decodeList(jsonPath + ".subscriptions", jso n["subscriptions"], (String jsonPath, Object json) => new ServerService.fromJson (jsonDecoder, jsonPath, json));
90 } else { 90 } else {
91 throw jsonDecoder.missingKey(jsonPath, "subscriptions"); 91 throw jsonDecoder.missingKey(jsonPath, "subscriptions");
92 } 92 }
93 return new ServerSetSubscriptionsParams(subscriptions); 93 return new ServerSetSubscriptionsParams(subscriptions);
94 } else { 94 } else {
95 throw jsonDecoder.mismatch(jsonPath, "server.setSubscriptions params"); 95 throw jsonDecoder.mismatch(jsonPath, "server.setSubscriptions params");
96 } 96 }
97 } 97 }
98 98
99 factory ServerSetSubscriptionsParams.fromRequest(Request request) { 99 factory ServerSetSubscriptionsParams.fromRequest(Request request) {
100 return new ServerSetSubscriptionsParams.fromJson( 100 return new ServerSetSubscriptionsParams.fromJson(
101 new RequestDecoder(request), "params", request.params); 101 new RequestDecoder(request), "params", request.params);
102 } 102 }
103 103
104 Map<String, dynamic> toJson() { 104 Map<String, dynamic> toJson() {
105 Map<String, dynamic> result = {}; 105 Map<String, dynamic> result = {};
106 result["subscriptions"] = subscriptions.map((ServerService value) => value.t oJson()); 106 result["subscriptions"] = subscriptions.map((ServerService value) => value.t oJson()).toList();
107 return result; 107 return result;
108 } 108 }
109 109
110 Request toRequest(String id) {
111 return new Request(id, "server.setSubscriptions", toJson());
112 }
113
110 @override 114 @override
111 String toString() => JSON.encode(toJson()); 115 String toString() => JSON.encode(toJson());
112 116
113 @override 117 @override
114 bool operator==(other) { 118 bool operator==(other) {
115 if (other is ServerSetSubscriptionsParams) { 119 if (other is ServerSetSubscriptionsParams) {
116 return _listEqual(subscriptions, other.subscriptions, (ServerService a, Se rverService b) => a == b); 120 return _listEqual(subscriptions, other.subscriptions, (ServerService a, Se rverService b) => a == b);
117 } 121 }
118 return false; 122 return false;
119 } 123 }
120 124
121 @override 125 @override
122 int get hashCode { 126 int get hashCode {
123 int hash = 0; 127 int hash = 0;
124 hash = _JenkinsSmiHash.combine(hash, subscriptions.hashCode); 128 hash = _JenkinsSmiHash.combine(hash, subscriptions.hashCode);
125 return _JenkinsSmiHash.finish(hash); 129 return _JenkinsSmiHash.finish(hash);
126 } 130 }
127 } 131 }
128 132
129 /** 133 /**
130 * server.error params 134 * server.error params
131 * 135 *
132 * { 136 * {
133 * "fatal": bool 137 * "fatal": bool
134 * "message": String 138 * "message": String
135 * "stackTrace": String 139 * "stackTrace": String
136 * } 140 * }
137 */ 141 */
138 class ServerErrorParams { 142 class ServerErrorParams implements HasToJson {
139 /** 143 /**
140 * True if the error is a fatal error, meaning that the server will shutdown 144 * True if the error is a fatal error, meaning that the server will shutdown
141 * automatically after sending this notification. 145 * automatically after sending this notification.
142 */ 146 */
143 final bool fatal; 147 final bool fatal;
144 148
145 /** 149 /**
146 * The error message indicating what kind of error was encountered. 150 * The error message indicating what kind of error was encountered.
147 */ 151 */
148 final String message; 152 final String message;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 221 }
218 } 222 }
219 223
220 /** 224 /**
221 * server.status params 225 * server.status params
222 * 226 *
223 * { 227 * {
224 * "analysis": optional AnalysisStatus 228 * "analysis": optional AnalysisStatus
225 * } 229 * }
226 */ 230 */
227 class ServerStatusParams { 231 class ServerStatusParams implements HasToJson {
228 /** 232 /**
229 * The current status of analysis, including whether analysis is being 233 * The current status of analysis, including whether analysis is being
230 * performed and if so what is being analyzed. 234 * performed and if so what is being analyzed.
231 */ 235 */
232 final AnalysisStatus analysis; 236 final AnalysisStatus analysis;
233 237
234 ServerStatusParams({this.analysis}); 238 ServerStatusParams({this.analysis});
235 239
236 factory ServerStatusParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 240 factory ServerStatusParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
237 if (json is Map) { 241 if (json is Map) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 } 281 }
278 } 282 }
279 283
280 /** 284 /**
281 * analysis.getErrors params 285 * analysis.getErrors params
282 * 286 *
283 * { 287 * {
284 * "file": FilePath 288 * "file": FilePath
285 * } 289 * }
286 */ 290 */
287 class AnalysisGetErrorsParams { 291 class AnalysisGetErrorsParams implements HasToJson {
288 /** 292 /**
289 * The file for which errors are being requested. 293 * The file for which errors are being requested.
290 */ 294 */
291 final String file; 295 final String file;
292 296
293 AnalysisGetErrorsParams(this.file); 297 AnalysisGetErrorsParams(this.file);
294 298
295 factory AnalysisGetErrorsParams.fromJson(JsonDecoder jsonDecoder, String jsonP ath, Object json) { 299 factory AnalysisGetErrorsParams.fromJson(JsonDecoder jsonDecoder, String jsonP ath, Object json) {
296 if (json is Map) { 300 if (json is Map) {
297 String file; 301 String file;
(...skipping 12 matching lines...) Expand all
310 return new AnalysisGetErrorsParams.fromJson( 314 return new AnalysisGetErrorsParams.fromJson(
311 new RequestDecoder(request), "params", request.params); 315 new RequestDecoder(request), "params", request.params);
312 } 316 }
313 317
314 Map<String, dynamic> toJson() { 318 Map<String, dynamic> toJson() {
315 Map<String, dynamic> result = {}; 319 Map<String, dynamic> result = {};
316 result["file"] = file; 320 result["file"] = file;
317 return result; 321 return result;
318 } 322 }
319 323
324 Request toRequest(String id) {
325 return new Request(id, "analysis.getErrors", toJson());
326 }
327
320 @override 328 @override
321 String toString() => JSON.encode(toJson()); 329 String toString() => JSON.encode(toJson());
322 330
323 @override 331 @override
324 bool operator==(other) { 332 bool operator==(other) {
325 if (other is AnalysisGetErrorsParams) { 333 if (other is AnalysisGetErrorsParams) {
326 return file == other.file; 334 return file == other.file;
327 } 335 }
328 return false; 336 return false;
329 } 337 }
330 338
331 @override 339 @override
332 int get hashCode { 340 int get hashCode {
333 int hash = 0; 341 int hash = 0;
334 hash = _JenkinsSmiHash.combine(hash, file.hashCode); 342 hash = _JenkinsSmiHash.combine(hash, file.hashCode);
335 return _JenkinsSmiHash.finish(hash); 343 return _JenkinsSmiHash.finish(hash);
336 } 344 }
337 } 345 }
338 346
339 /** 347 /**
340 * analysis.getErrors result 348 * analysis.getErrors result
341 * 349 *
342 * { 350 * {
343 * "errors": List<AnalysisError> 351 * "errors": List<AnalysisError>
344 * } 352 * }
345 */ 353 */
346 class AnalysisGetErrorsResult { 354 class AnalysisGetErrorsResult implements HasToJson {
347 /** 355 /**
348 * The errors associated with the file. 356 * The errors associated with the file.
349 */ 357 */
350 final List<AnalysisError> errors; 358 final List<AnalysisError> errors;
351 359
352 AnalysisGetErrorsResult(this.errors); 360 AnalysisGetErrorsResult(this.errors);
353 361
354 factory AnalysisGetErrorsResult.fromJson(JsonDecoder jsonDecoder, String jsonP ath, Object json) { 362 factory AnalysisGetErrorsResult.fromJson(JsonDecoder jsonDecoder, String jsonP ath, Object json) {
355 if (json is Map) { 363 if (json is Map) {
356 List<AnalysisError> errors; 364 List<AnalysisError> errors;
357 if (json.containsKey("errors")) { 365 if (json.containsKey("errors")) {
358 errors = jsonDecoder._decodeList(jsonPath + ".errors", json["errors"], ( String jsonPath, Object json) => new AnalysisError.fromJson(jsonDecoder, jsonPat h, json)); 366 errors = jsonDecoder._decodeList(jsonPath + ".errors", json["errors"], ( String jsonPath, Object json) => new AnalysisError.fromJson(jsonDecoder, jsonPat h, json));
359 } else { 367 } else {
360 throw jsonDecoder.missingKey(jsonPath, "errors"); 368 throw jsonDecoder.missingKey(jsonPath, "errors");
361 } 369 }
362 return new AnalysisGetErrorsResult(errors); 370 return new AnalysisGetErrorsResult(errors);
363 } else { 371 } else {
364 throw jsonDecoder.mismatch(jsonPath, "analysis.getErrors result"); 372 throw jsonDecoder.mismatch(jsonPath, "analysis.getErrors result");
365 } 373 }
366 } 374 }
367 375
368 factory AnalysisGetErrorsResult.fromResponse(Response response) { 376 factory AnalysisGetErrorsResult.fromResponse(Response response) {
369 return new AnalysisGetErrorsResult.fromJson( 377 return new AnalysisGetErrorsResult.fromJson(
370 new ResponseDecoder(), "result", response.result); 378 new ResponseDecoder(), "result", response.result);
371 } 379 }
372 380
373 Map<String, dynamic> toJson() { 381 Map<String, dynamic> toJson() {
374 Map<String, dynamic> result = {}; 382 Map<String, dynamic> result = {};
375 result["errors"] = errors.map((AnalysisError value) => value.toJson()); 383 result["errors"] = errors.map((AnalysisError value) => value.toJson()).toLis t();
376 return result; 384 return result;
377 } 385 }
378 386
379 @override 387 @override
380 String toString() => JSON.encode(toJson()); 388 String toString() => JSON.encode(toJson());
381 389
382 @override 390 @override
383 bool operator==(other) { 391 bool operator==(other) {
384 if (other is AnalysisGetErrorsResult) { 392 if (other is AnalysisGetErrorsResult) {
385 return _listEqual(errors, other.errors, (AnalysisError a, AnalysisError b) => a == b); 393 return _listEqual(errors, other.errors, (AnalysisError a, AnalysisError b) => a == b);
(...skipping 10 matching lines...) Expand all
396 } 404 }
397 405
398 /** 406 /**
399 * analysis.getHover params 407 * analysis.getHover params
400 * 408 *
401 * { 409 * {
402 * "file": FilePath 410 * "file": FilePath
403 * "offset": int 411 * "offset": int
404 * } 412 * }
405 */ 413 */
406 class AnalysisGetHoverParams { 414 class AnalysisGetHoverParams implements HasToJson {
407 /** 415 /**
408 * The file in which hover information is being requested. 416 * The file in which hover information is being requested.
409 */ 417 */
410 final String file; 418 final String file;
411 419
412 /** 420 /**
413 * The offset for which hover information is being requested. 421 * The offset for which hover information is being requested.
414 */ 422 */
415 final int offset; 423 final int offset;
416 424
(...skipping 24 matching lines...) Expand all
441 new RequestDecoder(request), "params", request.params); 449 new RequestDecoder(request), "params", request.params);
442 } 450 }
443 451
444 Map<String, dynamic> toJson() { 452 Map<String, dynamic> toJson() {
445 Map<String, dynamic> result = {}; 453 Map<String, dynamic> result = {};
446 result["file"] = file; 454 result["file"] = file;
447 result["offset"] = offset; 455 result["offset"] = offset;
448 return result; 456 return result;
449 } 457 }
450 458
459 Request toRequest(String id) {
460 return new Request(id, "analysis.getHover", toJson());
461 }
462
451 @override 463 @override
452 String toString() => JSON.encode(toJson()); 464 String toString() => JSON.encode(toJson());
453 465
454 @override 466 @override
455 bool operator==(other) { 467 bool operator==(other) {
456 if (other is AnalysisGetHoverParams) { 468 if (other is AnalysisGetHoverParams) {
457 return file == other.file && 469 return file == other.file &&
458 offset == other.offset; 470 offset == other.offset;
459 } 471 }
460 return false; 472 return false;
461 } 473 }
462 474
463 @override 475 @override
464 int get hashCode { 476 int get hashCode {
465 int hash = 0; 477 int hash = 0;
466 hash = _JenkinsSmiHash.combine(hash, file.hashCode); 478 hash = _JenkinsSmiHash.combine(hash, file.hashCode);
467 hash = _JenkinsSmiHash.combine(hash, offset.hashCode); 479 hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
468 return _JenkinsSmiHash.finish(hash); 480 return _JenkinsSmiHash.finish(hash);
469 } 481 }
470 } 482 }
471 483
472 /** 484 /**
473 * analysis.getHover result 485 * analysis.getHover result
474 * 486 *
475 * { 487 * {
476 * "hovers": List<HoverInformation> 488 * "hovers": List<HoverInformation>
477 * } 489 * }
478 */ 490 */
479 class AnalysisGetHoverResult { 491 class AnalysisGetHoverResult implements HasToJson {
480 /** 492 /**
481 * The hover information associated with the location. The list will be empty 493 * The hover information associated with the location. The list will be empty
482 * if no information could be determined for the location. The list can 494 * if no information could be determined for the location. The list can
483 * contain multiple items if the file is being analyzed in multiple contexts 495 * contain multiple items if the file is being analyzed in multiple contexts
484 * in conflicting ways (such as a part that is included in multiple 496 * in conflicting ways (such as a part that is included in multiple
485 * libraries). 497 * libraries).
486 */ 498 */
487 final List<HoverInformation> hovers; 499 final List<HoverInformation> hovers;
488 500
489 AnalysisGetHoverResult(this.hovers); 501 AnalysisGetHoverResult(this.hovers);
(...skipping 12 matching lines...) Expand all
502 } 514 }
503 } 515 }
504 516
505 factory AnalysisGetHoverResult.fromResponse(Response response) { 517 factory AnalysisGetHoverResult.fromResponse(Response response) {
506 return new AnalysisGetHoverResult.fromJson( 518 return new AnalysisGetHoverResult.fromJson(
507 new ResponseDecoder(), "result", response.result); 519 new ResponseDecoder(), "result", response.result);
508 } 520 }
509 521
510 Map<String, dynamic> toJson() { 522 Map<String, dynamic> toJson() {
511 Map<String, dynamic> result = {}; 523 Map<String, dynamic> result = {};
512 result["hovers"] = hovers.map((HoverInformation value) => value.toJson()); 524 result["hovers"] = hovers.map((HoverInformation value) => value.toJson()).to List();
513 return result; 525 return result;
514 } 526 }
515 527
516 @override 528 @override
517 String toString() => JSON.encode(toJson()); 529 String toString() => JSON.encode(toJson());
518 530
519 @override 531 @override
520 bool operator==(other) { 532 bool operator==(other) {
521 if (other is AnalysisGetHoverResult) { 533 if (other is AnalysisGetHoverResult) {
522 return _listEqual(hovers, other.hovers, (HoverInformation a, HoverInformat ion b) => a == b); 534 return _listEqual(hovers, other.hovers, (HoverInformation a, HoverInformat ion b) => a == b);
(...skipping 10 matching lines...) Expand all
533 } 545 }
534 546
535 /** 547 /**
536 * analysis.setAnalysisRoots params 548 * analysis.setAnalysisRoots params
537 * 549 *
538 * { 550 * {
539 * "included": List<FilePath> 551 * "included": List<FilePath>
540 * "excluded": List<FilePath> 552 * "excluded": List<FilePath>
541 * } 553 * }
542 */ 554 */
543 class AnalysisSetAnalysisRootsParams { 555 class AnalysisSetAnalysisRootsParams implements HasToJson {
544 /** 556 /**
545 * A list of the files and directories that should be analyzed. 557 * A list of the files and directories that should be analyzed.
546 */ 558 */
547 final List<String> included; 559 final List<String> included;
548 560
549 /** 561 /**
550 * A list of the files and directories within the included directories that 562 * A list of the files and directories within the included directories that
551 * should not be analyzed. 563 * should not be analyzed.
552 */ 564 */
553 final List<String> excluded; 565 final List<String> excluded;
(...skipping 25 matching lines...) Expand all
579 new RequestDecoder(request), "params", request.params); 591 new RequestDecoder(request), "params", request.params);
580 } 592 }
581 593
582 Map<String, dynamic> toJson() { 594 Map<String, dynamic> toJson() {
583 Map<String, dynamic> result = {}; 595 Map<String, dynamic> result = {};
584 result["included"] = included; 596 result["included"] = included;
585 result["excluded"] = excluded; 597 result["excluded"] = excluded;
586 return result; 598 return result;
587 } 599 }
588 600
601 Request toRequest(String id) {
602 return new Request(id, "analysis.setAnalysisRoots", toJson());
603 }
604
589 @override 605 @override
590 String toString() => JSON.encode(toJson()); 606 String toString() => JSON.encode(toJson());
591 607
592 @override 608 @override
593 bool operator==(other) { 609 bool operator==(other) {
594 if (other is AnalysisSetAnalysisRootsParams) { 610 if (other is AnalysisSetAnalysisRootsParams) {
595 return _listEqual(included, other.included, (String a, String b) => a == b ) && 611 return _listEqual(included, other.included, (String a, String b) => a == b ) &&
596 _listEqual(excluded, other.excluded, (String a, String b) => a == b); 612 _listEqual(excluded, other.excluded, (String a, String b) => a == b);
597 } 613 }
598 return false; 614 return false;
599 } 615 }
600 616
601 @override 617 @override
602 int get hashCode { 618 int get hashCode {
603 int hash = 0; 619 int hash = 0;
604 hash = _JenkinsSmiHash.combine(hash, included.hashCode); 620 hash = _JenkinsSmiHash.combine(hash, included.hashCode);
605 hash = _JenkinsSmiHash.combine(hash, excluded.hashCode); 621 hash = _JenkinsSmiHash.combine(hash, excluded.hashCode);
606 return _JenkinsSmiHash.finish(hash); 622 return _JenkinsSmiHash.finish(hash);
607 } 623 }
608 } 624 }
609 625
610 /** 626 /**
611 * analysis.setPriorityFiles params 627 * analysis.setPriorityFiles params
612 * 628 *
613 * { 629 * {
614 * "files": List<FilePath> 630 * "files": List<FilePath>
615 * } 631 * }
616 */ 632 */
617 class AnalysisSetPriorityFilesParams { 633 class AnalysisSetPriorityFilesParams implements HasToJson {
618 /** 634 /**
619 * The files that are to be a priority for analysis. 635 * The files that are to be a priority for analysis.
620 */ 636 */
621 final List<String> files; 637 final List<String> files;
622 638
623 AnalysisSetPriorityFilesParams(this.files); 639 AnalysisSetPriorityFilesParams(this.files);
624 640
625 factory AnalysisSetPriorityFilesParams.fromJson(JsonDecoder jsonDecoder, Strin g jsonPath, Object json) { 641 factory AnalysisSetPriorityFilesParams.fromJson(JsonDecoder jsonDecoder, Strin g jsonPath, Object json) {
626 if (json is Map) { 642 if (json is Map) {
627 List<String> files; 643 List<String> files;
(...skipping 12 matching lines...) Expand all
640 return new AnalysisSetPriorityFilesParams.fromJson( 656 return new AnalysisSetPriorityFilesParams.fromJson(
641 new RequestDecoder(request), "params", request.params); 657 new RequestDecoder(request), "params", request.params);
642 } 658 }
643 659
644 Map<String, dynamic> toJson() { 660 Map<String, dynamic> toJson() {
645 Map<String, dynamic> result = {}; 661 Map<String, dynamic> result = {};
646 result["files"] = files; 662 result["files"] = files;
647 return result; 663 return result;
648 } 664 }
649 665
666 Request toRequest(String id) {
667 return new Request(id, "analysis.setPriorityFiles", toJson());
668 }
669
650 @override 670 @override
651 String toString() => JSON.encode(toJson()); 671 String toString() => JSON.encode(toJson());
652 672
653 @override 673 @override
654 bool operator==(other) { 674 bool operator==(other) {
655 if (other is AnalysisSetPriorityFilesParams) { 675 if (other is AnalysisSetPriorityFilesParams) {
656 return _listEqual(files, other.files, (String a, String b) => a == b); 676 return _listEqual(files, other.files, (String a, String b) => a == b);
657 } 677 }
658 return false; 678 return false;
659 } 679 }
660 680
661 @override 681 @override
662 int get hashCode { 682 int get hashCode {
663 int hash = 0; 683 int hash = 0;
664 hash = _JenkinsSmiHash.combine(hash, files.hashCode); 684 hash = _JenkinsSmiHash.combine(hash, files.hashCode);
665 return _JenkinsSmiHash.finish(hash); 685 return _JenkinsSmiHash.finish(hash);
666 } 686 }
667 } 687 }
668 688
669 /** 689 /**
670 * analysis.setSubscriptions params 690 * analysis.setSubscriptions params
671 * 691 *
672 * { 692 * {
673 * "subscriptions": Map<AnalysisService, List<FilePath>> 693 * "subscriptions": Map<AnalysisService, List<FilePath>>
674 * } 694 * }
675 */ 695 */
676 class AnalysisSetSubscriptionsParams { 696 class AnalysisSetSubscriptionsParams implements HasToJson {
677 /** 697 /**
678 * A table mapping services to a list of the files being subscribed to the 698 * A table mapping services to a list of the files being subscribed to the
679 * service. 699 * service.
680 */ 700 */
681 final Map<AnalysisService, List<String>> subscriptions; 701 final Map<AnalysisService, List<String>> subscriptions;
682 702
683 AnalysisSetSubscriptionsParams(this.subscriptions); 703 AnalysisSetSubscriptionsParams(this.subscriptions);
684 704
685 factory AnalysisSetSubscriptionsParams.fromJson(JsonDecoder jsonDecoder, Strin g jsonPath, Object json) { 705 factory AnalysisSetSubscriptionsParams.fromJson(JsonDecoder jsonDecoder, Strin g jsonPath, Object json) {
686 if (json is Map) { 706 if (json is Map) {
(...skipping 13 matching lines...) Expand all
700 return new AnalysisSetSubscriptionsParams.fromJson( 720 return new AnalysisSetSubscriptionsParams.fromJson(
701 new RequestDecoder(request), "params", request.params); 721 new RequestDecoder(request), "params", request.params);
702 } 722 }
703 723
704 Map<String, dynamic> toJson() { 724 Map<String, dynamic> toJson() {
705 Map<String, dynamic> result = {}; 725 Map<String, dynamic> result = {};
706 result["subscriptions"] = _mapMap(subscriptions, keyCallback: (AnalysisServi ce value) => value.toJson()); 726 result["subscriptions"] = _mapMap(subscriptions, keyCallback: (AnalysisServi ce value) => value.toJson());
707 return result; 727 return result;
708 } 728 }
709 729
730 Request toRequest(String id) {
731 return new Request(id, "analysis.setSubscriptions", toJson());
732 }
733
710 @override 734 @override
711 String toString() => JSON.encode(toJson()); 735 String toString() => JSON.encode(toJson());
712 736
713 @override 737 @override
714 bool operator==(other) { 738 bool operator==(other) {
715 if (other is AnalysisSetSubscriptionsParams) { 739 if (other is AnalysisSetSubscriptionsParams) {
716 return _mapEqual(subscriptions, other.subscriptions, (List<String> a, List <String> b) => _listEqual(a, b, (String a, String b) => a == b)); 740 return _mapEqual(subscriptions, other.subscriptions, (List<String> a, List <String> b) => _listEqual(a, b, (String a, String b) => a == b));
717 } 741 }
718 return false; 742 return false;
719 } 743 }
720 744
721 @override 745 @override
722 int get hashCode { 746 int get hashCode {
723 int hash = 0; 747 int hash = 0;
724 hash = _JenkinsSmiHash.combine(hash, subscriptions.hashCode); 748 hash = _JenkinsSmiHash.combine(hash, subscriptions.hashCode);
725 return _JenkinsSmiHash.finish(hash); 749 return _JenkinsSmiHash.finish(hash);
726 } 750 }
727 } 751 }
728 752
729 /** 753 /**
730 * analysis.updateContent params 754 * analysis.updateContent params
731 * 755 *
732 * { 756 * {
733 * "files": Map<FilePath, AddContentOverlay | ChangeContentOverlay | RemoveCon tentOverlay> 757 * "files": Map<FilePath, AddContentOverlay | ChangeContentOverlay | RemoveCon tentOverlay>
734 * } 758 * }
735 */ 759 */
736 class AnalysisUpdateContentParams { 760 class AnalysisUpdateContentParams implements HasToJson {
737 /** 761 /**
738 * A table mapping the files whose content has changed to a description of 762 * A table mapping the files whose content has changed to a description of
739 * the content change. 763 * the content change.
740 */ 764 */
741 final Map<String, dynamic> files; 765 final Map<String, dynamic> files;
742 766
743 AnalysisUpdateContentParams(this.files); 767 AnalysisUpdateContentParams(this.files);
744 768
745 factory AnalysisUpdateContentParams.fromJson(JsonDecoder jsonDecoder, String j sonPath, Object json) { 769 factory AnalysisUpdateContentParams.fromJson(JsonDecoder jsonDecoder, String j sonPath, Object json) {
746 if (json is Map) { 770 if (json is Map) {
(...skipping 13 matching lines...) Expand all
760 return new AnalysisUpdateContentParams.fromJson( 784 return new AnalysisUpdateContentParams.fromJson(
761 new RequestDecoder(request), "params", request.params); 785 new RequestDecoder(request), "params", request.params);
762 } 786 }
763 787
764 Map<String, dynamic> toJson() { 788 Map<String, dynamic> toJson() {
765 Map<String, dynamic> result = {}; 789 Map<String, dynamic> result = {};
766 result["files"] = _mapMap(files, valueCallback: (dynamic value) => value.toJ son()); 790 result["files"] = _mapMap(files, valueCallback: (dynamic value) => value.toJ son());
767 return result; 791 return result;
768 } 792 }
769 793
794 Request toRequest(String id) {
795 return new Request(id, "analysis.updateContent", toJson());
796 }
797
770 @override 798 @override
771 String toString() => JSON.encode(toJson()); 799 String toString() => JSON.encode(toJson());
772 800
773 @override 801 @override
774 bool operator==(other) { 802 bool operator==(other) {
775 if (other is AnalysisUpdateContentParams) { 803 if (other is AnalysisUpdateContentParams) {
776 return _mapEqual(files, other.files, (dynamic a, dynamic b) => a == b); 804 return _mapEqual(files, other.files, (dynamic a, dynamic b) => a == b);
777 } 805 }
778 return false; 806 return false;
779 } 807 }
780 808
781 @override 809 @override
782 int get hashCode { 810 int get hashCode {
783 int hash = 0; 811 int hash = 0;
784 hash = _JenkinsSmiHash.combine(hash, files.hashCode); 812 hash = _JenkinsSmiHash.combine(hash, files.hashCode);
785 return _JenkinsSmiHash.finish(hash); 813 return _JenkinsSmiHash.finish(hash);
786 } 814 }
787 } 815 }
788 816
789 /** 817 /**
790 * analysis.updateOptions params 818 * analysis.updateOptions params
791 * 819 *
792 * { 820 * {
793 * "options": AnalysisOptions 821 * "options": AnalysisOptions
794 * } 822 * }
795 */ 823 */
796 class AnalysisUpdateOptionsParams { 824 class AnalysisUpdateOptionsParams implements HasToJson {
797 /** 825 /**
798 * The options that are to be used to control analysis. 826 * The options that are to be used to control analysis.
799 */ 827 */
800 final AnalysisOptions options; 828 final AnalysisOptions options;
801 829
802 AnalysisUpdateOptionsParams(this.options); 830 AnalysisUpdateOptionsParams(this.options);
803 831
804 factory AnalysisUpdateOptionsParams.fromJson(JsonDecoder jsonDecoder, String j sonPath, Object json) { 832 factory AnalysisUpdateOptionsParams.fromJson(JsonDecoder jsonDecoder, String j sonPath, Object json) {
805 if (json is Map) { 833 if (json is Map) {
806 AnalysisOptions options; 834 AnalysisOptions options;
(...skipping 12 matching lines...) Expand all
819 return new AnalysisUpdateOptionsParams.fromJson( 847 return new AnalysisUpdateOptionsParams.fromJson(
820 new RequestDecoder(request), "params", request.params); 848 new RequestDecoder(request), "params", request.params);
821 } 849 }
822 850
823 Map<String, dynamic> toJson() { 851 Map<String, dynamic> toJson() {
824 Map<String, dynamic> result = {}; 852 Map<String, dynamic> result = {};
825 result["options"] = options.toJson(); 853 result["options"] = options.toJson();
826 return result; 854 return result;
827 } 855 }
828 856
857 Request toRequest(String id) {
858 return new Request(id, "analysis.updateOptions", toJson());
859 }
860
829 @override 861 @override
830 String toString() => JSON.encode(toJson()); 862 String toString() => JSON.encode(toJson());
831 863
832 @override 864 @override
833 bool operator==(other) { 865 bool operator==(other) {
834 if (other is AnalysisUpdateOptionsParams) { 866 if (other is AnalysisUpdateOptionsParams) {
835 return options == other.options; 867 return options == other.options;
836 } 868 }
837 return false; 869 return false;
838 } 870 }
839 871
840 @override 872 @override
841 int get hashCode { 873 int get hashCode {
842 int hash = 0; 874 int hash = 0;
843 hash = _JenkinsSmiHash.combine(hash, options.hashCode); 875 hash = _JenkinsSmiHash.combine(hash, options.hashCode);
844 return _JenkinsSmiHash.finish(hash); 876 return _JenkinsSmiHash.finish(hash);
845 } 877 }
846 } 878 }
847 879
848 /** 880 /**
849 * analysis.errors params 881 * analysis.errors params
850 * 882 *
851 * { 883 * {
852 * "file": FilePath 884 * "file": FilePath
853 * "errors": List<AnalysisError> 885 * "errors": List<AnalysisError>
854 * } 886 * }
855 */ 887 */
856 class AnalysisErrorsParams { 888 class AnalysisErrorsParams implements HasToJson {
857 /** 889 /**
858 * The file containing the errors. 890 * The file containing the errors.
859 */ 891 */
860 final String file; 892 final String file;
861 893
862 /** 894 /**
863 * The errors contained in the file. 895 * The errors contained in the file.
864 */ 896 */
865 final List<AnalysisError> errors; 897 final List<AnalysisError> errors;
866 898
(...skipping 20 matching lines...) Expand all
887 } 919 }
888 920
889 factory AnalysisErrorsParams.fromNotification(Notification notification) { 921 factory AnalysisErrorsParams.fromNotification(Notification notification) {
890 return new AnalysisErrorsParams.fromJson( 922 return new AnalysisErrorsParams.fromJson(
891 new ResponseDecoder(), "params", notification.params); 923 new ResponseDecoder(), "params", notification.params);
892 } 924 }
893 925
894 Map<String, dynamic> toJson() { 926 Map<String, dynamic> toJson() {
895 Map<String, dynamic> result = {}; 927 Map<String, dynamic> result = {};
896 result["file"] = file; 928 result["file"] = file;
897 result["errors"] = errors.map((AnalysisError value) => value.toJson()); 929 result["errors"] = errors.map((AnalysisError value) => value.toJson()).toLis t();
898 return result; 930 return result;
899 } 931 }
900 932
901 @override 933 @override
902 String toString() => JSON.encode(toJson()); 934 String toString() => JSON.encode(toJson());
903 935
904 @override 936 @override
905 bool operator==(other) { 937 bool operator==(other) {
906 if (other is AnalysisErrorsParams) { 938 if (other is AnalysisErrorsParams) {
907 return file == other.file && 939 return file == other.file &&
(...skipping 11 matching lines...) Expand all
919 } 951 }
920 } 952 }
921 953
922 /** 954 /**
923 * analysis.flushResults params 955 * analysis.flushResults params
924 * 956 *
925 * { 957 * {
926 * "files": List<FilePath> 958 * "files": List<FilePath>
927 * } 959 * }
928 */ 960 */
929 class AnalysisFlushResultsParams { 961 class AnalysisFlushResultsParams implements HasToJson {
930 /** 962 /**
931 * The files that are no longer being analyzed. 963 * The files that are no longer being analyzed.
932 */ 964 */
933 final List<String> files; 965 final List<String> files;
934 966
935 AnalysisFlushResultsParams(this.files); 967 AnalysisFlushResultsParams(this.files);
936 968
937 factory AnalysisFlushResultsParams.fromJson(JsonDecoder jsonDecoder, String js onPath, Object json) { 969 factory AnalysisFlushResultsParams.fromJson(JsonDecoder jsonDecoder, String js onPath, Object json) {
938 if (json is Map) { 970 if (json is Map) {
939 List<String> files; 971 List<String> files;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 } 1011 }
980 1012
981 /** 1013 /**
982 * analysis.folding params 1014 * analysis.folding params
983 * 1015 *
984 * { 1016 * {
985 * "file": FilePath 1017 * "file": FilePath
986 * "regions": List<FoldingRegion> 1018 * "regions": List<FoldingRegion>
987 * } 1019 * }
988 */ 1020 */
989 class AnalysisFoldingParams { 1021 class AnalysisFoldingParams implements HasToJson {
990 /** 1022 /**
991 * The file containing the folding regions. 1023 * The file containing the folding regions.
992 */ 1024 */
993 final String file; 1025 final String file;
994 1026
995 /** 1027 /**
996 * The folding regions contained in the file. 1028 * The folding regions contained in the file.
997 */ 1029 */
998 final List<FoldingRegion> regions; 1030 final List<FoldingRegion> regions;
999 1031
(...skipping 20 matching lines...) Expand all
1020 } 1052 }
1021 1053
1022 factory AnalysisFoldingParams.fromNotification(Notification notification) { 1054 factory AnalysisFoldingParams.fromNotification(Notification notification) {
1023 return new AnalysisFoldingParams.fromJson( 1055 return new AnalysisFoldingParams.fromJson(
1024 new ResponseDecoder(), "params", notification.params); 1056 new ResponseDecoder(), "params", notification.params);
1025 } 1057 }
1026 1058
1027 Map<String, dynamic> toJson() { 1059 Map<String, dynamic> toJson() {
1028 Map<String, dynamic> result = {}; 1060 Map<String, dynamic> result = {};
1029 result["file"] = file; 1061 result["file"] = file;
1030 result["regions"] = regions.map((FoldingRegion value) => value.toJson()); 1062 result["regions"] = regions.map((FoldingRegion value) => value.toJson()).toL ist();
1031 return result; 1063 return result;
1032 } 1064 }
1033 1065
1034 @override 1066 @override
1035 String toString() => JSON.encode(toJson()); 1067 String toString() => JSON.encode(toJson());
1036 1068
1037 @override 1069 @override
1038 bool operator==(other) { 1070 bool operator==(other) {
1039 if (other is AnalysisFoldingParams) { 1071 if (other is AnalysisFoldingParams) {
1040 return file == other.file && 1072 return file == other.file &&
(...skipping 12 matching lines...) Expand all
1053 } 1085 }
1054 1086
1055 /** 1087 /**
1056 * analysis.highlights params 1088 * analysis.highlights params
1057 * 1089 *
1058 * { 1090 * {
1059 * "file": FilePath 1091 * "file": FilePath
1060 * "regions": List<HighlightRegion> 1092 * "regions": List<HighlightRegion>
1061 * } 1093 * }
1062 */ 1094 */
1063 class AnalysisHighlightsParams { 1095 class AnalysisHighlightsParams implements HasToJson {
1064 /** 1096 /**
1065 * The file containing the highlight regions. 1097 * The file containing the highlight regions.
1066 */ 1098 */
1067 final String file; 1099 final String file;
1068 1100
1069 /** 1101 /**
1070 * The highlight regions contained in the file. Each highlight region 1102 * The highlight regions contained in the file. Each highlight region
1071 * represents a particular syntactic or semantic meaning associated with some 1103 * represents a particular syntactic or semantic meaning associated with some
1072 * range. Note that the highlight regions that are returned can overlap other 1104 * range. Note that the highlight regions that are returned can overlap other
1073 * highlight regions if there is more than one meaning associated with a 1105 * highlight regions if there is more than one meaning associated with a
(...skipping 24 matching lines...) Expand all
1098 } 1130 }
1099 1131
1100 factory AnalysisHighlightsParams.fromNotification(Notification notification) { 1132 factory AnalysisHighlightsParams.fromNotification(Notification notification) {
1101 return new AnalysisHighlightsParams.fromJson( 1133 return new AnalysisHighlightsParams.fromJson(
1102 new ResponseDecoder(), "params", notification.params); 1134 new ResponseDecoder(), "params", notification.params);
1103 } 1135 }
1104 1136
1105 Map<String, dynamic> toJson() { 1137 Map<String, dynamic> toJson() {
1106 Map<String, dynamic> result = {}; 1138 Map<String, dynamic> result = {};
1107 result["file"] = file; 1139 result["file"] = file;
1108 result["regions"] = regions.map((HighlightRegion value) => value.toJson()); 1140 result["regions"] = regions.map((HighlightRegion value) => value.toJson()).t oList();
1109 return result; 1141 return result;
1110 } 1142 }
1111 1143
1112 @override 1144 @override
1113 String toString() => JSON.encode(toJson()); 1145 String toString() => JSON.encode(toJson());
1114 1146
1115 @override 1147 @override
1116 bool operator==(other) { 1148 bool operator==(other) {
1117 if (other is AnalysisHighlightsParams) { 1149 if (other is AnalysisHighlightsParams) {
1118 return file == other.file && 1150 return file == other.file &&
(...skipping 12 matching lines...) Expand all
1131 } 1163 }
1132 1164
1133 /** 1165 /**
1134 * analysis.navigation params 1166 * analysis.navigation params
1135 * 1167 *
1136 * { 1168 * {
1137 * "file": FilePath 1169 * "file": FilePath
1138 * "regions": List<NavigationRegion> 1170 * "regions": List<NavigationRegion>
1139 * } 1171 * }
1140 */ 1172 */
1141 class AnalysisNavigationParams { 1173 class AnalysisNavigationParams implements HasToJson {
1142 /** 1174 /**
1143 * The file containing the navigation regions. 1175 * The file containing the navigation regions.
1144 */ 1176 */
1145 final String file; 1177 final String file;
1146 1178
1147 /** 1179 /**
1148 * The navigation regions contained in the file. Each navigation region 1180 * The navigation regions contained in the file. Each navigation region
1149 * represents a list of targets associated with some range. The lists will 1181 * represents a list of targets associated with some range. The lists will
1150 * usually contain a single target, but can contain more in the case of a 1182 * usually contain a single target, but can contain more in the case of a
1151 * part that is included in multiple libraries or in Dart code that is 1183 * part that is included in multiple libraries or in Dart code that is
(...skipping 25 matching lines...) Expand all
1177 } 1209 }
1178 1210
1179 factory AnalysisNavigationParams.fromNotification(Notification notification) { 1211 factory AnalysisNavigationParams.fromNotification(Notification notification) {
1180 return new AnalysisNavigationParams.fromJson( 1212 return new AnalysisNavigationParams.fromJson(
1181 new ResponseDecoder(), "params", notification.params); 1213 new ResponseDecoder(), "params", notification.params);
1182 } 1214 }
1183 1215
1184 Map<String, dynamic> toJson() { 1216 Map<String, dynamic> toJson() {
1185 Map<String, dynamic> result = {}; 1217 Map<String, dynamic> result = {};
1186 result["file"] = file; 1218 result["file"] = file;
1187 result["regions"] = regions.map((NavigationRegion value) => value.toJson()); 1219 result["regions"] = regions.map((NavigationRegion value) => value.toJson()). toList();
1188 return result; 1220 return result;
1189 } 1221 }
1190 1222
1191 @override 1223 @override
1192 String toString() => JSON.encode(toJson()); 1224 String toString() => JSON.encode(toJson());
1193 1225
1194 @override 1226 @override
1195 bool operator==(other) { 1227 bool operator==(other) {
1196 if (other is AnalysisNavigationParams) { 1228 if (other is AnalysisNavigationParams) {
1197 return file == other.file && 1229 return file == other.file &&
(...skipping 12 matching lines...) Expand all
1210 } 1242 }
1211 1243
1212 /** 1244 /**
1213 * analysis.occurrences params 1245 * analysis.occurrences params
1214 * 1246 *
1215 * { 1247 * {
1216 * "file": FilePath 1248 * "file": FilePath
1217 * "occurrences": List<Occurrences> 1249 * "occurrences": List<Occurrences>
1218 * } 1250 * }
1219 */ 1251 */
1220 class AnalysisOccurrencesParams { 1252 class AnalysisOccurrencesParams implements HasToJson {
1221 /** 1253 /**
1222 * The file in which the references occur. 1254 * The file in which the references occur.
1223 */ 1255 */
1224 final String file; 1256 final String file;
1225 1257
1226 /** 1258 /**
1227 * The occurrences of references to elements within the file. 1259 * The occurrences of references to elements within the file.
1228 */ 1260 */
1229 final List<Occurrences> occurrences; 1261 final List<Occurrences> occurrences;
1230 1262
(...skipping 20 matching lines...) Expand all
1251 } 1283 }
1252 1284
1253 factory AnalysisOccurrencesParams.fromNotification(Notification notification) { 1285 factory AnalysisOccurrencesParams.fromNotification(Notification notification) {
1254 return new AnalysisOccurrencesParams.fromJson( 1286 return new AnalysisOccurrencesParams.fromJson(
1255 new ResponseDecoder(), "params", notification.params); 1287 new ResponseDecoder(), "params", notification.params);
1256 } 1288 }
1257 1289
1258 Map<String, dynamic> toJson() { 1290 Map<String, dynamic> toJson() {
1259 Map<String, dynamic> result = {}; 1291 Map<String, dynamic> result = {};
1260 result["file"] = file; 1292 result["file"] = file;
1261 result["occurrences"] = occurrences.map((Occurrences value) => value.toJson( )); 1293 result["occurrences"] = occurrences.map((Occurrences value) => value.toJson( )).toList();
1262 return result; 1294 return result;
1263 } 1295 }
1264 1296
1265 @override 1297 @override
1266 String toString() => JSON.encode(toJson()); 1298 String toString() => JSON.encode(toJson());
1267 1299
1268 @override 1300 @override
1269 bool operator==(other) { 1301 bool operator==(other) {
1270 if (other is AnalysisOccurrencesParams) { 1302 if (other is AnalysisOccurrencesParams) {
1271 return file == other.file && 1303 return file == other.file &&
(...skipping 12 matching lines...) Expand all
1284 } 1316 }
1285 1317
1286 /** 1318 /**
1287 * analysis.outline params 1319 * analysis.outline params
1288 * 1320 *
1289 * { 1321 * {
1290 * "file": FilePath 1322 * "file": FilePath
1291 * "outline": Outline 1323 * "outline": Outline
1292 * } 1324 * }
1293 */ 1325 */
1294 class AnalysisOutlineParams { 1326 class AnalysisOutlineParams implements HasToJson {
1295 /** 1327 /**
1296 * The file with which the outline is associated. 1328 * The file with which the outline is associated.
1297 */ 1329 */
1298 final String file; 1330 final String file;
1299 1331
1300 /** 1332 /**
1301 * The outline associated with the file. 1333 * The outline associated with the file.
1302 */ 1334 */
1303 final Outline outline; 1335 final Outline outline;
1304 1336
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 } 1390 }
1359 1391
1360 /** 1392 /**
1361 * analysis.overrides params 1393 * analysis.overrides params
1362 * 1394 *
1363 * { 1395 * {
1364 * "file": FilePath 1396 * "file": FilePath
1365 * "overrides": List<Override> 1397 * "overrides": List<Override>
1366 * } 1398 * }
1367 */ 1399 */
1368 class AnalysisOverridesParams { 1400 class AnalysisOverridesParams implements HasToJson {
1369 /** 1401 /**
1370 * The file with which the overrides are associated. 1402 * The file with which the overrides are associated.
1371 */ 1403 */
1372 final String file; 1404 final String file;
1373 1405
1374 /** 1406 /**
1375 * The overrides associated with the file. 1407 * The overrides associated with the file.
1376 */ 1408 */
1377 final List<Override> overrides; 1409 final List<Override> overrides;
1378 1410
(...skipping 20 matching lines...) Expand all
1399 } 1431 }
1400 1432
1401 factory AnalysisOverridesParams.fromNotification(Notification notification) { 1433 factory AnalysisOverridesParams.fromNotification(Notification notification) {
1402 return new AnalysisOverridesParams.fromJson( 1434 return new AnalysisOverridesParams.fromJson(
1403 new ResponseDecoder(), "params", notification.params); 1435 new ResponseDecoder(), "params", notification.params);
1404 } 1436 }
1405 1437
1406 Map<String, dynamic> toJson() { 1438 Map<String, dynamic> toJson() {
1407 Map<String, dynamic> result = {}; 1439 Map<String, dynamic> result = {};
1408 result["file"] = file; 1440 result["file"] = file;
1409 result["overrides"] = overrides.map((Override value) => value.toJson()); 1441 result["overrides"] = overrides.map((Override value) => value.toJson()).toLi st();
1410 return result; 1442 return result;
1411 } 1443 }
1412 1444
1413 @override 1445 @override
1414 String toString() => JSON.encode(toJson()); 1446 String toString() => JSON.encode(toJson());
1415 1447
1416 @override 1448 @override
1417 bool operator==(other) { 1449 bool operator==(other) {
1418 if (other is AnalysisOverridesParams) { 1450 if (other is AnalysisOverridesParams) {
1419 return file == other.file && 1451 return file == other.file &&
(...skipping 12 matching lines...) Expand all
1432 } 1464 }
1433 1465
1434 /** 1466 /**
1435 * completion.getSuggestions params 1467 * completion.getSuggestions params
1436 * 1468 *
1437 * { 1469 * {
1438 * "file": FilePath 1470 * "file": FilePath
1439 * "offset": int 1471 * "offset": int
1440 * } 1472 * }
1441 */ 1473 */
1442 class CompletionGetSuggestionsParams { 1474 class CompletionGetSuggestionsParams implements HasToJson {
1443 /** 1475 /**
1444 * The file containing the point at which suggestions are to be made. 1476 * The file containing the point at which suggestions are to be made.
1445 */ 1477 */
1446 final String file; 1478 final String file;
1447 1479
1448 /** 1480 /**
1449 * The offset within the file at which suggestions are to be made. 1481 * The offset within the file at which suggestions are to be made.
1450 */ 1482 */
1451 final int offset; 1483 final int offset;
1452 1484
(...skipping 24 matching lines...) Expand all
1477 new RequestDecoder(request), "params", request.params); 1509 new RequestDecoder(request), "params", request.params);
1478 } 1510 }
1479 1511
1480 Map<String, dynamic> toJson() { 1512 Map<String, dynamic> toJson() {
1481 Map<String, dynamic> result = {}; 1513 Map<String, dynamic> result = {};
1482 result["file"] = file; 1514 result["file"] = file;
1483 result["offset"] = offset; 1515 result["offset"] = offset;
1484 return result; 1516 return result;
1485 } 1517 }
1486 1518
1519 Request toRequest(String id) {
1520 return new Request(id, "completion.getSuggestions", toJson());
1521 }
1522
1487 @override 1523 @override
1488 String toString() => JSON.encode(toJson()); 1524 String toString() => JSON.encode(toJson());
1489 1525
1490 @override 1526 @override
1491 bool operator==(other) { 1527 bool operator==(other) {
1492 if (other is CompletionGetSuggestionsParams) { 1528 if (other is CompletionGetSuggestionsParams) {
1493 return file == other.file && 1529 return file == other.file &&
1494 offset == other.offset; 1530 offset == other.offset;
1495 } 1531 }
1496 return false; 1532 return false;
1497 } 1533 }
1498 1534
1499 @override 1535 @override
1500 int get hashCode { 1536 int get hashCode {
1501 int hash = 0; 1537 int hash = 0;
1502 hash = _JenkinsSmiHash.combine(hash, file.hashCode); 1538 hash = _JenkinsSmiHash.combine(hash, file.hashCode);
1503 hash = _JenkinsSmiHash.combine(hash, offset.hashCode); 1539 hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
1504 return _JenkinsSmiHash.finish(hash); 1540 return _JenkinsSmiHash.finish(hash);
1505 } 1541 }
1506 } 1542 }
1507 1543
1508 /** 1544 /**
1509 * completion.getSuggestions result 1545 * completion.getSuggestions result
1510 * 1546 *
1511 * { 1547 * {
1512 * "id": CompletionId 1548 * "id": CompletionId
1513 * } 1549 * }
1514 */ 1550 */
1515 class CompletionGetSuggestionsResult { 1551 class CompletionGetSuggestionsResult implements HasToJson {
1516 /** 1552 /**
1517 * The identifier used to associate results with this completion request. 1553 * The identifier used to associate results with this completion request.
1518 */ 1554 */
1519 final String id; 1555 final String id;
1520 1556
1521 CompletionGetSuggestionsResult(this.id); 1557 CompletionGetSuggestionsResult(this.id);
1522 1558
1523 factory CompletionGetSuggestionsResult.fromJson(JsonDecoder jsonDecoder, Strin g jsonPath, Object json) { 1559 factory CompletionGetSuggestionsResult.fromJson(JsonDecoder jsonDecoder, Strin g jsonPath, Object json) {
1524 if (json is Map) { 1560 if (json is Map) {
1525 String id; 1561 String id;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 * completion.results params 1604 * completion.results params
1569 * 1605 *
1570 * { 1606 * {
1571 * "id": CompletionId 1607 * "id": CompletionId
1572 * "replacementOffset": int 1608 * "replacementOffset": int
1573 * "replacementLength": int 1609 * "replacementLength": int
1574 * "results": List<CompletionSuggestion> 1610 * "results": List<CompletionSuggestion>
1575 * "last": bool 1611 * "last": bool
1576 * } 1612 * }
1577 */ 1613 */
1578 class CompletionResultsParams { 1614 class CompletionResultsParams implements HasToJson {
1579 /** 1615 /**
1580 * The id associated with the completion. 1616 * The id associated with the completion.
1581 */ 1617 */
1582 final String id; 1618 final String id;
1583 1619
1584 /** 1620 /**
1585 * The offset of the start of the text to be replaced. This will be different 1621 * The offset of the start of the text to be replaced. This will be different
1586 * than the offset used to request the completion suggestions if there was a 1622 * than the offset used to request the completion suggestions if there was a
1587 * portion of an identifier before the original offset. In particular, the 1623 * portion of an identifier before the original offset. In particular, the
1588 * replacementOffset will be the offset of the beginning of said identifier. 1624 * replacementOffset will be the offset of the beginning of said identifier.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 factory CompletionResultsParams.fromNotification(Notification notification) { 1690 factory CompletionResultsParams.fromNotification(Notification notification) {
1655 return new CompletionResultsParams.fromJson( 1691 return new CompletionResultsParams.fromJson(
1656 new ResponseDecoder(), "params", notification.params); 1692 new ResponseDecoder(), "params", notification.params);
1657 } 1693 }
1658 1694
1659 Map<String, dynamic> toJson() { 1695 Map<String, dynamic> toJson() {
1660 Map<String, dynamic> result = {}; 1696 Map<String, dynamic> result = {};
1661 result["id"] = id; 1697 result["id"] = id;
1662 result["replacementOffset"] = replacementOffset; 1698 result["replacementOffset"] = replacementOffset;
1663 result["replacementLength"] = replacementLength; 1699 result["replacementLength"] = replacementLength;
1664 result["results"] = results.map((CompletionSuggestion value) => value.toJson ()); 1700 result["results"] = results.map((CompletionSuggestion value) => value.toJson ()).toList();
1665 result["last"] = last; 1701 result["last"] = last;
1666 return result; 1702 return result;
1667 } 1703 }
1668 1704
1669 @override 1705 @override
1670 String toString() => JSON.encode(toJson()); 1706 String toString() => JSON.encode(toJson());
1671 1707
1672 @override 1708 @override
1673 bool operator==(other) { 1709 bool operator==(other) {
1674 if (other is CompletionResultsParams) { 1710 if (other is CompletionResultsParams) {
(...skipping 20 matching lines...) Expand all
1695 1731
1696 /** 1732 /**
1697 * search.findElementReferences params 1733 * search.findElementReferences params
1698 * 1734 *
1699 * { 1735 * {
1700 * "file": FilePath 1736 * "file": FilePath
1701 * "offset": int 1737 * "offset": int
1702 * "includePotential": bool 1738 * "includePotential": bool
1703 * } 1739 * }
1704 */ 1740 */
1705 class SearchFindElementReferencesParams { 1741 class SearchFindElementReferencesParams implements HasToJson {
1706 /** 1742 /**
1707 * The file containing the declaration of or reference to the element used to 1743 * The file containing the declaration of or reference to the element used to
1708 * define the search. 1744 * define the search.
1709 */ 1745 */
1710 final String file; 1746 final String file;
1711 1747
1712 /** 1748 /**
1713 * The offset within the file of the declaration of or reference to the 1749 * The offset within the file of the declaration of or reference to the
1714 * element. 1750 * element.
1715 */ 1751 */
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1754 } 1790 }
1755 1791
1756 Map<String, dynamic> toJson() { 1792 Map<String, dynamic> toJson() {
1757 Map<String, dynamic> result = {}; 1793 Map<String, dynamic> result = {};
1758 result["file"] = file; 1794 result["file"] = file;
1759 result["offset"] = offset; 1795 result["offset"] = offset;
1760 result["includePotential"] = includePotential; 1796 result["includePotential"] = includePotential;
1761 return result; 1797 return result;
1762 } 1798 }
1763 1799
1800 Request toRequest(String id) {
1801 return new Request(id, "search.findElementReferences", toJson());
1802 }
1803
1764 @override 1804 @override
1765 String toString() => JSON.encode(toJson()); 1805 String toString() => JSON.encode(toJson());
1766 1806
1767 @override 1807 @override
1768 bool operator==(other) { 1808 bool operator==(other) {
1769 if (other is SearchFindElementReferencesParams) { 1809 if (other is SearchFindElementReferencesParams) {
1770 return file == other.file && 1810 return file == other.file &&
1771 offset == other.offset && 1811 offset == other.offset &&
1772 includePotential == other.includePotential; 1812 includePotential == other.includePotential;
1773 } 1813 }
(...skipping 11 matching lines...) Expand all
1785 } 1825 }
1786 1826
1787 /** 1827 /**
1788 * search.findElementReferences result 1828 * search.findElementReferences result
1789 * 1829 *
1790 * { 1830 * {
1791 * "id": SearchId 1831 * "id": SearchId
1792 * "element": Element 1832 * "element": Element
1793 * } 1833 * }
1794 */ 1834 */
1795 class SearchFindElementReferencesResult { 1835 class SearchFindElementReferencesResult implements HasToJson {
1796 /** 1836 /**
1797 * The identifier used to associate results with this search request. 1837 * The identifier used to associate results with this search request.
1798 */ 1838 */
1799 final String id; 1839 final String id;
1800 1840
1801 /** 1841 /**
1802 * The element referenced or defined at the given offset and whose references 1842 * The element referenced or defined at the given offset and whose references
1803 * will be returned in the search results. 1843 * will be returned in the search results.
1804 */ 1844 */
1805 final Element element; 1845 final Element element;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1859 } 1899 }
1860 } 1900 }
1861 1901
1862 /** 1902 /**
1863 * search.findMemberDeclarations params 1903 * search.findMemberDeclarations params
1864 * 1904 *
1865 * { 1905 * {
1866 * "name": String 1906 * "name": String
1867 * } 1907 * }
1868 */ 1908 */
1869 class SearchFindMemberDeclarationsParams { 1909 class SearchFindMemberDeclarationsParams implements HasToJson {
1870 /** 1910 /**
1871 * The name of the declarations to be found. 1911 * The name of the declarations to be found.
1872 */ 1912 */
1873 final String name; 1913 final String name;
1874 1914
1875 SearchFindMemberDeclarationsParams(this.name); 1915 SearchFindMemberDeclarationsParams(this.name);
1876 1916
1877 factory SearchFindMemberDeclarationsParams.fromJson(JsonDecoder jsonDecoder, S tring jsonPath, Object json) { 1917 factory SearchFindMemberDeclarationsParams.fromJson(JsonDecoder jsonDecoder, S tring jsonPath, Object json) {
1878 if (json is Map) { 1918 if (json is Map) {
1879 String name; 1919 String name;
(...skipping 12 matching lines...) Expand all
1892 return new SearchFindMemberDeclarationsParams.fromJson( 1932 return new SearchFindMemberDeclarationsParams.fromJson(
1893 new RequestDecoder(request), "params", request.params); 1933 new RequestDecoder(request), "params", request.params);
1894 } 1934 }
1895 1935
1896 Map<String, dynamic> toJson() { 1936 Map<String, dynamic> toJson() {
1897 Map<String, dynamic> result = {}; 1937 Map<String, dynamic> result = {};
1898 result["name"] = name; 1938 result["name"] = name;
1899 return result; 1939 return result;
1900 } 1940 }
1901 1941
1942 Request toRequest(String id) {
1943 return new Request(id, "search.findMemberDeclarations", toJson());
1944 }
1945
1902 @override 1946 @override
1903 String toString() => JSON.encode(toJson()); 1947 String toString() => JSON.encode(toJson());
1904 1948
1905 @override 1949 @override
1906 bool operator==(other) { 1950 bool operator==(other) {
1907 if (other is SearchFindMemberDeclarationsParams) { 1951 if (other is SearchFindMemberDeclarationsParams) {
1908 return name == other.name; 1952 return name == other.name;
1909 } 1953 }
1910 return false; 1954 return false;
1911 } 1955 }
1912 1956
1913 @override 1957 @override
1914 int get hashCode { 1958 int get hashCode {
1915 int hash = 0; 1959 int hash = 0;
1916 hash = _JenkinsSmiHash.combine(hash, name.hashCode); 1960 hash = _JenkinsSmiHash.combine(hash, name.hashCode);
1917 return _JenkinsSmiHash.finish(hash); 1961 return _JenkinsSmiHash.finish(hash);
1918 } 1962 }
1919 } 1963 }
1920 1964
1921 /** 1965 /**
1922 * search.findMemberDeclarations result 1966 * search.findMemberDeclarations result
1923 * 1967 *
1924 * { 1968 * {
1925 * "id": SearchId 1969 * "id": SearchId
1926 * } 1970 * }
1927 */ 1971 */
1928 class SearchFindMemberDeclarationsResult { 1972 class SearchFindMemberDeclarationsResult implements HasToJson {
1929 /** 1973 /**
1930 * The identifier used to associate results with this search request. 1974 * The identifier used to associate results with this search request.
1931 */ 1975 */
1932 final String id; 1976 final String id;
1933 1977
1934 SearchFindMemberDeclarationsResult(this.id); 1978 SearchFindMemberDeclarationsResult(this.id);
1935 1979
1936 factory SearchFindMemberDeclarationsResult.fromJson(JsonDecoder jsonDecoder, S tring jsonPath, Object json) { 1980 factory SearchFindMemberDeclarationsResult.fromJson(JsonDecoder jsonDecoder, S tring jsonPath, Object json) {
1937 if (json is Map) { 1981 if (json is Map) {
1938 String id; 1982 String id;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 } 2021 }
1978 } 2022 }
1979 2023
1980 /** 2024 /**
1981 * search.findMemberReferences params 2025 * search.findMemberReferences params
1982 * 2026 *
1983 * { 2027 * {
1984 * "name": String 2028 * "name": String
1985 * } 2029 * }
1986 */ 2030 */
1987 class SearchFindMemberReferencesParams { 2031 class SearchFindMemberReferencesParams implements HasToJson {
1988 /** 2032 /**
1989 * The name of the references to be found. 2033 * The name of the references to be found.
1990 */ 2034 */
1991 final String name; 2035 final String name;
1992 2036
1993 SearchFindMemberReferencesParams(this.name); 2037 SearchFindMemberReferencesParams(this.name);
1994 2038
1995 factory SearchFindMemberReferencesParams.fromJson(JsonDecoder jsonDecoder, Str ing jsonPath, Object json) { 2039 factory SearchFindMemberReferencesParams.fromJson(JsonDecoder jsonDecoder, Str ing jsonPath, Object json) {
1996 if (json is Map) { 2040 if (json is Map) {
1997 String name; 2041 String name;
(...skipping 12 matching lines...) Expand all
2010 return new SearchFindMemberReferencesParams.fromJson( 2054 return new SearchFindMemberReferencesParams.fromJson(
2011 new RequestDecoder(request), "params", request.params); 2055 new RequestDecoder(request), "params", request.params);
2012 } 2056 }
2013 2057
2014 Map<String, dynamic> toJson() { 2058 Map<String, dynamic> toJson() {
2015 Map<String, dynamic> result = {}; 2059 Map<String, dynamic> result = {};
2016 result["name"] = name; 2060 result["name"] = name;
2017 return result; 2061 return result;
2018 } 2062 }
2019 2063
2064 Request toRequest(String id) {
2065 return new Request(id, "search.findMemberReferences", toJson());
2066 }
2067
2020 @override 2068 @override
2021 String toString() => JSON.encode(toJson()); 2069 String toString() => JSON.encode(toJson());
2022 2070
2023 @override 2071 @override
2024 bool operator==(other) { 2072 bool operator==(other) {
2025 if (other is SearchFindMemberReferencesParams) { 2073 if (other is SearchFindMemberReferencesParams) {
2026 return name == other.name; 2074 return name == other.name;
2027 } 2075 }
2028 return false; 2076 return false;
2029 } 2077 }
2030 2078
2031 @override 2079 @override
2032 int get hashCode { 2080 int get hashCode {
2033 int hash = 0; 2081 int hash = 0;
2034 hash = _JenkinsSmiHash.combine(hash, name.hashCode); 2082 hash = _JenkinsSmiHash.combine(hash, name.hashCode);
2035 return _JenkinsSmiHash.finish(hash); 2083 return _JenkinsSmiHash.finish(hash);
2036 } 2084 }
2037 } 2085 }
2038 2086
2039 /** 2087 /**
2040 * search.findMemberReferences result 2088 * search.findMemberReferences result
2041 * 2089 *
2042 * { 2090 * {
2043 * "id": SearchId 2091 * "id": SearchId
2044 * } 2092 * }
2045 */ 2093 */
2046 class SearchFindMemberReferencesResult { 2094 class SearchFindMemberReferencesResult implements HasToJson {
2047 /** 2095 /**
2048 * The identifier used to associate results with this search request. 2096 * The identifier used to associate results with this search request.
2049 */ 2097 */
2050 final String id; 2098 final String id;
2051 2099
2052 SearchFindMemberReferencesResult(this.id); 2100 SearchFindMemberReferencesResult(this.id);
2053 2101
2054 factory SearchFindMemberReferencesResult.fromJson(JsonDecoder jsonDecoder, Str ing jsonPath, Object json) { 2102 factory SearchFindMemberReferencesResult.fromJson(JsonDecoder jsonDecoder, Str ing jsonPath, Object json) {
2055 if (json is Map) { 2103 if (json is Map) {
2056 String id; 2104 String id;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2095 } 2143 }
2096 } 2144 }
2097 2145
2098 /** 2146 /**
2099 * search.findTopLevelDeclarations params 2147 * search.findTopLevelDeclarations params
2100 * 2148 *
2101 * { 2149 * {
2102 * "pattern": String 2150 * "pattern": String
2103 * } 2151 * }
2104 */ 2152 */
2105 class SearchFindTopLevelDeclarationsParams { 2153 class SearchFindTopLevelDeclarationsParams implements HasToJson {
2106 /** 2154 /**
2107 * The regular expression used to match the names of the declarations to be 2155 * The regular expression used to match the names of the declarations to be
2108 * found. 2156 * found.
2109 */ 2157 */
2110 final String pattern; 2158 final String pattern;
2111 2159
2112 SearchFindTopLevelDeclarationsParams(this.pattern); 2160 SearchFindTopLevelDeclarationsParams(this.pattern);
2113 2161
2114 factory SearchFindTopLevelDeclarationsParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 2162 factory SearchFindTopLevelDeclarationsParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
2115 if (json is Map) { 2163 if (json is Map) {
(...skipping 13 matching lines...) Expand all
2129 return new SearchFindTopLevelDeclarationsParams.fromJson( 2177 return new SearchFindTopLevelDeclarationsParams.fromJson(
2130 new RequestDecoder(request), "params", request.params); 2178 new RequestDecoder(request), "params", request.params);
2131 } 2179 }
2132 2180
2133 Map<String, dynamic> toJson() { 2181 Map<String, dynamic> toJson() {
2134 Map<String, dynamic> result = {}; 2182 Map<String, dynamic> result = {};
2135 result["pattern"] = pattern; 2183 result["pattern"] = pattern;
2136 return result; 2184 return result;
2137 } 2185 }
2138 2186
2187 Request toRequest(String id) {
2188 return new Request(id, "search.findTopLevelDeclarations", toJson());
2189 }
2190
2139 @override 2191 @override
2140 String toString() => JSON.encode(toJson()); 2192 String toString() => JSON.encode(toJson());
2141 2193
2142 @override 2194 @override
2143 bool operator==(other) { 2195 bool operator==(other) {
2144 if (other is SearchFindTopLevelDeclarationsParams) { 2196 if (other is SearchFindTopLevelDeclarationsParams) {
2145 return pattern == other.pattern; 2197 return pattern == other.pattern;
2146 } 2198 }
2147 return false; 2199 return false;
2148 } 2200 }
2149 2201
2150 @override 2202 @override
2151 int get hashCode { 2203 int get hashCode {
2152 int hash = 0; 2204 int hash = 0;
2153 hash = _JenkinsSmiHash.combine(hash, pattern.hashCode); 2205 hash = _JenkinsSmiHash.combine(hash, pattern.hashCode);
2154 return _JenkinsSmiHash.finish(hash); 2206 return _JenkinsSmiHash.finish(hash);
2155 } 2207 }
2156 } 2208 }
2157 2209
2158 /** 2210 /**
2159 * search.findTopLevelDeclarations result 2211 * search.findTopLevelDeclarations result
2160 * 2212 *
2161 * { 2213 * {
2162 * "id": SearchId 2214 * "id": SearchId
2163 * } 2215 * }
2164 */ 2216 */
2165 class SearchFindTopLevelDeclarationsResult { 2217 class SearchFindTopLevelDeclarationsResult implements HasToJson {
2166 /** 2218 /**
2167 * The identifier used to associate results with this search request. 2219 * The identifier used to associate results with this search request.
2168 */ 2220 */
2169 final String id; 2221 final String id;
2170 2222
2171 SearchFindTopLevelDeclarationsResult(this.id); 2223 SearchFindTopLevelDeclarationsResult(this.id);
2172 2224
2173 factory SearchFindTopLevelDeclarationsResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 2225 factory SearchFindTopLevelDeclarationsResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
2174 if (json is Map) { 2226 if (json is Map) {
2175 String id; 2227 String id;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
2215 } 2267 }
2216 2268
2217 /** 2269 /**
2218 * search.getTypeHierarchy params 2270 * search.getTypeHierarchy params
2219 * 2271 *
2220 * { 2272 * {
2221 * "file": FilePath 2273 * "file": FilePath
2222 * "offset": int 2274 * "offset": int
2223 * } 2275 * }
2224 */ 2276 */
2225 class SearchGetTypeHierarchyParams { 2277 class SearchGetTypeHierarchyParams implements HasToJson {
2226 /** 2278 /**
2227 * The file containing the declaration or reference to the type for which a 2279 * The file containing the declaration or reference to the type for which a
2228 * hierarchy is being requested. 2280 * hierarchy is being requested.
2229 */ 2281 */
2230 final String file; 2282 final String file;
2231 2283
2232 /** 2284 /**
2233 * The offset of the name of the type within the file. 2285 * The offset of the name of the type within the file.
2234 */ 2286 */
2235 final int offset; 2287 final int offset;
(...skipping 25 matching lines...) Expand all
2261 new RequestDecoder(request), "params", request.params); 2313 new RequestDecoder(request), "params", request.params);
2262 } 2314 }
2263 2315
2264 Map<String, dynamic> toJson() { 2316 Map<String, dynamic> toJson() {
2265 Map<String, dynamic> result = {}; 2317 Map<String, dynamic> result = {};
2266 result["file"] = file; 2318 result["file"] = file;
2267 result["offset"] = offset; 2319 result["offset"] = offset;
2268 return result; 2320 return result;
2269 } 2321 }
2270 2322
2323 Request toRequest(String id) {
2324 return new Request(id, "search.getTypeHierarchy", toJson());
2325 }
2326
2271 @override 2327 @override
2272 String toString() => JSON.encode(toJson()); 2328 String toString() => JSON.encode(toJson());
2273 2329
2274 @override 2330 @override
2275 bool operator==(other) { 2331 bool operator==(other) {
2276 if (other is SearchGetTypeHierarchyParams) { 2332 if (other is SearchGetTypeHierarchyParams) {
2277 return file == other.file && 2333 return file == other.file &&
2278 offset == other.offset; 2334 offset == other.offset;
2279 } 2335 }
2280 return false; 2336 return false;
2281 } 2337 }
2282 2338
2283 @override 2339 @override
2284 int get hashCode { 2340 int get hashCode {
2285 int hash = 0; 2341 int hash = 0;
2286 hash = _JenkinsSmiHash.combine(hash, file.hashCode); 2342 hash = _JenkinsSmiHash.combine(hash, file.hashCode);
2287 hash = _JenkinsSmiHash.combine(hash, offset.hashCode); 2343 hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
2288 return _JenkinsSmiHash.finish(hash); 2344 return _JenkinsSmiHash.finish(hash);
2289 } 2345 }
2290 } 2346 }
2291 2347
2292 /** 2348 /**
2293 * search.getTypeHierarchy result 2349 * search.getTypeHierarchy result
2294 * 2350 *
2295 * { 2351 * {
2296 * "hierarchyItems": optional List<TypeHierarchyItem> 2352 * "hierarchyItems": optional List<TypeHierarchyItem>
2297 * } 2353 * }
2298 */ 2354 */
2299 class SearchGetTypeHierarchyResult { 2355 class SearchGetTypeHierarchyResult implements HasToJson {
2300 /** 2356 /**
2301 * A list of the types in the requested hierarchy. The first element of the 2357 * A list of the types in the requested hierarchy. The first element of the
2302 * list is the item representing the type for which the hierarchy was 2358 * list is the item representing the type for which the hierarchy was
2303 * requested. The index of other elements of the list is unspecified, but 2359 * requested. The index of other elements of the list is unspecified, but
2304 * correspond to the integers used to reference supertype and subtype items 2360 * correspond to the integers used to reference supertype and subtype items
2305 * within the items. 2361 * within the items.
2306 * 2362 *
2307 * This field will be absent if the code at the given file and offset does 2363 * This field will be absent if the code at the given file and offset does
2308 * not represent a type, or if the file has not been sufficiently analyzed to 2364 * not represent a type, or if the file has not been sufficiently analyzed to
2309 * allow a type hierarchy to be produced. 2365 * allow a type hierarchy to be produced.
(...skipping 15 matching lines...) Expand all
2325 } 2381 }
2326 2382
2327 factory SearchGetTypeHierarchyResult.fromResponse(Response response) { 2383 factory SearchGetTypeHierarchyResult.fromResponse(Response response) {
2328 return new SearchGetTypeHierarchyResult.fromJson( 2384 return new SearchGetTypeHierarchyResult.fromJson(
2329 new ResponseDecoder(), "result", response.result); 2385 new ResponseDecoder(), "result", response.result);
2330 } 2386 }
2331 2387
2332 Map<String, dynamic> toJson() { 2388 Map<String, dynamic> toJson() {
2333 Map<String, dynamic> result = {}; 2389 Map<String, dynamic> result = {};
2334 if (hierarchyItems != null) { 2390 if (hierarchyItems != null) {
2335 result["hierarchyItems"] = hierarchyItems.map((TypeHierarchyItem value) => value.toJson()); 2391 result["hierarchyItems"] = hierarchyItems.map((TypeHierarchyItem value) => value.toJson()).toList();
2336 } 2392 }
2337 return result; 2393 return result;
2338 } 2394 }
2339 2395
2340 @override 2396 @override
2341 String toString() => JSON.encode(toJson()); 2397 String toString() => JSON.encode(toJson());
2342 2398
2343 @override 2399 @override
2344 bool operator==(other) { 2400 bool operator==(other) {
2345 if (other is SearchGetTypeHierarchyResult) { 2401 if (other is SearchGetTypeHierarchyResult) {
(...skipping 12 matching lines...) Expand all
2358 2414
2359 /** 2415 /**
2360 * search.results params 2416 * search.results params
2361 * 2417 *
2362 * { 2418 * {
2363 * "id": SearchId 2419 * "id": SearchId
2364 * "results": List<SearchResult> 2420 * "results": List<SearchResult>
2365 * "last": bool 2421 * "last": bool
2366 * } 2422 * }
2367 */ 2423 */
2368 class SearchResultsParams { 2424 class SearchResultsParams implements HasToJson {
2369 /** 2425 /**
2370 * The id associated with the search. 2426 * The id associated with the search.
2371 */ 2427 */
2372 final String id; 2428 final String id;
2373 2429
2374 /** 2430 /**
2375 * The search results being reported. 2431 * The search results being reported.
2376 */ 2432 */
2377 final List<SearchResult> results; 2433 final List<SearchResult> results;
2378 2434
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
2411 } 2467 }
2412 2468
2413 factory SearchResultsParams.fromNotification(Notification notification) { 2469 factory SearchResultsParams.fromNotification(Notification notification) {
2414 return new SearchResultsParams.fromJson( 2470 return new SearchResultsParams.fromJson(
2415 new ResponseDecoder(), "params", notification.params); 2471 new ResponseDecoder(), "params", notification.params);
2416 } 2472 }
2417 2473
2418 Map<String, dynamic> toJson() { 2474 Map<String, dynamic> toJson() {
2419 Map<String, dynamic> result = {}; 2475 Map<String, dynamic> result = {};
2420 result["id"] = id; 2476 result["id"] = id;
2421 result["results"] = results.map((SearchResult value) => value.toJson()); 2477 result["results"] = results.map((SearchResult value) => value.toJson()).toLi st();
2422 result["last"] = last; 2478 result["last"] = last;
2423 return result; 2479 return result;
2424 } 2480 }
2425 2481
2426 @override 2482 @override
2427 String toString() => JSON.encode(toJson()); 2483 String toString() => JSON.encode(toJson());
2428 2484
2429 @override 2485 @override
2430 bool operator==(other) { 2486 bool operator==(other) {
2431 if (other is SearchResultsParams) { 2487 if (other is SearchResultsParams) {
(...skipping 16 matching lines...) Expand all
2448 2504
2449 /** 2505 /**
2450 * edit.getAssists params 2506 * edit.getAssists params
2451 * 2507 *
2452 * { 2508 * {
2453 * "file": FilePath 2509 * "file": FilePath
2454 * "offset": int 2510 * "offset": int
2455 * "length": int 2511 * "length": int
2456 * } 2512 * }
2457 */ 2513 */
2458 class EditGetAssistsParams { 2514 class EditGetAssistsParams implements HasToJson {
2459 /** 2515 /**
2460 * The file containing the code for which assists are being requested. 2516 * The file containing the code for which assists are being requested.
2461 */ 2517 */
2462 final String file; 2518 final String file;
2463 2519
2464 /** 2520 /**
2465 * The offset of the code for which assists are being requested. 2521 * The offset of the code for which assists are being requested.
2466 */ 2522 */
2467 final int offset; 2523 final int offset;
2468 2524
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2505 } 2561 }
2506 2562
2507 Map<String, dynamic> toJson() { 2563 Map<String, dynamic> toJson() {
2508 Map<String, dynamic> result = {}; 2564 Map<String, dynamic> result = {};
2509 result["file"] = file; 2565 result["file"] = file;
2510 result["offset"] = offset; 2566 result["offset"] = offset;
2511 result["length"] = length; 2567 result["length"] = length;
2512 return result; 2568 return result;
2513 } 2569 }
2514 2570
2571 Request toRequest(String id) {
2572 return new Request(id, "edit.getAssists", toJson());
2573 }
2574
2515 @override 2575 @override
2516 String toString() => JSON.encode(toJson()); 2576 String toString() => JSON.encode(toJson());
2517 2577
2518 @override 2578 @override
2519 bool operator==(other) { 2579 bool operator==(other) {
2520 if (other is EditGetAssistsParams) { 2580 if (other is EditGetAssistsParams) {
2521 return file == other.file && 2581 return file == other.file &&
2522 offset == other.offset && 2582 offset == other.offset &&
2523 length == other.length; 2583 length == other.length;
2524 } 2584 }
(...skipping 10 matching lines...) Expand all
2535 } 2595 }
2536 } 2596 }
2537 2597
2538 /** 2598 /**
2539 * edit.getAssists result 2599 * edit.getAssists result
2540 * 2600 *
2541 * { 2601 * {
2542 * "assists": List<SourceChange> 2602 * "assists": List<SourceChange>
2543 * } 2603 * }
2544 */ 2604 */
2545 class EditGetAssistsResult { 2605 class EditGetAssistsResult implements HasToJson {
2546 /** 2606 /**
2547 * The assists that are available at the given location. 2607 * The assists that are available at the given location.
2548 */ 2608 */
2549 final List<SourceChange> assists; 2609 final List<SourceChange> assists;
2550 2610
2551 EditGetAssistsResult(this.assists); 2611 EditGetAssistsResult(this.assists);
2552 2612
2553 factory EditGetAssistsResult.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) { 2613 factory EditGetAssistsResult.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) {
2554 if (json is Map) { 2614 if (json is Map) {
2555 List<SourceChange> assists; 2615 List<SourceChange> assists;
2556 if (json.containsKey("assists")) { 2616 if (json.containsKey("assists")) {
2557 assists = jsonDecoder._decodeList(jsonPath + ".assists", json["assists"] , (String jsonPath, Object json) => new SourceChange.fromJson(jsonDecoder, jsonP ath, json)); 2617 assists = jsonDecoder._decodeList(jsonPath + ".assists", json["assists"] , (String jsonPath, Object json) => new SourceChange.fromJson(jsonDecoder, jsonP ath, json));
2558 } else { 2618 } else {
2559 throw jsonDecoder.missingKey(jsonPath, "assists"); 2619 throw jsonDecoder.missingKey(jsonPath, "assists");
2560 } 2620 }
2561 return new EditGetAssistsResult(assists); 2621 return new EditGetAssistsResult(assists);
2562 } else { 2622 } else {
2563 throw jsonDecoder.mismatch(jsonPath, "edit.getAssists result"); 2623 throw jsonDecoder.mismatch(jsonPath, "edit.getAssists result");
2564 } 2624 }
2565 } 2625 }
2566 2626
2567 factory EditGetAssistsResult.fromResponse(Response response) { 2627 factory EditGetAssistsResult.fromResponse(Response response) {
2568 return new EditGetAssistsResult.fromJson( 2628 return new EditGetAssistsResult.fromJson(
2569 new ResponseDecoder(), "result", response.result); 2629 new ResponseDecoder(), "result", response.result);
2570 } 2630 }
2571 2631
2572 Map<String, dynamic> toJson() { 2632 Map<String, dynamic> toJson() {
2573 Map<String, dynamic> result = {}; 2633 Map<String, dynamic> result = {};
2574 result["assists"] = assists.map((SourceChange value) => value.toJson()); 2634 result["assists"] = assists.map((SourceChange value) => value.toJson()).toLi st();
2575 return result; 2635 return result;
2576 } 2636 }
2577 2637
2578 @override 2638 @override
2579 String toString() => JSON.encode(toJson()); 2639 String toString() => JSON.encode(toJson());
2580 2640
2581 @override 2641 @override
2582 bool operator==(other) { 2642 bool operator==(other) {
2583 if (other is EditGetAssistsResult) { 2643 if (other is EditGetAssistsResult) {
2584 return _listEqual(assists, other.assists, (SourceChange a, SourceChange b) => a == b); 2644 return _listEqual(assists, other.assists, (SourceChange a, SourceChange b) => a == b);
(...skipping 11 matching lines...) Expand all
2596 2656
2597 /** 2657 /**
2598 * edit.getAvailableRefactorings params 2658 * edit.getAvailableRefactorings params
2599 * 2659 *
2600 * { 2660 * {
2601 * "file": FilePath 2661 * "file": FilePath
2602 * "offset": int 2662 * "offset": int
2603 * "length": int 2663 * "length": int
2604 * } 2664 * }
2605 */ 2665 */
2606 class EditGetAvailableRefactoringsParams { 2666 class EditGetAvailableRefactoringsParams implements HasToJson {
2607 /** 2667 /**
2608 * The file containing the code on which the refactoring would be based. 2668 * The file containing the code on which the refactoring would be based.
2609 */ 2669 */
2610 final String file; 2670 final String file;
2611 2671
2612 /** 2672 /**
2613 * The offset of the code on which the refactoring would be based. 2673 * The offset of the code on which the refactoring would be based.
2614 */ 2674 */
2615 final int offset; 2675 final int offset;
2616 2676
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2653 } 2713 }
2654 2714
2655 Map<String, dynamic> toJson() { 2715 Map<String, dynamic> toJson() {
2656 Map<String, dynamic> result = {}; 2716 Map<String, dynamic> result = {};
2657 result["file"] = file; 2717 result["file"] = file;
2658 result["offset"] = offset; 2718 result["offset"] = offset;
2659 result["length"] = length; 2719 result["length"] = length;
2660 return result; 2720 return result;
2661 } 2721 }
2662 2722
2723 Request toRequest(String id) {
2724 return new Request(id, "edit.getAvailableRefactorings", toJson());
2725 }
2726
2663 @override 2727 @override
2664 String toString() => JSON.encode(toJson()); 2728 String toString() => JSON.encode(toJson());
2665 2729
2666 @override 2730 @override
2667 bool operator==(other) { 2731 bool operator==(other) {
2668 if (other is EditGetAvailableRefactoringsParams) { 2732 if (other is EditGetAvailableRefactoringsParams) {
2669 return file == other.file && 2733 return file == other.file &&
2670 offset == other.offset && 2734 offset == other.offset &&
2671 length == other.length; 2735 length == other.length;
2672 } 2736 }
(...skipping 10 matching lines...) Expand all
2683 } 2747 }
2684 } 2748 }
2685 2749
2686 /** 2750 /**
2687 * edit.getAvailableRefactorings result 2751 * edit.getAvailableRefactorings result
2688 * 2752 *
2689 * { 2753 * {
2690 * "kinds": List<RefactoringKind> 2754 * "kinds": List<RefactoringKind>
2691 * } 2755 * }
2692 */ 2756 */
2693 class EditGetAvailableRefactoringsResult { 2757 class EditGetAvailableRefactoringsResult implements HasToJson {
2694 /** 2758 /**
2695 * The kinds of refactorings that are valid for the given selection. 2759 * The kinds of refactorings that are valid for the given selection.
2696 */ 2760 */
2697 final List<RefactoringKind> kinds; 2761 final List<RefactoringKind> kinds;
2698 2762
2699 EditGetAvailableRefactoringsResult(this.kinds); 2763 EditGetAvailableRefactoringsResult(this.kinds);
2700 2764
2701 factory EditGetAvailableRefactoringsResult.fromJson(JsonDecoder jsonDecoder, S tring jsonPath, Object json) { 2765 factory EditGetAvailableRefactoringsResult.fromJson(JsonDecoder jsonDecoder, S tring jsonPath, Object json) {
2702 if (json is Map) { 2766 if (json is Map) {
2703 List<RefactoringKind> kinds; 2767 List<RefactoringKind> kinds;
2704 if (json.containsKey("kinds")) { 2768 if (json.containsKey("kinds")) {
2705 kinds = jsonDecoder._decodeList(jsonPath + ".kinds", json["kinds"], (Str ing jsonPath, Object json) => new RefactoringKind.fromJson(jsonDecoder, jsonPath , json)); 2769 kinds = jsonDecoder._decodeList(jsonPath + ".kinds", json["kinds"], (Str ing jsonPath, Object json) => new RefactoringKind.fromJson(jsonDecoder, jsonPath , json));
2706 } else { 2770 } else {
2707 throw jsonDecoder.missingKey(jsonPath, "kinds"); 2771 throw jsonDecoder.missingKey(jsonPath, "kinds");
2708 } 2772 }
2709 return new EditGetAvailableRefactoringsResult(kinds); 2773 return new EditGetAvailableRefactoringsResult(kinds);
2710 } else { 2774 } else {
2711 throw jsonDecoder.mismatch(jsonPath, "edit.getAvailableRefactorings result "); 2775 throw jsonDecoder.mismatch(jsonPath, "edit.getAvailableRefactorings result ");
2712 } 2776 }
2713 } 2777 }
2714 2778
2715 factory EditGetAvailableRefactoringsResult.fromResponse(Response response) { 2779 factory EditGetAvailableRefactoringsResult.fromResponse(Response response) {
2716 return new EditGetAvailableRefactoringsResult.fromJson( 2780 return new EditGetAvailableRefactoringsResult.fromJson(
2717 new ResponseDecoder(), "result", response.result); 2781 new ResponseDecoder(), "result", response.result);
2718 } 2782 }
2719 2783
2720 Map<String, dynamic> toJson() { 2784 Map<String, dynamic> toJson() {
2721 Map<String, dynamic> result = {}; 2785 Map<String, dynamic> result = {};
2722 result["kinds"] = kinds.map((RefactoringKind value) => value.toJson()); 2786 result["kinds"] = kinds.map((RefactoringKind value) => value.toJson()).toLis t();
2723 return result; 2787 return result;
2724 } 2788 }
2725 2789
2726 @override 2790 @override
2727 String toString() => JSON.encode(toJson()); 2791 String toString() => JSON.encode(toJson());
2728 2792
2729 @override 2793 @override
2730 bool operator==(other) { 2794 bool operator==(other) {
2731 if (other is EditGetAvailableRefactoringsResult) { 2795 if (other is EditGetAvailableRefactoringsResult) {
2732 return _listEqual(kinds, other.kinds, (RefactoringKind a, RefactoringKind b) => a == b); 2796 return _listEqual(kinds, other.kinds, (RefactoringKind a, RefactoringKind b) => a == b);
(...skipping 10 matching lines...) Expand all
2743 } 2807 }
2744 2808
2745 /** 2809 /**
2746 * edit.getFixes params 2810 * edit.getFixes params
2747 * 2811 *
2748 * { 2812 * {
2749 * "file": FilePath 2813 * "file": FilePath
2750 * "offset": int 2814 * "offset": int
2751 * } 2815 * }
2752 */ 2816 */
2753 class EditGetFixesParams { 2817 class EditGetFixesParams implements HasToJson {
2754 /** 2818 /**
2755 * The file containing the errors for which fixes are being requested. 2819 * The file containing the errors for which fixes are being requested.
2756 */ 2820 */
2757 final String file; 2821 final String file;
2758 2822
2759 /** 2823 /**
2760 * The offset used to select the errors for which fixes will be returned. 2824 * The offset used to select the errors for which fixes will be returned.
2761 */ 2825 */
2762 final int offset; 2826 final int offset;
2763 2827
(...skipping 24 matching lines...) Expand all
2788 new RequestDecoder(request), "params", request.params); 2852 new RequestDecoder(request), "params", request.params);
2789 } 2853 }
2790 2854
2791 Map<String, dynamic> toJson() { 2855 Map<String, dynamic> toJson() {
2792 Map<String, dynamic> result = {}; 2856 Map<String, dynamic> result = {};
2793 result["file"] = file; 2857 result["file"] = file;
2794 result["offset"] = offset; 2858 result["offset"] = offset;
2795 return result; 2859 return result;
2796 } 2860 }
2797 2861
2862 Request toRequest(String id) {
2863 return new Request(id, "edit.getFixes", toJson());
2864 }
2865
2798 @override 2866 @override
2799 String toString() => JSON.encode(toJson()); 2867 String toString() => JSON.encode(toJson());
2800 2868
2801 @override 2869 @override
2802 bool operator==(other) { 2870 bool operator==(other) {
2803 if (other is EditGetFixesParams) { 2871 if (other is EditGetFixesParams) {
2804 return file == other.file && 2872 return file == other.file &&
2805 offset == other.offset; 2873 offset == other.offset;
2806 } 2874 }
2807 return false; 2875 return false;
2808 } 2876 }
2809 2877
2810 @override 2878 @override
2811 int get hashCode { 2879 int get hashCode {
2812 int hash = 0; 2880 int hash = 0;
2813 hash = _JenkinsSmiHash.combine(hash, file.hashCode); 2881 hash = _JenkinsSmiHash.combine(hash, file.hashCode);
2814 hash = _JenkinsSmiHash.combine(hash, offset.hashCode); 2882 hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
2815 return _JenkinsSmiHash.finish(hash); 2883 return _JenkinsSmiHash.finish(hash);
2816 } 2884 }
2817 } 2885 }
2818 2886
2819 /** 2887 /**
2820 * edit.getFixes result 2888 * edit.getFixes result
2821 * 2889 *
2822 * { 2890 * {
2823 * "fixes": List<ErrorFixes> 2891 * "fixes": List<ErrorFixes>
2824 * } 2892 * }
2825 */ 2893 */
2826 class EditGetFixesResult { 2894 class EditGetFixesResult implements HasToJson {
2827 /** 2895 /**
2828 * The fixes that are available for each of the analysis errors. There is a 2896 * The fixes that are available for each of the analysis errors. There is a
2829 * one-to-one correspondence between the analysis errors in the request and 2897 * one-to-one correspondence between the analysis errors in the request and
2830 * the lists of changes in the response. In particular, it is always the case 2898 * the lists of changes in the response. In particular, it is always the case
2831 * that errors.length == fixes.length and that fixes[i] is the list of fixes 2899 * that errors.length == fixes.length and that fixes[i] is the list of fixes
2832 * for the error in errors[i]. The list of changes corresponding to an error 2900 * for the error in errors[i]. The list of changes corresponding to an error
2833 * can be empty if there are no fixes available for that error. 2901 * can be empty if there are no fixes available for that error.
2834 */ 2902 */
2835 final List<ErrorFixes> fixes; 2903 final List<ErrorFixes> fixes;
2836 2904
(...skipping 13 matching lines...) Expand all
2850 } 2918 }
2851 } 2919 }
2852 2920
2853 factory EditGetFixesResult.fromResponse(Response response) { 2921 factory EditGetFixesResult.fromResponse(Response response) {
2854 return new EditGetFixesResult.fromJson( 2922 return new EditGetFixesResult.fromJson(
2855 new ResponseDecoder(), "result", response.result); 2923 new ResponseDecoder(), "result", response.result);
2856 } 2924 }
2857 2925
2858 Map<String, dynamic> toJson() { 2926 Map<String, dynamic> toJson() {
2859 Map<String, dynamic> result = {}; 2927 Map<String, dynamic> result = {};
2860 result["fixes"] = fixes.map((ErrorFixes value) => value.toJson()); 2928 result["fixes"] = fixes.map((ErrorFixes value) => value.toJson()).toList();
2861 return result; 2929 return result;
2862 } 2930 }
2863 2931
2864 @override 2932 @override
2865 String toString() => JSON.encode(toJson()); 2933 String toString() => JSON.encode(toJson());
2866 2934
2867 @override 2935 @override
2868 bool operator==(other) { 2936 bool operator==(other) {
2869 if (other is EditGetFixesResult) { 2937 if (other is EditGetFixesResult) {
2870 return _listEqual(fixes, other.fixes, (ErrorFixes a, ErrorFixes b) => a == b); 2938 return _listEqual(fixes, other.fixes, (ErrorFixes a, ErrorFixes b) => a == b);
(...skipping 14 matching lines...) Expand all
2885 * 2953 *
2886 * { 2954 * {
2887 * "kindId": RefactoringKind 2955 * "kindId": RefactoringKind
2888 * "file": FilePath 2956 * "file": FilePath
2889 * "offset": int 2957 * "offset": int
2890 * "length": int 2958 * "length": int
2891 * "validateOnly": bool 2959 * "validateOnly": bool
2892 * "options": optional object 2960 * "options": optional object
2893 * } 2961 * }
2894 */ 2962 */
2895 class EditGetRefactoringParams { 2963 class EditGetRefactoringParams implements HasToJson {
2896 /** 2964 /**
2897 * The identifier of the kind of refactoring to be performed. 2965 * The identifier of the kind of refactoring to be performed.
2898 */ 2966 */
2899 final RefactoringKind kindId; 2967 final RefactoringKind kindId;
2900 2968
2901 /** 2969 /**
2902 * The file containing the code involved in the refactoring. 2970 * The file containing the code involved in the refactoring.
2903 */ 2971 */
2904 final String file; 2972 final String file;
2905 2973
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
2983 result["file"] = file; 3051 result["file"] = file;
2984 result["offset"] = offset; 3052 result["offset"] = offset;
2985 result["length"] = length; 3053 result["length"] = length;
2986 result["validateOnly"] = validateOnly; 3054 result["validateOnly"] = validateOnly;
2987 if (options != null) { 3055 if (options != null) {
2988 result["options"] = options; 3056 result["options"] = options;
2989 } 3057 }
2990 return result; 3058 return result;
2991 } 3059 }
2992 3060
3061 Request toRequest(String id) {
3062 return new Request(id, "edit.getRefactoring", toJson());
3063 }
3064
2993 @override 3065 @override
2994 String toString() => JSON.encode(toJson()); 3066 String toString() => JSON.encode(toJson());
2995 3067
2996 @override 3068 @override
2997 bool operator==(other) { 3069 bool operator==(other) {
2998 if (other is EditGetRefactoringParams) { 3070 if (other is EditGetRefactoringParams) {
2999 return kindId == other.kindId && 3071 return kindId == other.kindId &&
3000 file == other.file && 3072 file == other.file &&
3001 offset == other.offset && 3073 offset == other.offset &&
3002 length == other.length && 3074 length == other.length &&
(...skipping 19 matching lines...) Expand all
3022 /** 3094 /**
3023 * edit.getRefactoring result 3095 * edit.getRefactoring result
3024 * 3096 *
3025 * { 3097 * {
3026 * "status": List<RefactoringProblem> 3098 * "status": List<RefactoringProblem>
3027 * "feedback": optional object 3099 * "feedback": optional object
3028 * "change": optional SourceChange 3100 * "change": optional SourceChange
3029 * "potentialEdits": optional List<String> 3101 * "potentialEdits": optional List<String>
3030 * } 3102 * }
3031 */ 3103 */
3032 class EditGetRefactoringResult { 3104 class EditGetRefactoringResult implements HasToJson {
3033 /** 3105 /**
3034 * The status of the refactoring. The array will be empty if there are no 3106 * The status of the refactoring. The array will be empty if there are no
3035 * known problems. 3107 * known problems.
3036 */ 3108 */
3037 final List<RefactoringProblem> status; 3109 final List<RefactoringProblem> status;
3038 3110
3039 /** 3111 /**
3040 * Data used to provide feedback to the user. The structure of the data is 3112 * Data used to provide feedback to the user. The structure of the data is
3041 * dependent on the kind of refactoring being created. The data that is 3113 * dependent on the kind of refactoring being created. The data that is
3042 * returned is documented in the section titled Refactorings, labeled as 3114 * returned is documented in the section titled Refactorings, labeled as
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
3090 } 3162 }
3091 } 3163 }
3092 3164
3093 factory EditGetRefactoringResult.fromResponse(Response response) { 3165 factory EditGetRefactoringResult.fromResponse(Response response) {
3094 return new EditGetRefactoringResult.fromJson( 3166 return new EditGetRefactoringResult.fromJson(
3095 new ResponseDecoder(), "result", response.result); 3167 new ResponseDecoder(), "result", response.result);
3096 } 3168 }
3097 3169
3098 Map<String, dynamic> toJson() { 3170 Map<String, dynamic> toJson() {
3099 Map<String, dynamic> result = {}; 3171 Map<String, dynamic> result = {};
3100 result["status"] = status.map((RefactoringProblem value) => value.toJson()); 3172 result["status"] = status.map((RefactoringProblem value) => value.toJson()). toList();
3101 if (feedback != null) { 3173 if (feedback != null) {
3102 result["feedback"] = feedback; 3174 result["feedback"] = feedback;
3103 } 3175 }
3104 if (change != null) { 3176 if (change != null) {
3105 result["change"] = change.toJson(); 3177 result["change"] = change.toJson();
3106 } 3178 }
3107 if (potentialEdits != null) { 3179 if (potentialEdits != null) {
3108 result["potentialEdits"] = potentialEdits; 3180 result["potentialEdits"] = potentialEdits;
3109 } 3181 }
3110 return result; 3182 return result;
(...skipping 24 matching lines...) Expand all
3135 } 3207 }
3136 } 3208 }
3137 3209
3138 /** 3210 /**
3139 * debug.createContext params 3211 * debug.createContext params
3140 * 3212 *
3141 * { 3213 * {
3142 * "contextRoot": FilePath 3214 * "contextRoot": FilePath
3143 * } 3215 * }
3144 */ 3216 */
3145 class DebugCreateContextParams { 3217 class DebugCreateContextParams implements HasToJson {
3146 /** 3218 /**
3147 * The path of the Dart or HTML file that will be launched. 3219 * The path of the Dart or HTML file that will be launched.
3148 */ 3220 */
3149 final String contextRoot; 3221 final String contextRoot;
3150 3222
3151 DebugCreateContextParams(this.contextRoot); 3223 DebugCreateContextParams(this.contextRoot);
3152 3224
3153 factory DebugCreateContextParams.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) { 3225 factory DebugCreateContextParams.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) {
3154 if (json is Map) { 3226 if (json is Map) {
3155 String contextRoot; 3227 String contextRoot;
(...skipping 12 matching lines...) Expand all
3168 return new DebugCreateContextParams.fromJson( 3240 return new DebugCreateContextParams.fromJson(
3169 new RequestDecoder(request), "params", request.params); 3241 new RequestDecoder(request), "params", request.params);
3170 } 3242 }
3171 3243
3172 Map<String, dynamic> toJson() { 3244 Map<String, dynamic> toJson() {
3173 Map<String, dynamic> result = {}; 3245 Map<String, dynamic> result = {};
3174 result["contextRoot"] = contextRoot; 3246 result["contextRoot"] = contextRoot;
3175 return result; 3247 return result;
3176 } 3248 }
3177 3249
3250 Request toRequest(String id) {
3251 return new Request(id, "debug.createContext", toJson());
3252 }
3253
3178 @override 3254 @override
3179 String toString() => JSON.encode(toJson()); 3255 String toString() => JSON.encode(toJson());
3180 3256
3181 @override 3257 @override
3182 bool operator==(other) { 3258 bool operator==(other) {
3183 if (other is DebugCreateContextParams) { 3259 if (other is DebugCreateContextParams) {
3184 return contextRoot == other.contextRoot; 3260 return contextRoot == other.contextRoot;
3185 } 3261 }
3186 return false; 3262 return false;
3187 } 3263 }
3188 3264
3189 @override 3265 @override
3190 int get hashCode { 3266 int get hashCode {
3191 int hash = 0; 3267 int hash = 0;
3192 hash = _JenkinsSmiHash.combine(hash, contextRoot.hashCode); 3268 hash = _JenkinsSmiHash.combine(hash, contextRoot.hashCode);
3193 return _JenkinsSmiHash.finish(hash); 3269 return _JenkinsSmiHash.finish(hash);
3194 } 3270 }
3195 } 3271 }
3196 3272
3197 /** 3273 /**
3198 * debug.createContext result 3274 * debug.createContext result
3199 * 3275 *
3200 * { 3276 * {
3201 * "id": DebugContextId 3277 * "id": DebugContextId
3202 * } 3278 * }
3203 */ 3279 */
3204 class DebugCreateContextResult { 3280 class DebugCreateContextResult implements HasToJson {
3205 /** 3281 /**
3206 * The identifier used to refer to the debugging context that was created. 3282 * The identifier used to refer to the debugging context that was created.
3207 */ 3283 */
3208 final String id; 3284 final String id;
3209 3285
3210 DebugCreateContextResult(this.id); 3286 DebugCreateContextResult(this.id);
3211 3287
3212 factory DebugCreateContextResult.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) { 3288 factory DebugCreateContextResult.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) {
3213 if (json is Map) { 3289 if (json is Map) {
3214 String id; 3290 String id;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
3253 } 3329 }
3254 } 3330 }
3255 3331
3256 /** 3332 /**
3257 * debug.deleteContext params 3333 * debug.deleteContext params
3258 * 3334 *
3259 * { 3335 * {
3260 * "id": DebugContextId 3336 * "id": DebugContextId
3261 * } 3337 * }
3262 */ 3338 */
3263 class DebugDeleteContextParams { 3339 class DebugDeleteContextParams implements HasToJson {
3264 /** 3340 /**
3265 * The identifier of the debugging context that is to be deleted. 3341 * The identifier of the debugging context that is to be deleted.
3266 */ 3342 */
3267 final String id; 3343 final String id;
3268 3344
3269 DebugDeleteContextParams(this.id); 3345 DebugDeleteContextParams(this.id);
3270 3346
3271 factory DebugDeleteContextParams.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) { 3347 factory DebugDeleteContextParams.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) {
3272 if (json is Map) { 3348 if (json is Map) {
3273 String id; 3349 String id;
(...skipping 12 matching lines...) Expand all
3286 return new DebugDeleteContextParams.fromJson( 3362 return new DebugDeleteContextParams.fromJson(
3287 new RequestDecoder(request), "params", request.params); 3363 new RequestDecoder(request), "params", request.params);
3288 } 3364 }
3289 3365
3290 Map<String, dynamic> toJson() { 3366 Map<String, dynamic> toJson() {
3291 Map<String, dynamic> result = {}; 3367 Map<String, dynamic> result = {};
3292 result["id"] = id; 3368 result["id"] = id;
3293 return result; 3369 return result;
3294 } 3370 }
3295 3371
3372 Request toRequest(String id) {
3373 return new Request(id, "debug.deleteContext", toJson());
3374 }
3375
3296 @override 3376 @override
3297 String toString() => JSON.encode(toJson()); 3377 String toString() => JSON.encode(toJson());
3298 3378
3299 @override 3379 @override
3300 bool operator==(other) { 3380 bool operator==(other) {
3301 if (other is DebugDeleteContextParams) { 3381 if (other is DebugDeleteContextParams) {
3302 return id == other.id; 3382 return id == other.id;
3303 } 3383 }
3304 return false; 3384 return false;
3305 } 3385 }
3306 3386
3307 @override 3387 @override
3308 int get hashCode { 3388 int get hashCode {
3309 int hash = 0; 3389 int hash = 0;
3310 hash = _JenkinsSmiHash.combine(hash, id.hashCode); 3390 hash = _JenkinsSmiHash.combine(hash, id.hashCode);
3311 return _JenkinsSmiHash.finish(hash); 3391 return _JenkinsSmiHash.finish(hash);
3312 } 3392 }
3313 } 3393 }
3314 3394
3315 /** 3395 /**
3316 * debug.mapUri params 3396 * debug.mapUri params
3317 * 3397 *
3318 * { 3398 * {
3319 * "id": DebugContextId 3399 * "id": DebugContextId
3320 * "file": optional FilePath 3400 * "file": optional FilePath
3321 * "uri": optional String 3401 * "uri": optional String
3322 * } 3402 * }
3323 */ 3403 */
3324 class DebugMapUriParams { 3404 class DebugMapUriParams implements HasToJson {
3325 /** 3405 /**
3326 * The identifier of the debugging context in which the URI is to be mapped. 3406 * The identifier of the debugging context in which the URI is to be mapped.
3327 */ 3407 */
3328 final String id; 3408 final String id;
3329 3409
3330 /** 3410 /**
3331 * The path of the file to be mapped into a URI. 3411 * The path of the file to be mapped into a URI.
3332 */ 3412 */
3333 final String file; 3413 final String file;
3334 3414
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
3371 result["id"] = id; 3451 result["id"] = id;
3372 if (file != null) { 3452 if (file != null) {
3373 result["file"] = file; 3453 result["file"] = file;
3374 } 3454 }
3375 if (uri != null) { 3455 if (uri != null) {
3376 result["uri"] = uri; 3456 result["uri"] = uri;
3377 } 3457 }
3378 return result; 3458 return result;
3379 } 3459 }
3380 3460
3461 Request toRequest(String id) {
3462 return new Request(id, "debug.mapUri", toJson());
3463 }
3464
3381 @override 3465 @override
3382 String toString() => JSON.encode(toJson()); 3466 String toString() => JSON.encode(toJson());
3383 3467
3384 @override 3468 @override
3385 bool operator==(other) { 3469 bool operator==(other) {
3386 if (other is DebugMapUriParams) { 3470 if (other is DebugMapUriParams) {
3387 return id == other.id && 3471 return id == other.id &&
3388 file == other.file && 3472 file == other.file &&
3389 uri == other.uri; 3473 uri == other.uri;
3390 } 3474 }
(...skipping 11 matching lines...) Expand all
3402 } 3486 }
3403 3487
3404 /** 3488 /**
3405 * debug.mapUri result 3489 * debug.mapUri result
3406 * 3490 *
3407 * { 3491 * {
3408 * "file": optional FilePath 3492 * "file": optional FilePath
3409 * "uri": optional String 3493 * "uri": optional String
3410 * } 3494 * }
3411 */ 3495 */
3412 class DebugMapUriResult { 3496 class DebugMapUriResult implements HasToJson {
3413 /** 3497 /**
3414 * The file to which the URI was mapped. This field is omitted if the uri 3498 * The file to which the URI was mapped. This field is omitted if the uri
3415 * field was not given in the request. 3499 * field was not given in the request.
3416 */ 3500 */
3417 final String file; 3501 final String file;
3418 3502
3419 /** 3503 /**
3420 * The URI to which the file path was mapped. This field is omitted if the 3504 * The URI to which the file path was mapped. This field is omitted if the
3421 * file field was not given in the request. 3505 * file field was not given in the request.
3422 */ 3506 */
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
3477 } 3561 }
3478 } 3562 }
3479 3563
3480 /** 3564 /**
3481 * debug.setSubscriptions params 3565 * debug.setSubscriptions params
3482 * 3566 *
3483 * { 3567 * {
3484 * "subscriptions": List<DebugService> 3568 * "subscriptions": List<DebugService>
3485 * } 3569 * }
3486 */ 3570 */
3487 class DebugSetSubscriptionsParams { 3571 class DebugSetSubscriptionsParams implements HasToJson {
3488 /** 3572 /**
3489 * A list of the services being subscribed to. 3573 * A list of the services being subscribed to.
3490 */ 3574 */
3491 final List<DebugService> subscriptions; 3575 final List<DebugService> subscriptions;
3492 3576
3493 DebugSetSubscriptionsParams(this.subscriptions); 3577 DebugSetSubscriptionsParams(this.subscriptions);
3494 3578
3495 factory DebugSetSubscriptionsParams.fromJson(JsonDecoder jsonDecoder, String j sonPath, Object json) { 3579 factory DebugSetSubscriptionsParams.fromJson(JsonDecoder jsonDecoder, String j sonPath, Object json) {
3496 if (json is Map) { 3580 if (json is Map) {
3497 List<DebugService> subscriptions; 3581 List<DebugService> subscriptions;
3498 if (json.containsKey("subscriptions")) { 3582 if (json.containsKey("subscriptions")) {
3499 subscriptions = jsonDecoder._decodeList(jsonPath + ".subscriptions", jso n["subscriptions"], (String jsonPath, Object json) => new DebugService.fromJson( jsonDecoder, jsonPath, json)); 3583 subscriptions = jsonDecoder._decodeList(jsonPath + ".subscriptions", jso n["subscriptions"], (String jsonPath, Object json) => new DebugService.fromJson( jsonDecoder, jsonPath, json));
3500 } else { 3584 } else {
3501 throw jsonDecoder.missingKey(jsonPath, "subscriptions"); 3585 throw jsonDecoder.missingKey(jsonPath, "subscriptions");
3502 } 3586 }
3503 return new DebugSetSubscriptionsParams(subscriptions); 3587 return new DebugSetSubscriptionsParams(subscriptions);
3504 } else { 3588 } else {
3505 throw jsonDecoder.mismatch(jsonPath, "debug.setSubscriptions params"); 3589 throw jsonDecoder.mismatch(jsonPath, "debug.setSubscriptions params");
3506 } 3590 }
3507 } 3591 }
3508 3592
3509 factory DebugSetSubscriptionsParams.fromRequest(Request request) { 3593 factory DebugSetSubscriptionsParams.fromRequest(Request request) {
3510 return new DebugSetSubscriptionsParams.fromJson( 3594 return new DebugSetSubscriptionsParams.fromJson(
3511 new RequestDecoder(request), "params", request.params); 3595 new RequestDecoder(request), "params", request.params);
3512 } 3596 }
3513 3597
3514 Map<String, dynamic> toJson() { 3598 Map<String, dynamic> toJson() {
3515 Map<String, dynamic> result = {}; 3599 Map<String, dynamic> result = {};
3516 result["subscriptions"] = subscriptions.map((DebugService value) => value.to Json()); 3600 result["subscriptions"] = subscriptions.map((DebugService value) => value.to Json()).toList();
3517 return result; 3601 return result;
3518 } 3602 }
3519 3603
3604 Request toRequest(String id) {
3605 return new Request(id, "debug.setSubscriptions", toJson());
3606 }
3607
3520 @override 3608 @override
3521 String toString() => JSON.encode(toJson()); 3609 String toString() => JSON.encode(toJson());
3522 3610
3523 @override 3611 @override
3524 bool operator==(other) { 3612 bool operator==(other) {
3525 if (other is DebugSetSubscriptionsParams) { 3613 if (other is DebugSetSubscriptionsParams) {
3526 return _listEqual(subscriptions, other.subscriptions, (DebugService a, Deb ugService b) => a == b); 3614 return _listEqual(subscriptions, other.subscriptions, (DebugService a, Deb ugService b) => a == b);
3527 } 3615 }
3528 return false; 3616 return false;
3529 } 3617 }
3530 3618
3531 @override 3619 @override
3532 int get hashCode { 3620 int get hashCode {
3533 int hash = 0; 3621 int hash = 0;
3534 hash = _JenkinsSmiHash.combine(hash, subscriptions.hashCode); 3622 hash = _JenkinsSmiHash.combine(hash, subscriptions.hashCode);
3535 return _JenkinsSmiHash.finish(hash); 3623 return _JenkinsSmiHash.finish(hash);
3536 } 3624 }
3537 } 3625 }
3538 3626
3539 /** 3627 /**
3540 * debug.launchData params 3628 * debug.launchData params
3541 * 3629 *
3542 * { 3630 * {
3543 * "executables": List<ExecutableFile> 3631 * "executables": List<ExecutableFile>
3544 * "dartToHtml": Map<FilePath, List<FilePath>> 3632 * "dartToHtml": Map<FilePath, List<FilePath>>
3545 * "htmlToDart": Map<FilePath, List<FilePath>> 3633 * "htmlToDart": Map<FilePath, List<FilePath>>
3546 * } 3634 * }
3547 */ 3635 */
3548 class DebugLaunchDataParams { 3636 class DebugLaunchDataParams implements HasToJson {
3549 /** 3637 /**
3550 * A list of the files that are executable in the given context. This list 3638 * A list of the files that are executable in the given context. This list
3551 * replaces any previous list provided for the given context. 3639 * replaces any previous list provided for the given context.
3552 */ 3640 */
3553 final List<ExecutableFile> executables; 3641 final List<ExecutableFile> executables;
3554 3642
3555 /** 3643 /**
3556 * A mapping from the paths of Dart files that are referenced by HTML files 3644 * A mapping from the paths of Dart files that are referenced by HTML files
3557 * to a list of the HTML files that reference the Dart files. 3645 * to a list of the HTML files that reference the Dart files.
3558 */ 3646 */
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
3592 } 3680 }
3593 } 3681 }
3594 3682
3595 factory DebugLaunchDataParams.fromNotification(Notification notification) { 3683 factory DebugLaunchDataParams.fromNotification(Notification notification) {
3596 return new DebugLaunchDataParams.fromJson( 3684 return new DebugLaunchDataParams.fromJson(
3597 new ResponseDecoder(), "params", notification.params); 3685 new ResponseDecoder(), "params", notification.params);
3598 } 3686 }
3599 3687
3600 Map<String, dynamic> toJson() { 3688 Map<String, dynamic> toJson() {
3601 Map<String, dynamic> result = {}; 3689 Map<String, dynamic> result = {};
3602 result["executables"] = executables.map((ExecutableFile value) => value.toJs on()); 3690 result["executables"] = executables.map((ExecutableFile value) => value.toJs on()).toList();
3603 result["dartToHtml"] = dartToHtml; 3691 result["dartToHtml"] = dartToHtml;
3604 result["htmlToDart"] = htmlToDart; 3692 result["htmlToDart"] = htmlToDart;
3605 return result; 3693 return result;
3606 } 3694 }
3607 3695
3608 @override 3696 @override
3609 String toString() => JSON.encode(toJson()); 3697 String toString() => JSON.encode(toJson());
3610 3698
3611 @override 3699 @override
3612 bool operator==(other) { 3700 bool operator==(other) {
(...skipping 16 matching lines...) Expand all
3629 } 3717 }
3630 3718
3631 /** 3719 /**
3632 * AddContentOverlay 3720 * AddContentOverlay
3633 * 3721 *
3634 * { 3722 * {
3635 * "type": "add" 3723 * "type": "add"
3636 * "content": String 3724 * "content": String
3637 * } 3725 * }
3638 */ 3726 */
3639 class AddContentOverlay { 3727 class AddContentOverlay implements HasToJson {
3640 /** 3728 /**
3641 * The new content of the file. 3729 * The new content of the file.
3642 */ 3730 */
3643 final String content; 3731 final String content;
3644 3732
3645 AddContentOverlay(this.content); 3733 AddContentOverlay(this.content);
3646 3734
3647 factory AddContentOverlay.fromJson(JsonDecoder jsonDecoder, String jsonPath, O bject json) { 3735 factory AddContentOverlay.fromJson(JsonDecoder jsonDecoder, String jsonPath, O bject json) {
3648 if (json is Map) { 3736 if (json is Map) {
3649 if (json["type"] != "add") { 3737 if (json["type"] != "add") {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
3692 * AnalysisError 3780 * AnalysisError
3693 * 3781 *
3694 * { 3782 * {
3695 * "severity": ErrorSeverity 3783 * "severity": ErrorSeverity
3696 * "type": ErrorType 3784 * "type": ErrorType
3697 * "location": Location 3785 * "location": Location
3698 * "message": String 3786 * "message": String
3699 * "correction": optional String 3787 * "correction": optional String
3700 * } 3788 * }
3701 */ 3789 */
3702 class AnalysisError { 3790 class AnalysisError implements HasToJson {
3703 /** 3791 /**
3704 * The severity of the error. 3792 * The severity of the error.
3705 */ 3793 */
3706 final ErrorSeverity severity; 3794 final ErrorSeverity severity;
3707 3795
3708 /** 3796 /**
3709 * The type of the error. 3797 * The type of the error.
3710 */ 3798 */
3711 final ErrorType type; 3799 final ErrorType type;
3712 3800
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
3809 * AnalysisOptions 3897 * AnalysisOptions
3810 * 3898 *
3811 * { 3899 * {
3812 * "enableAsync": optional bool 3900 * "enableAsync": optional bool
3813 * "enableDeferredLoading": optional bool 3901 * "enableDeferredLoading": optional bool
3814 * "enableEnums": optional bool 3902 * "enableEnums": optional bool
3815 * "generateDart2jsHints": optional bool 3903 * "generateDart2jsHints": optional bool
3816 * "generateHints": optional bool 3904 * "generateHints": optional bool
3817 * } 3905 * }
3818 */ 3906 */
3819 class AnalysisOptions { 3907 class AnalysisOptions implements HasToJson {
3820 /** 3908 /**
3821 * True if the client wants to enable support for the proposed async feature. 3909 * True if the client wants to enable support for the proposed async feature.
3822 */ 3910 */
3823 final bool enableAsync; 3911 final bool enableAsync;
3824 3912
3825 /** 3913 /**
3826 * True if the client wants to enable support for the proposed deferred 3914 * True if the client wants to enable support for the proposed deferred
3827 * loading feature. 3915 * loading feature.
3828 */ 3916 */
3829 final bool enableDeferredLoading; 3917 final bool enableDeferredLoading;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
3987 } 4075 }
3988 4076
3989 /** 4077 /**
3990 * AnalysisStatus 4078 * AnalysisStatus
3991 * 4079 *
3992 * { 4080 * {
3993 * "analyzing": bool 4081 * "analyzing": bool
3994 * "analysisTarget": optional String 4082 * "analysisTarget": optional String
3995 * } 4083 * }
3996 */ 4084 */
3997 class AnalysisStatus { 4085 class AnalysisStatus implements HasToJson {
3998 /** 4086 /**
3999 * True if analysis is currently being performed. 4087 * True if analysis is currently being performed.
4000 */ 4088 */
4001 final bool analyzing; 4089 final bool analyzing;
4002 4090
4003 /** 4091 /**
4004 * The name of the current target of analysis. This field is omitted if 4092 * The name of the current target of analysis. This field is omitted if
4005 * analyzing is false. 4093 * analyzing is false.
4006 */ 4094 */
4007 final String analysisTarget; 4095 final String analysisTarget;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
4057 } 4145 }
4058 4146
4059 /** 4147 /**
4060 * ChangeContentOverlay 4148 * ChangeContentOverlay
4061 * 4149 *
4062 * { 4150 * {
4063 * "type": "change" 4151 * "type": "change"
4064 * "edits": List<SourceEdit> 4152 * "edits": List<SourceEdit>
4065 * } 4153 * }
4066 */ 4154 */
4067 class ChangeContentOverlay { 4155 class ChangeContentOverlay implements HasToJson {
4068 /** 4156 /**
4069 * The edits to be applied to the file. 4157 * The edits to be applied to the file.
4070 */ 4158 */
4071 final List<SourceEdit> edits; 4159 final List<SourceEdit> edits;
4072 4160
4073 ChangeContentOverlay(this.edits); 4161 ChangeContentOverlay(this.edits);
4074 4162
4075 factory ChangeContentOverlay.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) { 4163 factory ChangeContentOverlay.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) {
4076 if (json is Map) { 4164 if (json is Map) {
4077 if (json["type"] != "change") { 4165 if (json["type"] != "change") {
4078 throw jsonDecoder.mismatch(jsonPath, "equal " + "change"); 4166 throw jsonDecoder.mismatch(jsonPath, "equal " + "change");
4079 } 4167 }
4080 List<SourceEdit> edits; 4168 List<SourceEdit> edits;
4081 if (json.containsKey("edits")) { 4169 if (json.containsKey("edits")) {
4082 edits = jsonDecoder._decodeList(jsonPath + ".edits", json["edits"], (Str ing jsonPath, Object json) => new SourceEdit.fromJson(jsonDecoder, jsonPath, jso n)); 4170 edits = jsonDecoder._decodeList(jsonPath + ".edits", json["edits"], (Str ing jsonPath, Object json) => new SourceEdit.fromJson(jsonDecoder, jsonPath, jso n));
4083 } else { 4171 } else {
4084 throw jsonDecoder.missingKey(jsonPath, "edits"); 4172 throw jsonDecoder.missingKey(jsonPath, "edits");
4085 } 4173 }
4086 return new ChangeContentOverlay(edits); 4174 return new ChangeContentOverlay(edits);
4087 } else { 4175 } else {
4088 throw jsonDecoder.mismatch(jsonPath, "ChangeContentOverlay"); 4176 throw jsonDecoder.mismatch(jsonPath, "ChangeContentOverlay");
4089 } 4177 }
4090 } 4178 }
4091 4179
4092 Map<String, dynamic> toJson() { 4180 Map<String, dynamic> toJson() {
4093 Map<String, dynamic> result = {}; 4181 Map<String, dynamic> result = {};
4094 result["type"] = "change"; 4182 result["type"] = "change";
4095 result["edits"] = edits.map((SourceEdit value) => value.toJson()); 4183 result["edits"] = edits.map((SourceEdit value) => value.toJson()).toList();
4096 return result; 4184 return result;
4097 } 4185 }
4098 4186
4099 @override 4187 @override
4100 String toString() => JSON.encode(toJson()); 4188 String toString() => JSON.encode(toJson());
4101 4189
4102 @override 4190 @override
4103 bool operator==(other) { 4191 bool operator==(other) {
4104 if (other is ChangeContentOverlay) { 4192 if (other is ChangeContentOverlay) {
4105 return _listEqual(edits, other.edits, (SourceEdit a, SourceEdit b) => a == b); 4193 return _listEqual(edits, other.edits, (SourceEdit a, SourceEdit b) => a == b);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
4181 * "declaringType": optional String 4269 * "declaringType": optional String
4182 * "returnType": optional String 4270 * "returnType": optional String
4183 * "parameterNames": optional List<String> 4271 * "parameterNames": optional List<String>
4184 * "parameterTypes": optional List<String> 4272 * "parameterTypes": optional List<String>
4185 * "requiredParameterCount": optional int 4273 * "requiredParameterCount": optional int
4186 * "positionalParameterCount": optional int 4274 * "positionalParameterCount": optional int
4187 * "parameterName": optional String 4275 * "parameterName": optional String
4188 * "parameterType": optional String 4276 * "parameterType": optional String
4189 * } 4277 * }
4190 */ 4278 */
4191 class CompletionSuggestion { 4279 class CompletionSuggestion implements HasToJson {
4192 /** 4280 /**
4193 * The kind of element being suggested. 4281 * The kind of element being suggested.
4194 */ 4282 */
4195 final CompletionSuggestionKind kind; 4283 final CompletionSuggestionKind kind;
4196 4284
4197 /** 4285 /**
4198 * The relevance of this completion suggestion. 4286 * The relevance of this completion suggestion.
4199 */ 4287 */
4200 final CompletionRelevance relevance; 4288 final CompletionRelevance relevance;
4201 4289
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
4656 * 4744 *
4657 * { 4745 * {
4658 * "kind": ElementKind 4746 * "kind": ElementKind
4659 * "name": String 4747 * "name": String
4660 * "location": optional Location 4748 * "location": optional Location
4661 * "flags": int 4749 * "flags": int
4662 * "parameters": optional String 4750 * "parameters": optional String
4663 * "returnType": optional String 4751 * "returnType": optional String
4664 * } 4752 * }
4665 */ 4753 */
4666 class Element { 4754 class Element implements HasToJson {
4667 /** 4755 /**
4668 * The kind of the element. 4756 * The kind of the element.
4669 */ 4757 */
4670 final ElementKind kind; 4758 final ElementKind kind;
4671 4759
4672 /** 4760 /**
4673 * The name of the element. This is typically used as the label in the 4761 * The name of the element. This is typically used as the label in the
4674 * outline. 4762 * outline.
4675 */ 4763 */
4676 final String name; 4764 final String name;
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
4919 5007
4920 /** 5008 /**
4921 * Error 5009 * Error
4922 * 5010 *
4923 * { 5011 * {
4924 * "code": String 5012 * "code": String
4925 * "message": String 5013 * "message": String
4926 * "data": optional object 5014 * "data": optional object
4927 * } 5015 * }
4928 */ 5016 */
4929 class Error { 5017 class Error implements HasToJson {
4930 /** 5018 /**
4931 * A code that uniquely identifies the error that occurred. 5019 * A code that uniquely identifies the error that occurred.
4932 */ 5020 */
4933 final String code; 5021 final String code;
4934 5022
4935 /** 5023 /**
4936 * A short description of the error. 5024 * A short description of the error.
4937 */ 5025 */
4938 final String message; 5026 final String message;
4939 5027
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
5003 } 5091 }
5004 5092
5005 /** 5093 /**
5006 * ErrorFixes 5094 * ErrorFixes
5007 * 5095 *
5008 * { 5096 * {
5009 * "error": AnalysisError 5097 * "error": AnalysisError
5010 * "fixes": List<SourceChange> 5098 * "fixes": List<SourceChange>
5011 * } 5099 * }
5012 */ 5100 */
5013 class ErrorFixes { 5101 class ErrorFixes implements HasToJson {
5014 /** 5102 /**
5015 * The error with which the fixes are associated. 5103 * The error with which the fixes are associated.
5016 */ 5104 */
5017 final AnalysisError error; 5105 final AnalysisError error;
5018 5106
5019 /** 5107 /**
5020 * The fixes associated with the error. 5108 * The fixes associated with the error.
5021 */ 5109 */
5022 final List<SourceChange> fixes; 5110 final List<SourceChange> fixes;
5023 5111
(...skipping 15 matching lines...) Expand all
5039 } 5127 }
5040 return new ErrorFixes(error, fixes); 5128 return new ErrorFixes(error, fixes);
5041 } else { 5129 } else {
5042 throw jsonDecoder.mismatch(jsonPath, "ErrorFixes"); 5130 throw jsonDecoder.mismatch(jsonPath, "ErrorFixes");
5043 } 5131 }
5044 } 5132 }
5045 5133
5046 Map<String, dynamic> toJson() { 5134 Map<String, dynamic> toJson() {
5047 Map<String, dynamic> result = {}; 5135 Map<String, dynamic> result = {};
5048 result["error"] = error.toJson(); 5136 result["error"] = error.toJson();
5049 result["fixes"] = fixes.map((SourceChange value) => value.toJson()); 5137 result["fixes"] = fixes.map((SourceChange value) => value.toJson()).toList() ;
5050 return result; 5138 return result;
5051 } 5139 }
5052 5140
5053 @override 5141 @override
5054 String toString() => JSON.encode(toJson()); 5142 String toString() => JSON.encode(toJson());
5055 5143
5056 @override 5144 @override
5057 bool operator==(other) { 5145 bool operator==(other) {
5058 if (other is ErrorFixes) { 5146 if (other is ErrorFixes) {
5059 return error == other.error && 5147 return error == other.error &&
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
5185 } 5273 }
5186 5274
5187 /** 5275 /**
5188 * ExecutableFile 5276 * ExecutableFile
5189 * 5277 *
5190 * { 5278 * {
5191 * "file": FilePath 5279 * "file": FilePath
5192 * "offset": ExecutableKind 5280 * "offset": ExecutableKind
5193 * } 5281 * }
5194 */ 5282 */
5195 class ExecutableFile { 5283 class ExecutableFile implements HasToJson {
5196 /** 5284 /**
5197 * The path of the executable file. 5285 * The path of the executable file.
5198 */ 5286 */
5199 final String file; 5287 final String file;
5200 5288
5201 /** 5289 /**
5202 * The offset of the region to be highlighted. 5290 * The offset of the region to be highlighted.
5203 */ 5291 */
5204 final ExecutableKind offset; 5292 final ExecutableKind offset;
5205 5293
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
5363 5451
5364 /** 5452 /**
5365 * FoldingRegion 5453 * FoldingRegion
5366 * 5454 *
5367 * { 5455 * {
5368 * "kind": FoldingKind 5456 * "kind": FoldingKind
5369 * "offset": int 5457 * "offset": int
5370 * "length": int 5458 * "length": int
5371 * } 5459 * }
5372 */ 5460 */
5373 class FoldingRegion { 5461 class FoldingRegion implements HasToJson {
5374 /** 5462 /**
5375 * The kind of the region. 5463 * The kind of the region.
5376 */ 5464 */
5377 final FoldingKind kind; 5465 final FoldingKind kind;
5378 5466
5379 /** 5467 /**
5380 * The offset of the region to be folded. 5468 * The offset of the region to be folded.
5381 */ 5469 */
5382 final int offset; 5470 final int offset;
5383 5471
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
5447 5535
5448 /** 5536 /**
5449 * HighlightRegion 5537 * HighlightRegion
5450 * 5538 *
5451 * { 5539 * {
5452 * "type": HighlightRegionType 5540 * "type": HighlightRegionType
5453 * "offset": int 5541 * "offset": int
5454 * "length": int 5542 * "length": int
5455 * } 5543 * }
5456 */ 5544 */
5457 class HighlightRegion { 5545 class HighlightRegion implements HasToJson {
5458 /** 5546 /**
5459 * The type of highlight associated with the region. 5547 * The type of highlight associated with the region.
5460 */ 5548 */
5461 final HighlightRegionType type; 5549 final HighlightRegionType type;
5462 5550
5463 /** 5551 /**
5464 * The offset of the region to be highlighted. 5552 * The offset of the region to be highlighted.
5465 */ 5553 */
5466 final int offset; 5554 final int offset;
5467 5555
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
5747 * "containingLibraryPath": optional String 5835 * "containingLibraryPath": optional String
5748 * "containingLibraryName": optional String 5836 * "containingLibraryName": optional String
5749 * "dartdoc": optional String 5837 * "dartdoc": optional String
5750 * "elementDescription": optional String 5838 * "elementDescription": optional String
5751 * "elementKind": optional String 5839 * "elementKind": optional String
5752 * "parameter": optional String 5840 * "parameter": optional String
5753 * "propagatedType": optional String 5841 * "propagatedType": optional String
5754 * "staticType": optional String 5842 * "staticType": optional String
5755 * } 5843 * }
5756 */ 5844 */
5757 class HoverInformation { 5845 class HoverInformation implements HasToJson {
5758 /** 5846 /**
5759 * The offset of the range of characters that encompases the cursor position 5847 * The offset of the range of characters that encompases the cursor position
5760 * and has the same hover information as the cursor position. 5848 * and has the same hover information as the cursor position.
5761 */ 5849 */
5762 final int offset; 5850 final int offset;
5763 5851
5764 /** 5852 /**
5765 * The length of the range of characters that encompases the cursor position 5853 * The length of the range of characters that encompases the cursor position
5766 * and has the same hover information as the cursor position. 5854 * and has the same hover information as the cursor position.
5767 */ 5855 */
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
5945 6033
5946 /** 6034 /**
5947 * LinkedEditGroup 6035 * LinkedEditGroup
5948 * 6036 *
5949 * { 6037 * {
5950 * "positions": List<Position> 6038 * "positions": List<Position>
5951 * "length": int 6039 * "length": int
5952 * "suggestions": List<LinkedEditSuggestion> 6040 * "suggestions": List<LinkedEditSuggestion>
5953 * } 6041 * }
5954 */ 6042 */
5955 class LinkedEditGroup { 6043 class LinkedEditGroup implements HasToJson {
5956 /** 6044 /**
5957 * The positions of the regions that should be edited simultaneously. 6045 * The positions of the regions that should be edited simultaneously.
5958 */ 6046 */
5959 final List<Position> positions; 6047 final List<Position> positions;
5960 6048
5961 /** 6049 /**
5962 * The length of the regions that should be edited simultaneously. 6050 * The length of the regions that should be edited simultaneously.
5963 */ 6051 */
5964 final int length; 6052 final int length;
5965 6053
(...skipping 26 matching lines...) Expand all
5992 throw jsonDecoder.missingKey(jsonPath, "suggestions"); 6080 throw jsonDecoder.missingKey(jsonPath, "suggestions");
5993 } 6081 }
5994 return new LinkedEditGroup(positions, length, suggestions); 6082 return new LinkedEditGroup(positions, length, suggestions);
5995 } else { 6083 } else {
5996 throw jsonDecoder.mismatch(jsonPath, "LinkedEditGroup"); 6084 throw jsonDecoder.mismatch(jsonPath, "LinkedEditGroup");
5997 } 6085 }
5998 } 6086 }
5999 6087
6000 Map<String, dynamic> toJson() { 6088 Map<String, dynamic> toJson() {
6001 Map<String, dynamic> result = {}; 6089 Map<String, dynamic> result = {};
6002 result["positions"] = positions.map((Position value) => value.toJson()); 6090 result["positions"] = positions.map((Position value) => value.toJson()).toLi st();
6003 result["length"] = length; 6091 result["length"] = length;
6004 result["suggestions"] = suggestions.map((LinkedEditSuggestion value) => valu e.toJson()); 6092 result["suggestions"] = suggestions.map((LinkedEditSuggestion value) => valu e.toJson()).toList();
6005 return result; 6093 return result;
6006 } 6094 }
6007 6095
6008 @override 6096 @override
6009 String toString() => JSON.encode(toJson()); 6097 String toString() => JSON.encode(toJson());
6010 6098
6011 @override 6099 @override
6012 bool operator==(other) { 6100 bool operator==(other) {
6013 if (other is LinkedEditGroup) { 6101 if (other is LinkedEditGroup) {
6014 return _listEqual(positions, other.positions, (Position a, Position b) => a == b) && 6102 return _listEqual(positions, other.positions, (Position a, Position b) => a == b) &&
(...skipping 14 matching lines...) Expand all
6029 } 6117 }
6030 6118
6031 /** 6119 /**
6032 * LinkedEditSuggestion 6120 * LinkedEditSuggestion
6033 * 6121 *
6034 * { 6122 * {
6035 * "value": String 6123 * "value": String
6036 * "kind": LinkedEditSuggestionKind 6124 * "kind": LinkedEditSuggestionKind
6037 * } 6125 * }
6038 */ 6126 */
6039 class LinkedEditSuggestion { 6127 class LinkedEditSuggestion implements HasToJson {
6040 /** 6128 /**
6041 * The value that could be used to replace all of the linked edit regions. 6129 * The value that could be used to replace all of the linked edit regions.
6042 */ 6130 */
6043 final String value; 6131 final String value;
6044 6132
6045 /** 6133 /**
6046 * The kind of value being proposed. 6134 * The kind of value being proposed.
6047 */ 6135 */
6048 final LinkedEditSuggestionKind kind; 6136 final LinkedEditSuggestionKind kind;
6049 6137
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
6155 * Location 6243 * Location
6156 * 6244 *
6157 * { 6245 * {
6158 * "file": FilePath 6246 * "file": FilePath
6159 * "offset": int 6247 * "offset": int
6160 * "length": int 6248 * "length": int
6161 * "startLine": int 6249 * "startLine": int
6162 * "startColumn": int 6250 * "startColumn": int
6163 * } 6251 * }
6164 */ 6252 */
6165 class Location { 6253 class Location implements HasToJson {
6166 /** 6254 /**
6167 * The file containing the range. 6255 * The file containing the range.
6168 */ 6256 */
6169 final String file; 6257 final String file;
6170 6258
6171 /** 6259 /**
6172 * The offset of the range. 6260 * The offset of the range.
6173 */ 6261 */
6174 final int offset; 6262 final int offset;
6175 6263
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
6269 6357
6270 /** 6358 /**
6271 * NavigationRegion 6359 * NavigationRegion
6272 * 6360 *
6273 * { 6361 * {
6274 * "offset": int 6362 * "offset": int
6275 * "length": int 6363 * "length": int
6276 * "targets": List<Element> 6364 * "targets": List<Element>
6277 * } 6365 * }
6278 */ 6366 */
6279 class NavigationRegion { 6367 class NavigationRegion implements HasToJson {
6280 /** 6368 /**
6281 * The offset of the region from which the user can navigate. 6369 * The offset of the region from which the user can navigate.
6282 */ 6370 */
6283 final int offset; 6371 final int offset;
6284 6372
6285 /** 6373 /**
6286 * The length of the region from which the user can navigate. 6374 * The length of the region from which the user can navigate.
6287 */ 6375 */
6288 final int length; 6376 final int length;
6289 6377
(...skipping 28 matching lines...) Expand all
6318 return new NavigationRegion(offset, length, targets); 6406 return new NavigationRegion(offset, length, targets);
6319 } else { 6407 } else {
6320 throw jsonDecoder.mismatch(jsonPath, "NavigationRegion"); 6408 throw jsonDecoder.mismatch(jsonPath, "NavigationRegion");
6321 } 6409 }
6322 } 6410 }
6323 6411
6324 Map<String, dynamic> toJson() { 6412 Map<String, dynamic> toJson() {
6325 Map<String, dynamic> result = {}; 6413 Map<String, dynamic> result = {};
6326 result["offset"] = offset; 6414 result["offset"] = offset;
6327 result["length"] = length; 6415 result["length"] = length;
6328 result["targets"] = targets.map((Element value) => value.toJson()); 6416 result["targets"] = targets.map((Element value) => value.toJson()).toList();
6329 return result; 6417 return result;
6330 } 6418 }
6331 6419
6332 @override 6420 @override
6333 String toString() => JSON.encode(toJson()); 6421 String toString() => JSON.encode(toJson());
6334 6422
6335 @override 6423 @override
6336 bool operator==(other) { 6424 bool operator==(other) {
6337 if (other is NavigationRegion) { 6425 if (other is NavigationRegion) {
6338 return offset == other.offset && 6426 return offset == other.offset &&
(...skipping 15 matching lines...) Expand all
6354 6442
6355 /** 6443 /**
6356 * Occurrences 6444 * Occurrences
6357 * 6445 *
6358 * { 6446 * {
6359 * "element": Element 6447 * "element": Element
6360 * "offsets": List<int> 6448 * "offsets": List<int>
6361 * "length": int 6449 * "length": int
6362 * } 6450 * }
6363 */ 6451 */
6364 class Occurrences { 6452 class Occurrences implements HasToJson {
6365 /** 6453 /**
6366 * The element that was referenced. 6454 * The element that was referenced.
6367 */ 6455 */
6368 final Element element; 6456 final Element element;
6369 6457
6370 /** 6458 /**
6371 * The offsets of the name of the referenced element within the file. 6459 * The offsets of the name of the referenced element within the file.
6372 */ 6460 */
6373 final List<int> offsets; 6461 final List<int> offsets;
6374 6462
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
6439 /** 6527 /**
6440 * Outline 6528 * Outline
6441 * 6529 *
6442 * { 6530 * {
6443 * "element": Element 6531 * "element": Element
6444 * "offset": int 6532 * "offset": int
6445 * "length": int 6533 * "length": int
6446 * "children": optional List<Outline> 6534 * "children": optional List<Outline>
6447 * } 6535 * }
6448 */ 6536 */
6449 class Outline { 6537 class Outline implements HasToJson {
6450 /** 6538 /**
6451 * A description of the element represented by this node. 6539 * A description of the element represented by this node.
6452 */ 6540 */
6453 final Element element; 6541 final Element element;
6454 6542
6455 /** 6543 /**
6456 * The offset of the first character of the element. This is different than 6544 * The offset of the first character of the element. This is different than
6457 * the offset in the Element, which if the offset of the name of the element. 6545 * the offset in the Element, which if the offset of the name of the element.
6458 * It can be used, for example, to map locations in the file back to an 6546 * It can be used, for example, to map locations in the file back to an
6459 * outline. 6547 * outline.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
6502 throw jsonDecoder.mismatch(jsonPath, "Outline"); 6590 throw jsonDecoder.mismatch(jsonPath, "Outline");
6503 } 6591 }
6504 } 6592 }
6505 6593
6506 Map<String, dynamic> toJson() { 6594 Map<String, dynamic> toJson() {
6507 Map<String, dynamic> result = {}; 6595 Map<String, dynamic> result = {};
6508 result["element"] = element.toJson(); 6596 result["element"] = element.toJson();
6509 result["offset"] = offset; 6597 result["offset"] = offset;
6510 result["length"] = length; 6598 result["length"] = length;
6511 if (children != null) { 6599 if (children != null) {
6512 result["children"] = children.map((Outline value) => value.toJson()); 6600 result["children"] = children.map((Outline value) => value.toJson()).toLis t();
6513 } 6601 }
6514 return result; 6602 return result;
6515 } 6603 }
6516 6604
6517 @override 6605 @override
6518 String toString() => JSON.encode(toJson()); 6606 String toString() => JSON.encode(toJson());
6519 6607
6520 @override 6608 @override
6521 bool operator==(other) { 6609 bool operator==(other) {
6522 if (other is Outline) { 6610 if (other is Outline) {
(...skipping 19 matching lines...) Expand all
6542 /** 6630 /**
6543 * Override 6631 * Override
6544 * 6632 *
6545 * { 6633 * {
6546 * "offset": int 6634 * "offset": int
6547 * "length": int 6635 * "length": int
6548 * "superclassMember": optional OverriddenMember 6636 * "superclassMember": optional OverriddenMember
6549 * "interfaceMembers": optional List<OverriddenMember> 6637 * "interfaceMembers": optional List<OverriddenMember>
6550 * } 6638 * }
6551 */ 6639 */
6552 class Override { 6640 class Override implements HasToJson {
6553 /** 6641 /**
6554 * The offset of the name of the overriding member. 6642 * The offset of the name of the overriding member.
6555 */ 6643 */
6556 final int offset; 6644 final int offset;
6557 6645
6558 /** 6646 /**
6559 * The length of the name of the overriding member. 6647 * The length of the name of the overriding member.
6560 */ 6648 */
6561 final int length; 6649 final int length;
6562 6650
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
6605 } 6693 }
6606 6694
6607 Map<String, dynamic> toJson() { 6695 Map<String, dynamic> toJson() {
6608 Map<String, dynamic> result = {}; 6696 Map<String, dynamic> result = {};
6609 result["offset"] = offset; 6697 result["offset"] = offset;
6610 result["length"] = length; 6698 result["length"] = length;
6611 if (superclassMember != null) { 6699 if (superclassMember != null) {
6612 result["superclassMember"] = superclassMember.toJson(); 6700 result["superclassMember"] = superclassMember.toJson();
6613 } 6701 }
6614 if (interfaceMembers != null) { 6702 if (interfaceMembers != null) {
6615 result["interfaceMembers"] = interfaceMembers.map((OverriddenMember value) => value.toJson()); 6703 result["interfaceMembers"] = interfaceMembers.map((OverriddenMember value) => value.toJson()).toList();
6616 } 6704 }
6617 return result; 6705 return result;
6618 } 6706 }
6619 6707
6620 @override 6708 @override
6621 String toString() => JSON.encode(toJson()); 6709 String toString() => JSON.encode(toJson());
6622 6710
6623 @override 6711 @override
6624 bool operator==(other) { 6712 bool operator==(other) {
6625 if (other is Override) { 6713 if (other is Override) {
(...skipping 17 matching lines...) Expand all
6643 } 6731 }
6644 6732
6645 /** 6733 /**
6646 * OverriddenMember 6734 * OverriddenMember
6647 * 6735 *
6648 * { 6736 * {
6649 * "element": Element 6737 * "element": Element
6650 * "className": String 6738 * "className": String
6651 * } 6739 * }
6652 */ 6740 */
6653 class OverriddenMember { 6741 class OverriddenMember implements HasToJson {
6654 /** 6742 /**
6655 * The element that is being overridden. 6743 * The element that is being overridden.
6656 */ 6744 */
6657 final Element element; 6745 final Element element;
6658 6746
6659 /** 6747 /**
6660 * The name of the class in which the member is defined. 6748 * The name of the class in which the member is defined.
6661 */ 6749 */
6662 final String className; 6750 final String className;
6663 6751
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
6712 } 6800 }
6713 6801
6714 /** 6802 /**
6715 * Position 6803 * Position
6716 * 6804 *
6717 * { 6805 * {
6718 * "file": FilePath 6806 * "file": FilePath
6719 * "offset": int 6807 * "offset": int
6720 * } 6808 * }
6721 */ 6809 */
6722 class Position { 6810 class Position implements HasToJson {
6723 /** 6811 /**
6724 * The file containing the position. 6812 * The file containing the position.
6725 */ 6813 */
6726 final String file; 6814 final String file;
6727 6815
6728 /** 6816 /**
6729 * The offset of the position. 6817 * The offset of the position.
6730 */ 6818 */
6731 final int offset; 6819 final int offset;
6732 6820
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
6853 * RefactoringMethodParameter 6941 * RefactoringMethodParameter
6854 * 6942 *
6855 * { 6943 * {
6856 * "id": optional String 6944 * "id": optional String
6857 * "kind": RefactoringMethodParameterKind 6945 * "kind": RefactoringMethodParameterKind
6858 * "type": String 6946 * "type": String
6859 * "name": String 6947 * "name": String
6860 * "parameters": optional String 6948 * "parameters": optional String
6861 * } 6949 * }
6862 */ 6950 */
6863 class RefactoringMethodParameter { 6951 class RefactoringMethodParameter implements HasToJson {
6864 /** 6952 /**
6865 * The unique identifier of the parameter. Clients may omit this field for 6953 * The unique identifier of the parameter. Clients may omit this field for
6866 * the parameters they want to add. 6954 * the parameters they want to add.
6867 */ 6955 */
6868 final String id; 6956 final String id;
6869 6957
6870 /** 6958 /**
6871 * The kind of the parameter. 6959 * The kind of the parameter.
6872 */ 6960 */
6873 final RefactoringMethodParameterKind kind; 6961 final RefactoringMethodParameterKind kind;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
7018 7106
7019 /** 7107 /**
7020 * RefactoringProblem 7108 * RefactoringProblem
7021 * 7109 *
7022 * { 7110 * {
7023 * "severity": RefactoringProblemSeverity 7111 * "severity": RefactoringProblemSeverity
7024 * "message": String 7112 * "message": String
7025 * "location": Location 7113 * "location": Location
7026 * } 7114 * }
7027 */ 7115 */
7028 class RefactoringProblem { 7116 class RefactoringProblem implements HasToJson {
7029 /** 7117 /**
7030 * The severity of the problem being represented. 7118 * The severity of the problem being represented.
7031 */ 7119 */
7032 final RefactoringProblemSeverity severity; 7120 final RefactoringProblemSeverity severity;
7033 7121
7034 /** 7122 /**
7035 * A human-readable description of the problem being represented. 7123 * A human-readable description of the problem being represented.
7036 */ 7124 */
7037 final String message; 7125 final String message;
7038 7126
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
7154 String toJson() => name; 7242 String toJson() => name;
7155 } 7243 }
7156 7244
7157 /** 7245 /**
7158 * RemoveContentOverlay 7246 * RemoveContentOverlay
7159 * 7247 *
7160 * { 7248 * {
7161 * "type": "remove" 7249 * "type": "remove"
7162 * } 7250 * }
7163 */ 7251 */
7164 class RemoveContentOverlay { 7252 class RemoveContentOverlay implements HasToJson {
7165 RemoveContentOverlay(); 7253 RemoveContentOverlay();
7166 7254
7167 factory RemoveContentOverlay.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) { 7255 factory RemoveContentOverlay.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) {
7168 if (json is Map) { 7256 if (json is Map) {
7169 if (json["type"] != "remove") { 7257 if (json["type"] != "remove") {
7170 throw jsonDecoder.mismatch(jsonPath, "equal " + "remove"); 7258 throw jsonDecoder.mismatch(jsonPath, "equal " + "remove");
7171 } 7259 }
7172 return new RemoveContentOverlay(); 7260 return new RemoveContentOverlay();
7173 } else { 7261 } else {
7174 throw jsonDecoder.mismatch(jsonPath, "RemoveContentOverlay"); 7262 throw jsonDecoder.mismatch(jsonPath, "RemoveContentOverlay");
(...skipping 28 matching lines...) Expand all
7203 /** 7291 /**
7204 * SearchResult 7292 * SearchResult
7205 * 7293 *
7206 * { 7294 * {
7207 * "location": Location 7295 * "location": Location
7208 * "kind": SearchResultKind 7296 * "kind": SearchResultKind
7209 * "isPotential": bool 7297 * "isPotential": bool
7210 * "path": List<Element> 7298 * "path": List<Element>
7211 * } 7299 * }
7212 */ 7300 */
7213 class SearchResult { 7301 class SearchResult implements HasToJson {
7214 /** 7302 /**
7215 * The location of the code that matched the search criteria. 7303 * The location of the code that matched the search criteria.
7216 */ 7304 */
7217 final Location location; 7305 final Location location;
7218 7306
7219 /** 7307 /**
7220 * The kind of element that was found or the kind of reference that was 7308 * The kind of element that was found or the kind of reference that was
7221 * found. 7309 * found.
7222 */ 7310 */
7223 final SearchResultKind kind; 7311 final SearchResultKind kind;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
7268 } else { 7356 } else {
7269 throw jsonDecoder.mismatch(jsonPath, "SearchResult"); 7357 throw jsonDecoder.mismatch(jsonPath, "SearchResult");
7270 } 7358 }
7271 } 7359 }
7272 7360
7273 Map<String, dynamic> toJson() { 7361 Map<String, dynamic> toJson() {
7274 Map<String, dynamic> result = {}; 7362 Map<String, dynamic> result = {};
7275 result["location"] = location.toJson(); 7363 result["location"] = location.toJson();
7276 result["kind"] = kind.toJson(); 7364 result["kind"] = kind.toJson();
7277 result["isPotential"] = isPotential; 7365 result["isPotential"] = isPotential;
7278 result["path"] = path.map((Element value) => value.toJson()); 7366 result["path"] = path.map((Element value) => value.toJson()).toList();
7279 return result; 7367 return result;
7280 } 7368 }
7281 7369
7282 @override 7370 @override
7283 String toString() => JSON.encode(toJson()); 7371 String toString() => JSON.encode(toJson());
7284 7372
7285 @override 7373 @override
7286 bool operator==(other) { 7374 bool operator==(other) {
7287 if (other is SearchResult) { 7375 if (other is SearchResult) {
7288 return location == other.location && 7376 return location == other.location &&
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
7429 /** 7517 /**
7430 * SourceChange 7518 * SourceChange
7431 * 7519 *
7432 * { 7520 * {
7433 * "message": String 7521 * "message": String
7434 * "edits": List<SourceFileEdit> 7522 * "edits": List<SourceFileEdit>
7435 * "linkedEditGroups": List<LinkedEditGroup> 7523 * "linkedEditGroups": List<LinkedEditGroup>
7436 * "selection": optional Position 7524 * "selection": optional Position
7437 * } 7525 * }
7438 */ 7526 */
7439 class SourceChange { 7527 class SourceChange implements HasToJson {
7440 /** 7528 /**
7441 * A human-readable description of the change to be applied. 7529 * A human-readable description of the change to be applied.
7442 */ 7530 */
7443 final String message; 7531 final String message;
7444 7532
7445 /** 7533 /**
7446 * A list of the edits used to effect the change, grouped by file. 7534 * A list of the edits used to effect the change, grouped by file.
7447 */ 7535 */
7448 final List<SourceFileEdit> edits; 7536 final List<SourceFileEdit> edits;
7449 7537
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
7486 } 7574 }
7487 return new SourceChange(message, edits, linkedEditGroups, selection: selec tion); 7575 return new SourceChange(message, edits, linkedEditGroups, selection: selec tion);
7488 } else { 7576 } else {
7489 throw jsonDecoder.mismatch(jsonPath, "SourceChange"); 7577 throw jsonDecoder.mismatch(jsonPath, "SourceChange");
7490 } 7578 }
7491 } 7579 }
7492 7580
7493 Map<String, dynamic> toJson() { 7581 Map<String, dynamic> toJson() {
7494 Map<String, dynamic> result = {}; 7582 Map<String, dynamic> result = {};
7495 result["message"] = message; 7583 result["message"] = message;
7496 result["edits"] = edits.map((SourceFileEdit value) => value.toJson()); 7584 result["edits"] = edits.map((SourceFileEdit value) => value.toJson()).toList ();
7497 result["linkedEditGroups"] = linkedEditGroups.map((LinkedEditGroup value) => value.toJson()); 7585 result["linkedEditGroups"] = linkedEditGroups.map((LinkedEditGroup value) => value.toJson()).toList();
7498 if (selection != null) { 7586 if (selection != null) {
7499 result["selection"] = selection.toJson(); 7587 result["selection"] = selection.toJson();
7500 } 7588 }
7501 return result; 7589 return result;
7502 } 7590 }
7503 7591
7504 @override 7592 @override
7505 String toString() => JSON.encode(toJson()); 7593 String toString() => JSON.encode(toJson());
7506 7594
7507 @override 7595 @override
(...skipping 21 matching lines...) Expand all
7529 /** 7617 /**
7530 * SourceEdit 7618 * SourceEdit
7531 * 7619 *
7532 * { 7620 * {
7533 * "offset": int 7621 * "offset": int
7534 * "length": int 7622 * "length": int
7535 * "replacement": String 7623 * "replacement": String
7536 * "id": optional String 7624 * "id": optional String
7537 * } 7625 * }
7538 */ 7626 */
7539 class SourceEdit { 7627 class SourceEdit implements HasToJson {
7540 /** 7628 /**
7541 * The offset of the region to be modified. 7629 * The offset of the region to be modified.
7542 */ 7630 */
7543 final int offset; 7631 final int offset;
7544 7632
7545 /** 7633 /**
7546 * The length of the region to be modified. 7634 * The length of the region to be modified.
7547 */ 7635 */
7548 final int length; 7636 final int length;
7549 7637
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
7633 } 7721 }
7634 7722
7635 /** 7723 /**
7636 * SourceFileEdit 7724 * SourceFileEdit
7637 * 7725 *
7638 * { 7726 * {
7639 * "file": FilePath 7727 * "file": FilePath
7640 * "edits": List<SourceEdit> 7728 * "edits": List<SourceEdit>
7641 * } 7729 * }
7642 */ 7730 */
7643 class SourceFileEdit { 7731 class SourceFileEdit implements HasToJson {
7644 /** 7732 /**
7645 * The file containing the code to be modified. 7733 * The file containing the code to be modified.
7646 */ 7734 */
7647 final String file; 7735 final String file;
7648 7736
7649 /** 7737 /**
7650 * A list of the edits used to effect the change. 7738 * A list of the edits used to effect the change.
7651 */ 7739 */
7652 final List<SourceEdit> edits; 7740 final List<SourceEdit> edits;
7653 7741
(...skipping 15 matching lines...) Expand all
7669 } 7757 }
7670 return new SourceFileEdit(file, edits); 7758 return new SourceFileEdit(file, edits);
7671 } else { 7759 } else {
7672 throw jsonDecoder.mismatch(jsonPath, "SourceFileEdit"); 7760 throw jsonDecoder.mismatch(jsonPath, "SourceFileEdit");
7673 } 7761 }
7674 } 7762 }
7675 7763
7676 Map<String, dynamic> toJson() { 7764 Map<String, dynamic> toJson() {
7677 Map<String, dynamic> result = {}; 7765 Map<String, dynamic> result = {};
7678 result["file"] = file; 7766 result["file"] = file;
7679 result["edits"] = edits.map((SourceEdit value) => value.toJson()); 7767 result["edits"] = edits.map((SourceEdit value) => value.toJson()).toList();
7680 return result; 7768 return result;
7681 } 7769 }
7682 7770
7683 @override 7771 @override
7684 String toString() => JSON.encode(toJson()); 7772 String toString() => JSON.encode(toJson());
7685 7773
7686 @override 7774 @override
7687 bool operator==(other) { 7775 bool operator==(other) {
7688 if (other is SourceFileEdit) { 7776 if (other is SourceFileEdit) {
7689 return file == other.file && 7777 return file == other.file &&
(...skipping 17 matching lines...) Expand all
7707 * { 7795 * {
7708 * "classElement": Element 7796 * "classElement": Element
7709 * "displayName": optional String 7797 * "displayName": optional String
7710 * "memberElement": optional Element 7798 * "memberElement": optional Element
7711 * "superclass": optional int 7799 * "superclass": optional int
7712 * "interfaces": List<int> 7800 * "interfaces": List<int>
7713 * "mixins": List<int> 7801 * "mixins": List<int>
7714 * "subclasses": List<int> 7802 * "subclasses": List<int>
7715 * } 7803 * }
7716 */ 7804 */
7717 class TypeHierarchyItem { 7805 class TypeHierarchyItem implements HasToJson {
7718 /** 7806 /**
7719 * The class element represented by this item. 7807 * The class element represented by this item.
7720 */ 7808 */
7721 final Element classElement; 7809 final Element classElement;
7722 7810
7723 /** 7811 /**
7724 * The name to be displayed for the class. This field will be omitted if the 7812 * The name to be displayed for the class. This field will be omitted if the
7725 * display name is the same as the name of the element. The display name is 7813 * display name is the same as the name of the element. The display name is
7726 * different if there is additional type information to be displayed, such as 7814 * different if there is additional type information to be displayed, such as
7727 * type arguments. 7815 * type arguments.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
7858 7946
7859 /** 7947 /**
7860 * extractLocalVariable feedback 7948 * extractLocalVariable feedback
7861 * 7949 *
7862 * { 7950 * {
7863 * "names": List<String> 7951 * "names": List<String>
7864 * "offsets": List<int> 7952 * "offsets": List<int>
7865 * "lengths": List<int> 7953 * "lengths": List<int>
7866 * } 7954 * }
7867 */ 7955 */
7868 class ExtractLocalVariableFeedback { 7956 class ExtractLocalVariableFeedback implements HasToJson {
7869 /** 7957 /**
7870 * The proposed names for the local variable. 7958 * The proposed names for the local variable.
7871 */ 7959 */
7872 final List<String> names; 7960 final List<String> names;
7873 7961
7874 /** 7962 /**
7875 * The offsets of the expressions that would be replaced by a reference to 7963 * The offsets of the expressions that would be replaced by a reference to
7876 * the variable. 7964 * the variable.
7877 */ 7965 */
7878 final List<int> offsets; 7966 final List<int> offsets;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
7950 } 8038 }
7951 8039
7952 /** 8040 /**
7953 * extractLocalVariable options 8041 * extractLocalVariable options
7954 * 8042 *
7955 * { 8043 * {
7956 * "name": String 8044 * "name": String
7957 * "extractAll": bool 8045 * "extractAll": bool
7958 * } 8046 * }
7959 */ 8047 */
7960 class ExtractLocalVariableOptions { 8048 class ExtractLocalVariableOptions implements HasToJson {
7961 /** 8049 /**
7962 * The name that the local variable should be given. 8050 * The name that the local variable should be given.
7963 */ 8051 */
7964 final String name; 8052 final String name;
7965 8053
7966 /** 8054 /**
7967 * True if all occurrences of the expression within the scope in which the 8055 * True if all occurrences of the expression within the scope in which the
7968 * variable will be defined should be replaced by a reference to the local 8056 * variable will be defined should be replaced by a reference to the local
7969 * variable. The expression used to initiate the refactoring will always be 8057 * variable. The expression used to initiate the refactoring will always be
7970 * replaced. 8058 * replaced.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
8034 * "length": int 8122 * "length": int
8035 * "returnType": String 8123 * "returnType": String
8036 * "names": List<String> 8124 * "names": List<String>
8037 * "canCreateGetter": bool 8125 * "canCreateGetter": bool
8038 * "parameters": List<RefactoringMethodParameter> 8126 * "parameters": List<RefactoringMethodParameter>
8039 * "occurrences": int 8127 * "occurrences": int
8040 * "offsets": List<int> 8128 * "offsets": List<int>
8041 * "lengths": List<int> 8129 * "lengths": List<int>
8042 * } 8130 * }
8043 */ 8131 */
8044 class ExtractMethodFeedback { 8132 class ExtractMethodFeedback implements HasToJson {
8045 /** 8133 /**
8046 * The offset to the beginning of the expression or statements that will be 8134 * The offset to the beginning of the expression or statements that will be
8047 * extracted. 8135 * extracted.
8048 */ 8136 */
8049 final int offset; 8137 final int offset;
8050 8138
8051 /** 8139 /**
8052 * The length of the expression or statements that will be extracted. 8140 * The length of the expression or statements that will be extracted.
8053 */ 8141 */
8054 final int length; 8142 final int length;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
8162 new ResponseDecoder(), "feedback", refactoringResult.feedback); 8250 new ResponseDecoder(), "feedback", refactoringResult.feedback);
8163 } 8251 }
8164 8252
8165 Map<String, dynamic> toJson() { 8253 Map<String, dynamic> toJson() {
8166 Map<String, dynamic> result = {}; 8254 Map<String, dynamic> result = {};
8167 result["offset"] = offset; 8255 result["offset"] = offset;
8168 result["length"] = length; 8256 result["length"] = length;
8169 result["returnType"] = returnType; 8257 result["returnType"] = returnType;
8170 result["names"] = names; 8258 result["names"] = names;
8171 result["canCreateGetter"] = canCreateGetter; 8259 result["canCreateGetter"] = canCreateGetter;
8172 result["parameters"] = parameters.map((RefactoringMethodParameter value) => value.toJson()); 8260 result["parameters"] = parameters.map((RefactoringMethodParameter value) => value.toJson()).toList();
8173 result["occurrences"] = occurrences; 8261 result["occurrences"] = occurrences;
8174 result["offsets"] = offsets; 8262 result["offsets"] = offsets;
8175 result["lengths"] = lengths; 8263 result["lengths"] = lengths;
8176 return result; 8264 return result;
8177 } 8265 }
8178 8266
8179 @override 8267 @override
8180 String toString() => JSON.encode(toJson()); 8268 String toString() => JSON.encode(toJson());
8181 8269
8182 @override 8270 @override
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
8215 * extractMethod options 8303 * extractMethod options
8216 * 8304 *
8217 * { 8305 * {
8218 * "returnType": String 8306 * "returnType": String
8219 * "createGetter": bool 8307 * "createGetter": bool
8220 * "name": String 8308 * "name": String
8221 * "parameters": List<RefactoringMethodParameter> 8309 * "parameters": List<RefactoringMethodParameter>
8222 * "extractAll": bool 8310 * "extractAll": bool
8223 * } 8311 * }
8224 */ 8312 */
8225 class ExtractMethodOptions { 8313 class ExtractMethodOptions implements HasToJson {
8226 /** 8314 /**
8227 * The return type that should be defined for the method. 8315 * The return type that should be defined for the method.
8228 */ 8316 */
8229 final String returnType; 8317 final String returnType;
8230 8318
8231 /** 8319 /**
8232 * True if a getter should be created rather than a method. It is an error if 8320 * True if a getter should be created rather than a method. It is an error if
8233 * this field is true and the list of parameters is non-empty. 8321 * this field is true and the list of parameters is non-empty.
8234 */ 8322 */
8235 final bool createGetter; 8323 final bool createGetter;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
8303 factory ExtractMethodOptions.fromRefactoringParams(EditGetRefactoringParams re factoringParams, Request request) { 8391 factory ExtractMethodOptions.fromRefactoringParams(EditGetRefactoringParams re factoringParams, Request request) {
8304 return new ExtractMethodOptions.fromJson( 8392 return new ExtractMethodOptions.fromJson(
8305 new RequestDecoder(request), "options", refactoringParams.options); 8393 new RequestDecoder(request), "options", refactoringParams.options);
8306 } 8394 }
8307 8395
8308 Map<String, dynamic> toJson() { 8396 Map<String, dynamic> toJson() {
8309 Map<String, dynamic> result = {}; 8397 Map<String, dynamic> result = {};
8310 result["returnType"] = returnType; 8398 result["returnType"] = returnType;
8311 result["createGetter"] = createGetter; 8399 result["createGetter"] = createGetter;
8312 result["name"] = name; 8400 result["name"] = name;
8313 result["parameters"] = parameters.map((RefactoringMethodParameter value) => value.toJson()); 8401 result["parameters"] = parameters.map((RefactoringMethodParameter value) => value.toJson()).toList();
8314 result["extractAll"] = extractAll; 8402 result["extractAll"] = extractAll;
8315 return result; 8403 return result;
8316 } 8404 }
8317 8405
8318 @override 8406 @override
8319 String toString() => JSON.encode(toJson()); 8407 String toString() => JSON.encode(toJson());
8320 8408
8321 @override 8409 @override
8322 bool operator==(other) { 8410 bool operator==(other) {
8323 if (other is ExtractMethodOptions) { 8411 if (other is ExtractMethodOptions) {
(...skipping 19 matching lines...) Expand all
8343 } 8431 }
8344 8432
8345 /** 8433 /**
8346 * inlineMethod options 8434 * inlineMethod options
8347 * 8435 *
8348 * { 8436 * {
8349 * "deleteSource": bool 8437 * "deleteSource": bool
8350 * "inlineAll": bool 8438 * "inlineAll": bool
8351 * } 8439 * }
8352 */ 8440 */
8353 class InlineMethodOptions { 8441 class InlineMethodOptions implements HasToJson {
8354 /** 8442 /**
8355 * True if the method being inlined should be removed. It is an error if this 8443 * True if the method being inlined should be removed. It is an error if this
8356 * field is true and inlineAll is false. 8444 * field is true and inlineAll is false.
8357 */ 8445 */
8358 final bool deleteSource; 8446 final bool deleteSource;
8359 8447
8360 /** 8448 /**
8361 * True if all invocations of the method should be inlined, or false if only 8449 * True if all invocations of the method should be inlined, or false if only
8362 * the invocation site used to create this refactoring should be inlined. 8450 * the invocation site used to create this refactoring should be inlined.
8363 */ 8451 */
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
8419 } 8507 }
8420 8508
8421 /** 8509 /**
8422 * rename feedback 8510 * rename feedback
8423 * 8511 *
8424 * { 8512 * {
8425 * "offset": int 8513 * "offset": int
8426 * "length": int 8514 * "length": int
8427 * } 8515 * }
8428 */ 8516 */
8429 class RenameFeedback { 8517 class RenameFeedback implements HasToJson {
8430 /** 8518 /**
8431 * The offset to the beginning of the name selected to be renamed. 8519 * The offset to the beginning of the name selected to be renamed.
8432 */ 8520 */
8433 final int offset; 8521 final int offset;
8434 8522
8435 /** 8523 /**
8436 * The length of the name selected to be renamed. 8524 * The length of the name selected to be renamed.
8437 */ 8525 */
8438 final int length; 8526 final int length;
8439 8527
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
8492 } 8580 }
8493 } 8581 }
8494 8582
8495 /** 8583 /**
8496 * rename options 8584 * rename options
8497 * 8585 *
8498 * { 8586 * {
8499 * "newName": String 8587 * "newName": String
8500 * } 8588 * }
8501 */ 8589 */
8502 class RenameOptions { 8590 class RenameOptions implements HasToJson {
8503 /** 8591 /**
8504 * The name that the element should have after the refactoring. 8592 * The name that the element should have after the refactoring.
8505 */ 8593 */
8506 final String newName; 8594 final String newName;
8507 8595
8508 RenameOptions(this.newName); 8596 RenameOptions(this.newName);
8509 8597
8510 factory RenameOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath, Objec t json) { 8598 factory RenameOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath, Objec t json) {
8511 if (json is Map) { 8599 if (json is Map) {
8512 String newName; 8600 String newName;
(...skipping 30 matching lines...) Expand all
8543 return false; 8631 return false;
8544 } 8632 }
8545 8633
8546 @override 8634 @override
8547 int get hashCode { 8635 int get hashCode {
8548 int hash = 0; 8636 int hash = 0;
8549 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); 8637 hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
8550 return _JenkinsSmiHash.finish(hash); 8638 return _JenkinsSmiHash.finish(hash);
8551 } 8639 }
8552 } 8640 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/protocol.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698