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

Side by Side Diff: pkg/analyzer_plugin/lib/protocol/protocol_generated.dart

Issue 2746333008: Run dartfmt on dart2js codebase. (Closed)
Patch Set: Format all analyzer packages Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script 6 // To regenerate the file, use the script
7 // "pkg/analysis_server/tool/spec/generate_files". 7 // "pkg/analysis_server/tool/spec/generate_files".
8 8
9 import 'dart:convert' hide JsonDecoder; 9 import 'dart:convert' hide JsonDecoder;
10 10
(...skipping 24 matching lines...) Expand all
35 */ 35 */
36 void set content(String value) { 36 void set content(String value) {
37 assert(value != null); 37 assert(value != null);
38 this._content = value; 38 this._content = value;
39 } 39 }
40 40
41 AddContentOverlay(String content) { 41 AddContentOverlay(String content) {
42 this.content = content; 42 this.content = content;
43 } 43 }
44 44
45 factory AddContentOverlay.fromJson(JsonDecoder jsonDecoder, String jsonPath, O bject json) { 45 factory AddContentOverlay.fromJson(
46 JsonDecoder jsonDecoder, String jsonPath, Object json) {
46 if (json == null) { 47 if (json == null) {
47 json = {}; 48 json = {};
48 } 49 }
49 if (json is Map) { 50 if (json is Map) {
50 if (json["type"] != "add") { 51 if (json["type"] != "add") {
51 throw jsonDecoder.mismatch(jsonPath, "equal " + "add", json); 52 throw jsonDecoder.mismatch(jsonPath, "equal " + "add", json);
52 } 53 }
53 String content; 54 String content;
54 if (json.containsKey("content")) { 55 if (json.containsKey("content")) {
55 content = jsonDecoder.decodeString(jsonPath + ".content", json["content" ]); 56 content =
57 jsonDecoder.decodeString(jsonPath + ".content", json["content"]);
56 } else { 58 } else {
57 throw jsonDecoder.mismatch(jsonPath, "content"); 59 throw jsonDecoder.mismatch(jsonPath, "content");
58 } 60 }
59 return new AddContentOverlay(content); 61 return new AddContentOverlay(content);
60 } else { 62 } else {
61 throw jsonDecoder.mismatch(jsonPath, "AddContentOverlay", json); 63 throw jsonDecoder.mismatch(jsonPath, "AddContentOverlay", json);
62 } 64 }
63 } 65 }
64 66
65 @override 67 @override
66 Map<String, dynamic> toJson() { 68 Map<String, dynamic> toJson() {
67 Map<String, dynamic> result = {}; 69 Map<String, dynamic> result = {};
68 result["type"] = "add"; 70 result["type"] = "add";
69 result["content"] = content; 71 result["content"] = content;
70 return result; 72 return result;
71 } 73 }
72 74
73 @override 75 @override
74 String toString() => JSON.encode(toJson()); 76 String toString() => JSON.encode(toJson());
75 77
76 @override 78 @override
77 bool operator==(other) { 79 bool operator ==(other) {
78 if (other is AddContentOverlay) { 80 if (other is AddContentOverlay) {
79 return content == other.content; 81 return content == other.content;
80 } 82 }
81 return false; 83 return false;
82 } 84 }
83 85
84 @override 86 @override
85 int get hashCode { 87 int get hashCode {
86 int hash = 0; 88 int hash = 0;
87 hash = JenkinsSmiHash.combine(hash, 704418402); 89 hash = JenkinsSmiHash.combine(hash, 704418402);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 * needs to be performant it is possible that complicated tests will be 224 * needs to be performant it is possible that complicated tests will be
223 * skipped and a false negative returned. For this reason, this attribute 225 * skipped and a false negative returned. For this reason, this attribute
224 * should be treated as a "hint". Despite the possibility of false negatives, 226 * should be treated as a "hint". Despite the possibility of false negatives,
225 * no false positives should be returned. If a client sees this flag set they 227 * no false positives should be returned. If a client sees this flag set they
226 * can proceed with the confidence that there are in fact associated fixes. 228 * can proceed with the confidence that there are in fact associated fixes.
227 */ 229 */
228 void set hasFix(bool value) { 230 void set hasFix(bool value) {
229 this._hasFix = value; 231 this._hasFix = value;
230 } 232 }
231 233
232 AnalysisError(AnalysisErrorSeverity severity, AnalysisErrorType type, Location location, String message, String code, {String correction, bool hasFix}) { 234 AnalysisError(AnalysisErrorSeverity severity, AnalysisErrorType type,
235 Location location, String message, String code,
236 {String correction, bool hasFix}) {
233 this.severity = severity; 237 this.severity = severity;
234 this.type = type; 238 this.type = type;
235 this.location = location; 239 this.location = location;
236 this.message = message; 240 this.message = message;
237 this.correction = correction; 241 this.correction = correction;
238 this.code = code; 242 this.code = code;
239 this.hasFix = hasFix; 243 this.hasFix = hasFix;
240 } 244 }
241 245
242 factory AnalysisError.fromJson(JsonDecoder jsonDecoder, String jsonPath, Objec t json) { 246 factory AnalysisError.fromJson(
247 JsonDecoder jsonDecoder, String jsonPath, Object json) {
243 if (json == null) { 248 if (json == null) {
244 json = {}; 249 json = {};
245 } 250 }
246 if (json is Map) { 251 if (json is Map) {
247 AnalysisErrorSeverity severity; 252 AnalysisErrorSeverity severity;
248 if (json.containsKey("severity")) { 253 if (json.containsKey("severity")) {
249 severity = new AnalysisErrorSeverity.fromJson(jsonDecoder, jsonPath + ". severity", json["severity"]); 254 severity = new AnalysisErrorSeverity.fromJson(
255 jsonDecoder, jsonPath + ".severity", json["severity"]);
250 } else { 256 } else {
251 throw jsonDecoder.mismatch(jsonPath, "severity"); 257 throw jsonDecoder.mismatch(jsonPath, "severity");
252 } 258 }
253 AnalysisErrorType type; 259 AnalysisErrorType type;
254 if (json.containsKey("type")) { 260 if (json.containsKey("type")) {
255 type = new AnalysisErrorType.fromJson(jsonDecoder, jsonPath + ".type", j son["type"]); 261 type = new AnalysisErrorType.fromJson(
262 jsonDecoder, jsonPath + ".type", json["type"]);
256 } else { 263 } else {
257 throw jsonDecoder.mismatch(jsonPath, "type"); 264 throw jsonDecoder.mismatch(jsonPath, "type");
258 } 265 }
259 Location location; 266 Location location;
260 if (json.containsKey("location")) { 267 if (json.containsKey("location")) {
261 location = new Location.fromJson(jsonDecoder, jsonPath + ".location", js on["location"]); 268 location = new Location.fromJson(
269 jsonDecoder, jsonPath + ".location", json["location"]);
262 } else { 270 } else {
263 throw jsonDecoder.mismatch(jsonPath, "location"); 271 throw jsonDecoder.mismatch(jsonPath, "location");
264 } 272 }
265 String message; 273 String message;
266 if (json.containsKey("message")) { 274 if (json.containsKey("message")) {
267 message = jsonDecoder.decodeString(jsonPath + ".message", json["message" ]); 275 message =
276 jsonDecoder.decodeString(jsonPath + ".message", json["message"]);
268 } else { 277 } else {
269 throw jsonDecoder.mismatch(jsonPath, "message"); 278 throw jsonDecoder.mismatch(jsonPath, "message");
270 } 279 }
271 String correction; 280 String correction;
272 if (json.containsKey("correction")) { 281 if (json.containsKey("correction")) {
273 correction = jsonDecoder.decodeString(jsonPath + ".correction", json["co rrection"]); 282 correction = jsonDecoder.decodeString(
283 jsonPath + ".correction", json["correction"]);
274 } 284 }
275 String code; 285 String code;
276 if (json.containsKey("code")) { 286 if (json.containsKey("code")) {
277 code = jsonDecoder.decodeString(jsonPath + ".code", json["code"]); 287 code = jsonDecoder.decodeString(jsonPath + ".code", json["code"]);
278 } else { 288 } else {
279 throw jsonDecoder.mismatch(jsonPath, "code"); 289 throw jsonDecoder.mismatch(jsonPath, "code");
280 } 290 }
281 bool hasFix; 291 bool hasFix;
282 if (json.containsKey("hasFix")) { 292 if (json.containsKey("hasFix")) {
283 hasFix = jsonDecoder.decodeBool(jsonPath + ".hasFix", json["hasFix"]); 293 hasFix = jsonDecoder.decodeBool(jsonPath + ".hasFix", json["hasFix"]);
284 } 294 }
285 return new AnalysisError(severity, type, location, message, code, correcti on: correction, hasFix: hasFix); 295 return new AnalysisError(severity, type, location, message, code,
296 correction: correction, hasFix: hasFix);
286 } else { 297 } else {
287 throw jsonDecoder.mismatch(jsonPath, "AnalysisError", json); 298 throw jsonDecoder.mismatch(jsonPath, "AnalysisError", json);
288 } 299 }
289 } 300 }
290 301
291 @override 302 @override
292 Map<String, dynamic> toJson() { 303 Map<String, dynamic> toJson() {
293 Map<String, dynamic> result = {}; 304 Map<String, dynamic> result = {};
294 result["severity"] = severity.toJson(); 305 result["severity"] = severity.toJson();
295 result["type"] = type.toJson(); 306 result["type"] = type.toJson();
296 result["location"] = location.toJson(); 307 result["location"] = location.toJson();
297 result["message"] = message; 308 result["message"] = message;
298 if (correction != null) { 309 if (correction != null) {
299 result["correction"] = correction; 310 result["correction"] = correction;
300 } 311 }
301 result["code"] = code; 312 result["code"] = code;
302 if (hasFix != null) { 313 if (hasFix != null) {
303 result["hasFix"] = hasFix; 314 result["hasFix"] = hasFix;
304 } 315 }
305 return result; 316 return result;
306 } 317 }
307 318
308 @override 319 @override
309 String toString() => JSON.encode(toJson()); 320 String toString() => JSON.encode(toJson());
310 321
311 @override 322 @override
312 bool operator==(other) { 323 bool operator ==(other) {
313 if (other is AnalysisError) { 324 if (other is AnalysisError) {
314 return severity == other.severity && 325 return severity == other.severity &&
315 type == other.type && 326 type == other.type &&
316 location == other.location && 327 location == other.location &&
317 message == other.message && 328 message == other.message &&
318 correction == other.correction && 329 correction == other.correction &&
319 code == other.code && 330 code == other.code &&
320 hasFix == other.hasFix; 331 hasFix == other.hasFix;
321 } 332 }
322 return false; 333 return false;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 List<PrioritizedSourceChange> get fixes => _fixes; 381 List<PrioritizedSourceChange> get fixes => _fixes;
371 382
372 /** 383 /**
373 * The fixes associated with the error. 384 * The fixes associated with the error.
374 */ 385 */
375 void set fixes(List<PrioritizedSourceChange> value) { 386 void set fixes(List<PrioritizedSourceChange> value) {
376 assert(value != null); 387 assert(value != null);
377 this._fixes = value; 388 this._fixes = value;
378 } 389 }
379 390
380 AnalysisErrorFixes(AnalysisError error, {List<PrioritizedSourceChange> fixes}) { 391 AnalysisErrorFixes(AnalysisError error,
392 {List<PrioritizedSourceChange> fixes}) {
381 this.error = error; 393 this.error = error;
382 if (fixes == null) { 394 if (fixes == null) {
383 this.fixes = <PrioritizedSourceChange>[]; 395 this.fixes = <PrioritizedSourceChange>[];
384 } else { 396 } else {
385 this.fixes = fixes; 397 this.fixes = fixes;
386 } 398 }
387 } 399 }
388 400
389 factory AnalysisErrorFixes.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 401 factory AnalysisErrorFixes.fromJson(
402 JsonDecoder jsonDecoder, String jsonPath, Object json) {
390 if (json == null) { 403 if (json == null) {
391 json = {}; 404 json = {};
392 } 405 }
393 if (json is Map) { 406 if (json is Map) {
394 AnalysisError error; 407 AnalysisError error;
395 if (json.containsKey("error")) { 408 if (json.containsKey("error")) {
396 error = new AnalysisError.fromJson(jsonDecoder, jsonPath + ".error", jso n["error"]); 409 error = new AnalysisError.fromJson(
410 jsonDecoder, jsonPath + ".error", json["error"]);
397 } else { 411 } else {
398 throw jsonDecoder.mismatch(jsonPath, "error"); 412 throw jsonDecoder.mismatch(jsonPath, "error");
399 } 413 }
400 List<PrioritizedSourceChange> fixes; 414 List<PrioritizedSourceChange> fixes;
401 if (json.containsKey("fixes")) { 415 if (json.containsKey("fixes")) {
402 fixes = jsonDecoder.decodeList(jsonPath + ".fixes", json["fixes"], (Stri ng jsonPath, Object json) => new PrioritizedSourceChange.fromJson(jsonDecoder, j sonPath, json)); 416 fixes = jsonDecoder.decodeList(
417 jsonPath + ".fixes",
418 json["fixes"],
419 (String jsonPath, Object json) =>
420 new PrioritizedSourceChange.fromJson(
421 jsonDecoder, jsonPath, json));
403 } else { 422 } else {
404 throw jsonDecoder.mismatch(jsonPath, "fixes"); 423 throw jsonDecoder.mismatch(jsonPath, "fixes");
405 } 424 }
406 return new AnalysisErrorFixes(error, fixes: fixes); 425 return new AnalysisErrorFixes(error, fixes: fixes);
407 } else { 426 } else {
408 throw jsonDecoder.mismatch(jsonPath, "AnalysisErrorFixes", json); 427 throw jsonDecoder.mismatch(jsonPath, "AnalysisErrorFixes", json);
409 } 428 }
410 } 429 }
411 430
412 @override 431 @override
413 Map<String, dynamic> toJson() { 432 Map<String, dynamic> toJson() {
414 Map<String, dynamic> result = {}; 433 Map<String, dynamic> result = {};
415 result["error"] = error.toJson(); 434 result["error"] = error.toJson();
416 result["fixes"] = fixes.map((PrioritizedSourceChange value) => value.toJson( )).toList(); 435 result["fixes"] =
436 fixes.map((PrioritizedSourceChange value) => value.toJson()).toList();
417 return result; 437 return result;
418 } 438 }
419 439
420 @override 440 @override
421 String toString() => JSON.encode(toJson()); 441 String toString() => JSON.encode(toJson());
422 442
423 @override 443 @override
424 bool operator==(other) { 444 bool operator ==(other) {
425 if (other is AnalysisErrorFixes) { 445 if (other is AnalysisErrorFixes) {
426 return error == other.error && 446 return error == other.error &&
427 listEqual(fixes, other.fixes, (PrioritizedSourceChange a, PrioritizedS ourceChange b) => a == b); 447 listEqual(fixes, other.fixes,
448 (PrioritizedSourceChange a, PrioritizedSourceChange b) => a == b);
428 } 449 }
429 return false; 450 return false;
430 } 451 }
431 452
432 @override 453 @override
433 int get hashCode { 454 int get hashCode {
434 int hash = 0; 455 int hash = 0;
435 hash = JenkinsSmiHash.combine(hash, error.hashCode); 456 hash = JenkinsSmiHash.combine(hash, error.hashCode);
436 hash = JenkinsSmiHash.combine(hash, fixes.hashCode); 457 hash = JenkinsSmiHash.combine(hash, fixes.hashCode);
437 return JenkinsSmiHash.finish(hash); 458 return JenkinsSmiHash.finish(hash);
438 } 459 }
439 } 460 }
440 461
441 /** 462 /**
442 * AnalysisErrorSeverity 463 * AnalysisErrorSeverity
443 * 464 *
444 * enum { 465 * enum {
445 * INFO 466 * INFO
446 * WARNING 467 * WARNING
447 * ERROR 468 * ERROR
448 * } 469 * }
449 * 470 *
450 * Clients may not extend, implement or mix-in this class. 471 * Clients may not extend, implement or mix-in this class.
451 */ 472 */
452 class AnalysisErrorSeverity implements Enum { 473 class AnalysisErrorSeverity implements Enum {
453 static const AnalysisErrorSeverity INFO = const AnalysisErrorSeverity._("INFO" ); 474 static const AnalysisErrorSeverity INFO =
475 const AnalysisErrorSeverity._("INFO");
454 476
455 static const AnalysisErrorSeverity WARNING = const AnalysisErrorSeverity._("WA RNING"); 477 static const AnalysisErrorSeverity WARNING =
478 const AnalysisErrorSeverity._("WARNING");
456 479
457 static const AnalysisErrorSeverity ERROR = const AnalysisErrorSeverity._("ERRO R"); 480 static const AnalysisErrorSeverity ERROR =
481 const AnalysisErrorSeverity._("ERROR");
458 482
459 /** 483 /**
460 * A list containing all of the enum values that are defined. 484 * A list containing all of the enum values that are defined.
461 */ 485 */
462 static const List<AnalysisErrorSeverity> VALUES = const <AnalysisErrorSeverity >[INFO, WARNING, ERROR]; 486 static const List<AnalysisErrorSeverity> VALUES =
487 const <AnalysisErrorSeverity>[INFO, WARNING, ERROR];
463 488
464 @override 489 @override
465 final String name; 490 final String name;
466 491
467 const AnalysisErrorSeverity._(this.name); 492 const AnalysisErrorSeverity._(this.name);
468 493
469 factory AnalysisErrorSeverity(String name) { 494 factory AnalysisErrorSeverity(String name) {
470 switch (name) { 495 switch (name) {
471 case "INFO": 496 case "INFO":
472 return INFO; 497 return INFO;
473 case "WARNING": 498 case "WARNING":
474 return WARNING; 499 return WARNING;
475 case "ERROR": 500 case "ERROR":
476 return ERROR; 501 return ERROR;
477 } 502 }
478 throw new Exception('Illegal enum value: $name'); 503 throw new Exception('Illegal enum value: $name');
479 } 504 }
480 505
481 factory AnalysisErrorSeverity.fromJson(JsonDecoder jsonDecoder, String jsonPat h, Object json) { 506 factory AnalysisErrorSeverity.fromJson(
507 JsonDecoder jsonDecoder, String jsonPath, Object json) {
482 if (json is String) { 508 if (json is String) {
483 try { 509 try {
484 return new AnalysisErrorSeverity(json); 510 return new AnalysisErrorSeverity(json);
485 } catch(_) { 511 } catch (_) {
486 // Fall through 512 // Fall through
487 } 513 }
488 } 514 }
489 throw jsonDecoder.mismatch(jsonPath, "AnalysisErrorSeverity", json); 515 throw jsonDecoder.mismatch(jsonPath, "AnalysisErrorSeverity", json);
490 } 516 }
491 517
492 @override 518 @override
493 String toString() => "AnalysisErrorSeverity.$name"; 519 String toString() => "AnalysisErrorSeverity.$name";
494 520
495 String toJson() => name; 521 String toJson() => name;
496 } 522 }
497 523
498 /** 524 /**
499 * AnalysisErrorType 525 * AnalysisErrorType
500 * 526 *
501 * enum { 527 * enum {
502 * CHECKED_MODE_COMPILE_TIME_ERROR 528 * CHECKED_MODE_COMPILE_TIME_ERROR
503 * COMPILE_TIME_ERROR 529 * COMPILE_TIME_ERROR
504 * HINT 530 * HINT
505 * LINT 531 * LINT
506 * STATIC_TYPE_WARNING 532 * STATIC_TYPE_WARNING
507 * STATIC_WARNING 533 * STATIC_WARNING
508 * SYNTACTIC_ERROR 534 * SYNTACTIC_ERROR
509 * TODO 535 * TODO
510 * } 536 * }
511 * 537 *
512 * Clients may not extend, implement or mix-in this class. 538 * Clients may not extend, implement or mix-in this class.
513 */ 539 */
514 class AnalysisErrorType implements Enum { 540 class AnalysisErrorType implements Enum {
515 static const AnalysisErrorType CHECKED_MODE_COMPILE_TIME_ERROR = const Analysi sErrorType._("CHECKED_MODE_COMPILE_TIME_ERROR"); 541 static const AnalysisErrorType CHECKED_MODE_COMPILE_TIME_ERROR =
542 const AnalysisErrorType._("CHECKED_MODE_COMPILE_TIME_ERROR");
516 543
517 static const AnalysisErrorType COMPILE_TIME_ERROR = const AnalysisErrorType._( "COMPILE_TIME_ERROR"); 544 static const AnalysisErrorType COMPILE_TIME_ERROR =
545 const AnalysisErrorType._("COMPILE_TIME_ERROR");
518 546
519 static const AnalysisErrorType HINT = const AnalysisErrorType._("HINT"); 547 static const AnalysisErrorType HINT = const AnalysisErrorType._("HINT");
520 548
521 static const AnalysisErrorType LINT = const AnalysisErrorType._("LINT"); 549 static const AnalysisErrorType LINT = const AnalysisErrorType._("LINT");
522 550
523 static const AnalysisErrorType STATIC_TYPE_WARNING = const AnalysisErrorType._ ("STATIC_TYPE_WARNING"); 551 static const AnalysisErrorType STATIC_TYPE_WARNING =
552 const AnalysisErrorType._("STATIC_TYPE_WARNING");
524 553
525 static const AnalysisErrorType STATIC_WARNING = const AnalysisErrorType._("STA TIC_WARNING"); 554 static const AnalysisErrorType STATIC_WARNING =
555 const AnalysisErrorType._("STATIC_WARNING");
526 556
527 static const AnalysisErrorType SYNTACTIC_ERROR = const AnalysisErrorType._("SY NTACTIC_ERROR"); 557 static const AnalysisErrorType SYNTACTIC_ERROR =
558 const AnalysisErrorType._("SYNTACTIC_ERROR");
528 559
529 static const AnalysisErrorType TODO = const AnalysisErrorType._("TODO"); 560 static const AnalysisErrorType TODO = const AnalysisErrorType._("TODO");
530 561
531 /** 562 /**
532 * A list containing all of the enum values that are defined. 563 * A list containing all of the enum values that are defined.
533 */ 564 */
534 static const List<AnalysisErrorType> VALUES = const <AnalysisErrorType>[CHECKE D_MODE_COMPILE_TIME_ERROR, COMPILE_TIME_ERROR, HINT, LINT, STATIC_TYPE_WARNING, STATIC_WARNING, SYNTACTIC_ERROR, TODO]; 565 static const List<AnalysisErrorType> VALUES = const <AnalysisErrorType>[
566 CHECKED_MODE_COMPILE_TIME_ERROR,
567 COMPILE_TIME_ERROR,
568 HINT,
569 LINT,
570 STATIC_TYPE_WARNING,
571 STATIC_WARNING,
572 SYNTACTIC_ERROR,
573 TODO
574 ];
535 575
536 @override 576 @override
537 final String name; 577 final String name;
538 578
539 const AnalysisErrorType._(this.name); 579 const AnalysisErrorType._(this.name);
540 580
541 factory AnalysisErrorType(String name) { 581 factory AnalysisErrorType(String name) {
542 switch (name) { 582 switch (name) {
543 case "CHECKED_MODE_COMPILE_TIME_ERROR": 583 case "CHECKED_MODE_COMPILE_TIME_ERROR":
544 return CHECKED_MODE_COMPILE_TIME_ERROR; 584 return CHECKED_MODE_COMPILE_TIME_ERROR;
545 case "COMPILE_TIME_ERROR": 585 case "COMPILE_TIME_ERROR":
546 return COMPILE_TIME_ERROR; 586 return COMPILE_TIME_ERROR;
547 case "HINT": 587 case "HINT":
548 return HINT; 588 return HINT;
549 case "LINT": 589 case "LINT":
550 return LINT; 590 return LINT;
551 case "STATIC_TYPE_WARNING": 591 case "STATIC_TYPE_WARNING":
552 return STATIC_TYPE_WARNING; 592 return STATIC_TYPE_WARNING;
553 case "STATIC_WARNING": 593 case "STATIC_WARNING":
554 return STATIC_WARNING; 594 return STATIC_WARNING;
555 case "SYNTACTIC_ERROR": 595 case "SYNTACTIC_ERROR":
556 return SYNTACTIC_ERROR; 596 return SYNTACTIC_ERROR;
557 case "TODO": 597 case "TODO":
558 return TODO; 598 return TODO;
559 } 599 }
560 throw new Exception('Illegal enum value: $name'); 600 throw new Exception('Illegal enum value: $name');
561 } 601 }
562 602
563 factory AnalysisErrorType.fromJson(JsonDecoder jsonDecoder, String jsonPath, O bject json) { 603 factory AnalysisErrorType.fromJson(
604 JsonDecoder jsonDecoder, String jsonPath, Object json) {
564 if (json is String) { 605 if (json is String) {
565 try { 606 try {
566 return new AnalysisErrorType(json); 607 return new AnalysisErrorType(json);
567 } catch(_) { 608 } catch (_) {
568 // Fall through 609 // Fall through
569 } 610 }
570 } 611 }
571 throw jsonDecoder.mismatch(jsonPath, "AnalysisErrorType", json); 612 throw jsonDecoder.mismatch(jsonPath, "AnalysisErrorType", json);
572 } 613 }
573 614
574 @override 615 @override
575 String toString() => "AnalysisErrorType.$name"; 616 String toString() => "AnalysisErrorType.$name";
576 617
577 String toJson() => name; 618 String toJson() => name;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 void set errors(List<AnalysisError> value) { 657 void set errors(List<AnalysisError> value) {
617 assert(value != null); 658 assert(value != null);
618 this._errors = value; 659 this._errors = value;
619 } 660 }
620 661
621 AnalysisErrorsParams(String file, List<AnalysisError> errors) { 662 AnalysisErrorsParams(String file, List<AnalysisError> errors) {
622 this.file = file; 663 this.file = file;
623 this.errors = errors; 664 this.errors = errors;
624 } 665 }
625 666
626 factory AnalysisErrorsParams.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) { 667 factory AnalysisErrorsParams.fromJson(
668 JsonDecoder jsonDecoder, String jsonPath, Object json) {
627 if (json == null) { 669 if (json == null) {
628 json = {}; 670 json = {};
629 } 671 }
630 if (json is Map) { 672 if (json is Map) {
631 String file; 673 String file;
632 if (json.containsKey("file")) { 674 if (json.containsKey("file")) {
633 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); 675 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
634 } else { 676 } else {
635 throw jsonDecoder.mismatch(jsonPath, "file"); 677 throw jsonDecoder.mismatch(jsonPath, "file");
636 } 678 }
637 List<AnalysisError> errors; 679 List<AnalysisError> errors;
638 if (json.containsKey("errors")) { 680 if (json.containsKey("errors")) {
639 errors = jsonDecoder.decodeList(jsonPath + ".errors", json["errors"], (S tring jsonPath, Object json) => new AnalysisError.fromJson(jsonDecoder, jsonPath , json)); 681 errors = jsonDecoder.decodeList(
682 jsonPath + ".errors",
683 json["errors"],
684 (String jsonPath, Object json) =>
685 new AnalysisError.fromJson(jsonDecoder, jsonPath, json));
640 } else { 686 } else {
641 throw jsonDecoder.mismatch(jsonPath, "errors"); 687 throw jsonDecoder.mismatch(jsonPath, "errors");
642 } 688 }
643 return new AnalysisErrorsParams(file, errors); 689 return new AnalysisErrorsParams(file, errors);
644 } else { 690 } else {
645 throw jsonDecoder.mismatch(jsonPath, "analysis.errors params", json); 691 throw jsonDecoder.mismatch(jsonPath, "analysis.errors params", json);
646 } 692 }
647 } 693 }
648 694
649 factory AnalysisErrorsParams.fromNotification(Notification notification) { 695 factory AnalysisErrorsParams.fromNotification(Notification notification) {
650 return new AnalysisErrorsParams.fromJson( 696 return new AnalysisErrorsParams.fromJson(
651 new ResponseDecoder(null), "params", notification.params); 697 new ResponseDecoder(null), "params", notification.params);
652 } 698 }
653 699
654 @override 700 @override
655 Map<String, dynamic> toJson() { 701 Map<String, dynamic> toJson() {
656 Map<String, dynamic> result = {}; 702 Map<String, dynamic> result = {};
657 result["file"] = file; 703 result["file"] = file;
658 result["errors"] = errors.map((AnalysisError value) => value.toJson()).toLis t(); 704 result["errors"] =
705 errors.map((AnalysisError value) => value.toJson()).toList();
659 return result; 706 return result;
660 } 707 }
661 708
662 Notification toNotification() { 709 Notification toNotification() {
663 return new Notification("analysis.errors", toJson()); 710 return new Notification("analysis.errors", toJson());
664 } 711 }
665 712
666 @override 713 @override
667 String toString() => JSON.encode(toJson()); 714 String toString() => JSON.encode(toJson());
668 715
669 @override 716 @override
670 bool operator==(other) { 717 bool operator ==(other) {
671 if (other is AnalysisErrorsParams) { 718 if (other is AnalysisErrorsParams) {
672 return file == other.file && 719 return file == other.file &&
673 listEqual(errors, other.errors, (AnalysisError a, AnalysisError b) => a == b); 720 listEqual(errors, other.errors,
721 (AnalysisError a, AnalysisError b) => a == b);
674 } 722 }
675 return false; 723 return false;
676 } 724 }
677 725
678 @override 726 @override
679 int get hashCode { 727 int get hashCode {
680 int hash = 0; 728 int hash = 0;
681 hash = JenkinsSmiHash.combine(hash, file.hashCode); 729 hash = JenkinsSmiHash.combine(hash, file.hashCode);
682 hash = JenkinsSmiHash.combine(hash, errors.hashCode); 730 hash = JenkinsSmiHash.combine(hash, errors.hashCode);
683 return JenkinsSmiHash.finish(hash); 731 return JenkinsSmiHash.finish(hash);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 void set regions(List<FoldingRegion> value) { 771 void set regions(List<FoldingRegion> value) {
724 assert(value != null); 772 assert(value != null);
725 this._regions = value; 773 this._regions = value;
726 } 774 }
727 775
728 AnalysisFoldingParams(String file, List<FoldingRegion> regions) { 776 AnalysisFoldingParams(String file, List<FoldingRegion> regions) {
729 this.file = file; 777 this.file = file;
730 this.regions = regions; 778 this.regions = regions;
731 } 779 }
732 780
733 factory AnalysisFoldingParams.fromJson(JsonDecoder jsonDecoder, String jsonPat h, Object json) { 781 factory AnalysisFoldingParams.fromJson(
782 JsonDecoder jsonDecoder, String jsonPath, Object json) {
734 if (json == null) { 783 if (json == null) {
735 json = {}; 784 json = {};
736 } 785 }
737 if (json is Map) { 786 if (json is Map) {
738 String file; 787 String file;
739 if (json.containsKey("file")) { 788 if (json.containsKey("file")) {
740 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); 789 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
741 } else { 790 } else {
742 throw jsonDecoder.mismatch(jsonPath, "file"); 791 throw jsonDecoder.mismatch(jsonPath, "file");
743 } 792 }
744 List<FoldingRegion> regions; 793 List<FoldingRegion> regions;
745 if (json.containsKey("regions")) { 794 if (json.containsKey("regions")) {
746 regions = jsonDecoder.decodeList(jsonPath + ".regions", json["regions"], (String jsonPath, Object json) => new FoldingRegion.fromJson(jsonDecoder, jsonP ath, json)); 795 regions = jsonDecoder.decodeList(
796 jsonPath + ".regions",
797 json["regions"],
798 (String jsonPath, Object json) =>
799 new FoldingRegion.fromJson(jsonDecoder, jsonPath, json));
747 } else { 800 } else {
748 throw jsonDecoder.mismatch(jsonPath, "regions"); 801 throw jsonDecoder.mismatch(jsonPath, "regions");
749 } 802 }
750 return new AnalysisFoldingParams(file, regions); 803 return new AnalysisFoldingParams(file, regions);
751 } else { 804 } else {
752 throw jsonDecoder.mismatch(jsonPath, "analysis.folding params", json); 805 throw jsonDecoder.mismatch(jsonPath, "analysis.folding params", json);
753 } 806 }
754 } 807 }
755 808
756 factory AnalysisFoldingParams.fromNotification(Notification notification) { 809 factory AnalysisFoldingParams.fromNotification(Notification notification) {
757 return new AnalysisFoldingParams.fromJson( 810 return new AnalysisFoldingParams.fromJson(
758 new ResponseDecoder(null), "params", notification.params); 811 new ResponseDecoder(null), "params", notification.params);
759 } 812 }
760 813
761 @override 814 @override
762 Map<String, dynamic> toJson() { 815 Map<String, dynamic> toJson() {
763 Map<String, dynamic> result = {}; 816 Map<String, dynamic> result = {};
764 result["file"] = file; 817 result["file"] = file;
765 result["regions"] = regions.map((FoldingRegion value) => value.toJson()).toL ist(); 818 result["regions"] =
819 regions.map((FoldingRegion value) => value.toJson()).toList();
766 return result; 820 return result;
767 } 821 }
768 822
769 Notification toNotification() { 823 Notification toNotification() {
770 return new Notification("analysis.folding", toJson()); 824 return new Notification("analysis.folding", toJson());
771 } 825 }
772 826
773 @override 827 @override
774 String toString() => JSON.encode(toJson()); 828 String toString() => JSON.encode(toJson());
775 829
776 @override 830 @override
777 bool operator==(other) { 831 bool operator ==(other) {
778 if (other is AnalysisFoldingParams) { 832 if (other is AnalysisFoldingParams) {
779 return file == other.file && 833 return file == other.file &&
780 listEqual(regions, other.regions, (FoldingRegion a, FoldingRegion b) = > a == b); 834 listEqual(regions, other.regions,
835 (FoldingRegion a, FoldingRegion b) => a == b);
781 } 836 }
782 return false; 837 return false;
783 } 838 }
784 839
785 @override 840 @override
786 int get hashCode { 841 int get hashCode {
787 int hash = 0; 842 int hash = 0;
788 hash = JenkinsSmiHash.combine(hash, file.hashCode); 843 hash = JenkinsSmiHash.combine(hash, file.hashCode);
789 hash = JenkinsSmiHash.combine(hash, regions.hashCode); 844 hash = JenkinsSmiHash.combine(hash, regions.hashCode);
790 return JenkinsSmiHash.finish(hash); 845 return JenkinsSmiHash.finish(hash);
(...skipping 22 matching lines...) Expand all
813 */ 868 */
814 void set events(List<WatchEvent> value) { 869 void set events(List<WatchEvent> value) {
815 assert(value != null); 870 assert(value != null);
816 this._events = value; 871 this._events = value;
817 } 872 }
818 873
819 AnalysisHandleWatchEventsParams(List<WatchEvent> events) { 874 AnalysisHandleWatchEventsParams(List<WatchEvent> events) {
820 this.events = events; 875 this.events = events;
821 } 876 }
822 877
823 factory AnalysisHandleWatchEventsParams.fromJson(JsonDecoder jsonDecoder, Stri ng jsonPath, Object json) { 878 factory AnalysisHandleWatchEventsParams.fromJson(
879 JsonDecoder jsonDecoder, String jsonPath, Object json) {
824 if (json == null) { 880 if (json == null) {
825 json = {}; 881 json = {};
826 } 882 }
827 if (json is Map) { 883 if (json is Map) {
828 List<WatchEvent> events; 884 List<WatchEvent> events;
829 if (json.containsKey("events")) { 885 if (json.containsKey("events")) {
830 events = jsonDecoder.decodeList(jsonPath + ".events", json["events"], (S tring jsonPath, Object json) => new WatchEvent.fromJson(jsonDecoder, jsonPath, j son)); 886 events = jsonDecoder.decodeList(
887 jsonPath + ".events",
888 json["events"],
889 (String jsonPath, Object json) =>
890 new WatchEvent.fromJson(jsonDecoder, jsonPath, json));
831 } else { 891 } else {
832 throw jsonDecoder.mismatch(jsonPath, "events"); 892 throw jsonDecoder.mismatch(jsonPath, "events");
833 } 893 }
834 return new AnalysisHandleWatchEventsParams(events); 894 return new AnalysisHandleWatchEventsParams(events);
835 } else { 895 } else {
836 throw jsonDecoder.mismatch(jsonPath, "analysis.handleWatchEvents params", json); 896 throw jsonDecoder.mismatch(
897 jsonPath, "analysis.handleWatchEvents params", json);
837 } 898 }
838 } 899 }
839 900
840 factory AnalysisHandleWatchEventsParams.fromRequest(Request request) { 901 factory AnalysisHandleWatchEventsParams.fromRequest(Request request) {
841 return new AnalysisHandleWatchEventsParams.fromJson( 902 return new AnalysisHandleWatchEventsParams.fromJson(
842 new RequestDecoder(request), "params", request.params); 903 new RequestDecoder(request), "params", request.params);
843 } 904 }
844 905
845 @override 906 @override
846 Map<String, dynamic> toJson() { 907 Map<String, dynamic> toJson() {
847 Map<String, dynamic> result = {}; 908 Map<String, dynamic> result = {};
848 result["events"] = events.map((WatchEvent value) => value.toJson()).toList() ; 909 result["events"] =
910 events.map((WatchEvent value) => value.toJson()).toList();
849 return result; 911 return result;
850 } 912 }
851 913
852 @override 914 @override
853 Request toRequest(String id) { 915 Request toRequest(String id) {
854 return new Request(id, "analysis.handleWatchEvents", toJson()); 916 return new Request(id, "analysis.handleWatchEvents", toJson());
855 } 917 }
856 918
857 @override 919 @override
858 String toString() => JSON.encode(toJson()); 920 String toString() => JSON.encode(toJson());
859 921
860 @override 922 @override
861 bool operator==(other) { 923 bool operator ==(other) {
862 if (other is AnalysisHandleWatchEventsParams) { 924 if (other is AnalysisHandleWatchEventsParams) {
863 return listEqual(events, other.events, (WatchEvent a, WatchEvent b) => a = = b); 925 return listEqual(
926 events, other.events, (WatchEvent a, WatchEvent b) => a == b);
864 } 927 }
865 return false; 928 return false;
866 } 929 }
867 930
868 @override 931 @override
869 int get hashCode { 932 int get hashCode {
870 int hash = 0; 933 int hash = 0;
871 hash = JenkinsSmiHash.combine(hash, events.hashCode); 934 hash = JenkinsSmiHash.combine(hash, events.hashCode);
872 return JenkinsSmiHash.finish(hash); 935 return JenkinsSmiHash.finish(hash);
873 } 936 }
874 } 937 }
875 938
876 /** 939 /**
877 * analysis.handleWatchEvents result 940 * analysis.handleWatchEvents result
878 * 941 *
879 * Clients may not extend, implement or mix-in this class. 942 * Clients may not extend, implement or mix-in this class.
880 */ 943 */
881 class AnalysisHandleWatchEventsResult implements ResponseResult { 944 class AnalysisHandleWatchEventsResult implements ResponseResult {
882 @override 945 @override
883 Map<String, dynamic> toJson() => <String, dynamic>{}; 946 Map<String, dynamic> toJson() => <String, dynamic>{};
884 947
885 @override 948 @override
886 Response toResponse(String id) { 949 Response toResponse(String id) {
887 return new Response(id, result: null); 950 return new Response(id, result: null);
888 } 951 }
889 952
890 @override 953 @override
891 bool operator==(other) { 954 bool operator ==(other) {
892 if (other is AnalysisHandleWatchEventsResult) { 955 if (other is AnalysisHandleWatchEventsResult) {
893 return true; 956 return true;
894 } 957 }
895 return false; 958 return false;
896 } 959 }
897 960
898 @override 961 @override
899 int get hashCode { 962 int get hashCode {
900 return 779767607; 963 return 779767607;
901 } 964 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 void set regions(List<HighlightRegion> value) { 1003 void set regions(List<HighlightRegion> value) {
941 assert(value != null); 1004 assert(value != null);
942 this._regions = value; 1005 this._regions = value;
943 } 1006 }
944 1007
945 AnalysisHighlightsParams(String file, List<HighlightRegion> regions) { 1008 AnalysisHighlightsParams(String file, List<HighlightRegion> regions) {
946 this.file = file; 1009 this.file = file;
947 this.regions = regions; 1010 this.regions = regions;
948 } 1011 }
949 1012
950 factory AnalysisHighlightsParams.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) { 1013 factory AnalysisHighlightsParams.fromJson(
1014 JsonDecoder jsonDecoder, String jsonPath, Object json) {
951 if (json == null) { 1015 if (json == null) {
952 json = {}; 1016 json = {};
953 } 1017 }
954 if (json is Map) { 1018 if (json is Map) {
955 String file; 1019 String file;
956 if (json.containsKey("file")) { 1020 if (json.containsKey("file")) {
957 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); 1021 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
958 } else { 1022 } else {
959 throw jsonDecoder.mismatch(jsonPath, "file"); 1023 throw jsonDecoder.mismatch(jsonPath, "file");
960 } 1024 }
961 List<HighlightRegion> regions; 1025 List<HighlightRegion> regions;
962 if (json.containsKey("regions")) { 1026 if (json.containsKey("regions")) {
963 regions = jsonDecoder.decodeList(jsonPath + ".regions", json["regions"], (String jsonPath, Object json) => new HighlightRegion.fromJson(jsonDecoder, jso nPath, json)); 1027 regions = jsonDecoder.decodeList(
1028 jsonPath + ".regions",
1029 json["regions"],
1030 (String jsonPath, Object json) =>
1031 new HighlightRegion.fromJson(jsonDecoder, jsonPath, json));
964 } else { 1032 } else {
965 throw jsonDecoder.mismatch(jsonPath, "regions"); 1033 throw jsonDecoder.mismatch(jsonPath, "regions");
966 } 1034 }
967 return new AnalysisHighlightsParams(file, regions); 1035 return new AnalysisHighlightsParams(file, regions);
968 } else { 1036 } else {
969 throw jsonDecoder.mismatch(jsonPath, "analysis.highlights params", json); 1037 throw jsonDecoder.mismatch(jsonPath, "analysis.highlights params", json);
970 } 1038 }
971 } 1039 }
972 1040
973 factory AnalysisHighlightsParams.fromNotification(Notification notification) { 1041 factory AnalysisHighlightsParams.fromNotification(Notification notification) {
974 return new AnalysisHighlightsParams.fromJson( 1042 return new AnalysisHighlightsParams.fromJson(
975 new ResponseDecoder(null), "params", notification.params); 1043 new ResponseDecoder(null), "params", notification.params);
976 } 1044 }
977 1045
978 @override 1046 @override
979 Map<String, dynamic> toJson() { 1047 Map<String, dynamic> toJson() {
980 Map<String, dynamic> result = {}; 1048 Map<String, dynamic> result = {};
981 result["file"] = file; 1049 result["file"] = file;
982 result["regions"] = regions.map((HighlightRegion value) => value.toJson()).t oList(); 1050 result["regions"] =
1051 regions.map((HighlightRegion value) => value.toJson()).toList();
983 return result; 1052 return result;
984 } 1053 }
985 1054
986 Notification toNotification() { 1055 Notification toNotification() {
987 return new Notification("analysis.highlights", toJson()); 1056 return new Notification("analysis.highlights", toJson());
988 } 1057 }
989 1058
990 @override 1059 @override
991 String toString() => JSON.encode(toJson()); 1060 String toString() => JSON.encode(toJson());
992 1061
993 @override 1062 @override
994 bool operator==(other) { 1063 bool operator ==(other) {
995 if (other is AnalysisHighlightsParams) { 1064 if (other is AnalysisHighlightsParams) {
996 return file == other.file && 1065 return file == other.file &&
997 listEqual(regions, other.regions, (HighlightRegion a, HighlightRegion b) => a == b); 1066 listEqual(regions, other.regions,
1067 (HighlightRegion a, HighlightRegion b) => a == b);
998 } 1068 }
999 return false; 1069 return false;
1000 } 1070 }
1001 1071
1002 @override 1072 @override
1003 int get hashCode { 1073 int get hashCode {
1004 int hash = 0; 1074 int hash = 0;
1005 hash = JenkinsSmiHash.combine(hash, file.hashCode); 1075 hash = JenkinsSmiHash.combine(hash, file.hashCode);
1006 hash = JenkinsSmiHash.combine(hash, regions.hashCode); 1076 hash = JenkinsSmiHash.combine(hash, regions.hashCode);
1007 return JenkinsSmiHash.finish(hash); 1077 return JenkinsSmiHash.finish(hash);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 1148
1079 /** 1149 /**
1080 * The files containing navigation targets referenced in the file. They are 1150 * The files containing navigation targets referenced in the file. They are
1081 * referenced by NavigationTargets by their index in this array. 1151 * referenced by NavigationTargets by their index in this array.
1082 */ 1152 */
1083 void set files(List<String> value) { 1153 void set files(List<String> value) {
1084 assert(value != null); 1154 assert(value != null);
1085 this._files = value; 1155 this._files = value;
1086 } 1156 }
1087 1157
1088 AnalysisNavigationParams(String file, List<NavigationRegion> regions, List<Nav igationTarget> targets, List<String> files) { 1158 AnalysisNavigationParams(String file, List<NavigationRegion> regions,
1159 List<NavigationTarget> targets, List<String> files) {
1089 this.file = file; 1160 this.file = file;
1090 this.regions = regions; 1161 this.regions = regions;
1091 this.targets = targets; 1162 this.targets = targets;
1092 this.files = files; 1163 this.files = files;
1093 } 1164 }
1094 1165
1095 factory AnalysisNavigationParams.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) { 1166 factory AnalysisNavigationParams.fromJson(
1167 JsonDecoder jsonDecoder, String jsonPath, Object json) {
1096 if (json == null) { 1168 if (json == null) {
1097 json = {}; 1169 json = {};
1098 } 1170 }
1099 if (json is Map) { 1171 if (json is Map) {
1100 String file; 1172 String file;
1101 if (json.containsKey("file")) { 1173 if (json.containsKey("file")) {
1102 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); 1174 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
1103 } else { 1175 } else {
1104 throw jsonDecoder.mismatch(jsonPath, "file"); 1176 throw jsonDecoder.mismatch(jsonPath, "file");
1105 } 1177 }
1106 List<NavigationRegion> regions; 1178 List<NavigationRegion> regions;
1107 if (json.containsKey("regions")) { 1179 if (json.containsKey("regions")) {
1108 regions = jsonDecoder.decodeList(jsonPath + ".regions", json["regions"], (String jsonPath, Object json) => new NavigationRegion.fromJson(jsonDecoder, js onPath, json)); 1180 regions = jsonDecoder.decodeList(
1181 jsonPath + ".regions",
1182 json["regions"],
1183 (String jsonPath, Object json) =>
1184 new NavigationRegion.fromJson(jsonDecoder, jsonPath, json));
1109 } else { 1185 } else {
1110 throw jsonDecoder.mismatch(jsonPath, "regions"); 1186 throw jsonDecoder.mismatch(jsonPath, "regions");
1111 } 1187 }
1112 List<NavigationTarget> targets; 1188 List<NavigationTarget> targets;
1113 if (json.containsKey("targets")) { 1189 if (json.containsKey("targets")) {
1114 targets = jsonDecoder.decodeList(jsonPath + ".targets", json["targets"], (String jsonPath, Object json) => new NavigationTarget.fromJson(jsonDecoder, js onPath, json)); 1190 targets = jsonDecoder.decodeList(
1191 jsonPath + ".targets",
1192 json["targets"],
1193 (String jsonPath, Object json) =>
1194 new NavigationTarget.fromJson(jsonDecoder, jsonPath, json));
1115 } else { 1195 } else {
1116 throw jsonDecoder.mismatch(jsonPath, "targets"); 1196 throw jsonDecoder.mismatch(jsonPath, "targets");
1117 } 1197 }
1118 List<String> files; 1198 List<String> files;
1119 if (json.containsKey("files")) { 1199 if (json.containsKey("files")) {
1120 files = jsonDecoder.decodeList(jsonPath + ".files", json["files"], jsonD ecoder.decodeString); 1200 files = jsonDecoder.decodeList(
1201 jsonPath + ".files", json["files"], jsonDecoder.decodeString);
1121 } else { 1202 } else {
1122 throw jsonDecoder.mismatch(jsonPath, "files"); 1203 throw jsonDecoder.mismatch(jsonPath, "files");
1123 } 1204 }
1124 return new AnalysisNavigationParams(file, regions, targets, files); 1205 return new AnalysisNavigationParams(file, regions, targets, files);
1125 } else { 1206 } else {
1126 throw jsonDecoder.mismatch(jsonPath, "analysis.navigation params", json); 1207 throw jsonDecoder.mismatch(jsonPath, "analysis.navigation params", json);
1127 } 1208 }
1128 } 1209 }
1129 1210
1130 factory AnalysisNavigationParams.fromNotification(Notification notification) { 1211 factory AnalysisNavigationParams.fromNotification(Notification notification) {
1131 return new AnalysisNavigationParams.fromJson( 1212 return new AnalysisNavigationParams.fromJson(
1132 new ResponseDecoder(null), "params", notification.params); 1213 new ResponseDecoder(null), "params", notification.params);
1133 } 1214 }
1134 1215
1135 @override 1216 @override
1136 Map<String, dynamic> toJson() { 1217 Map<String, dynamic> toJson() {
1137 Map<String, dynamic> result = {}; 1218 Map<String, dynamic> result = {};
1138 result["file"] = file; 1219 result["file"] = file;
1139 result["regions"] = regions.map((NavigationRegion value) => value.toJson()). toList(); 1220 result["regions"] =
1140 result["targets"] = targets.map((NavigationTarget value) => value.toJson()). toList(); 1221 regions.map((NavigationRegion value) => value.toJson()).toList();
1222 result["targets"] =
1223 targets.map((NavigationTarget value) => value.toJson()).toList();
1141 result["files"] = files; 1224 result["files"] = files;
1142 return result; 1225 return result;
1143 } 1226 }
1144 1227
1145 Notification toNotification() { 1228 Notification toNotification() {
1146 return new Notification("analysis.navigation", toJson()); 1229 return new Notification("analysis.navigation", toJson());
1147 } 1230 }
1148 1231
1149 @override 1232 @override
1150 String toString() => JSON.encode(toJson()); 1233 String toString() => JSON.encode(toJson());
1151 1234
1152 @override 1235 @override
1153 bool operator==(other) { 1236 bool operator ==(other) {
1154 if (other is AnalysisNavigationParams) { 1237 if (other is AnalysisNavigationParams) {
1155 return file == other.file && 1238 return file == other.file &&
1156 listEqual(regions, other.regions, (NavigationRegion a, NavigationRegio n b) => a == b) && 1239 listEqual(regions, other.regions,
1157 listEqual(targets, other.targets, (NavigationTarget a, NavigationTarge t b) => a == b) && 1240 (NavigationRegion a, NavigationRegion b) => a == b) &&
1241 listEqual(targets, other.targets,
1242 (NavigationTarget a, NavigationTarget b) => a == b) &&
1158 listEqual(files, other.files, (String a, String b) => a == b); 1243 listEqual(files, other.files, (String a, String b) => a == b);
1159 } 1244 }
1160 return false; 1245 return false;
1161 } 1246 }
1162 1247
1163 @override 1248 @override
1164 int get hashCode { 1249 int get hashCode {
1165 int hash = 0; 1250 int hash = 0;
1166 hash = JenkinsSmiHash.combine(hash, file.hashCode); 1251 hash = JenkinsSmiHash.combine(hash, file.hashCode);
1167 hash = JenkinsSmiHash.combine(hash, regions.hashCode); 1252 hash = JenkinsSmiHash.combine(hash, regions.hashCode);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 void set occurrences(List<Occurrences> value) { 1295 void set occurrences(List<Occurrences> value) {
1211 assert(value != null); 1296 assert(value != null);
1212 this._occurrences = value; 1297 this._occurrences = value;
1213 } 1298 }
1214 1299
1215 AnalysisOccurrencesParams(String file, List<Occurrences> occurrences) { 1300 AnalysisOccurrencesParams(String file, List<Occurrences> occurrences) {
1216 this.file = file; 1301 this.file = file;
1217 this.occurrences = occurrences; 1302 this.occurrences = occurrences;
1218 } 1303 }
1219 1304
1220 factory AnalysisOccurrencesParams.fromJson(JsonDecoder jsonDecoder, String jso nPath, Object json) { 1305 factory AnalysisOccurrencesParams.fromJson(
1306 JsonDecoder jsonDecoder, String jsonPath, Object json) {
1221 if (json == null) { 1307 if (json == null) {
1222 json = {}; 1308 json = {};
1223 } 1309 }
1224 if (json is Map) { 1310 if (json is Map) {
1225 String file; 1311 String file;
1226 if (json.containsKey("file")) { 1312 if (json.containsKey("file")) {
1227 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); 1313 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
1228 } else { 1314 } else {
1229 throw jsonDecoder.mismatch(jsonPath, "file"); 1315 throw jsonDecoder.mismatch(jsonPath, "file");
1230 } 1316 }
1231 List<Occurrences> occurrences; 1317 List<Occurrences> occurrences;
1232 if (json.containsKey("occurrences")) { 1318 if (json.containsKey("occurrences")) {
1233 occurrences = jsonDecoder.decodeList(jsonPath + ".occurrences", json["oc currences"], (String jsonPath, Object json) => new Occurrences.fromJson(jsonDeco der, jsonPath, json)); 1319 occurrences = jsonDecoder.decodeList(
1320 jsonPath + ".occurrences",
1321 json["occurrences"],
1322 (String jsonPath, Object json) =>
1323 new Occurrences.fromJson(jsonDecoder, jsonPath, json));
1234 } else { 1324 } else {
1235 throw jsonDecoder.mismatch(jsonPath, "occurrences"); 1325 throw jsonDecoder.mismatch(jsonPath, "occurrences");
1236 } 1326 }
1237 return new AnalysisOccurrencesParams(file, occurrences); 1327 return new AnalysisOccurrencesParams(file, occurrences);
1238 } else { 1328 } else {
1239 throw jsonDecoder.mismatch(jsonPath, "analysis.occurrences params", json); 1329 throw jsonDecoder.mismatch(jsonPath, "analysis.occurrences params", json);
1240 } 1330 }
1241 } 1331 }
1242 1332
1243 factory AnalysisOccurrencesParams.fromNotification(Notification notification) { 1333 factory AnalysisOccurrencesParams.fromNotification(
1334 Notification notification) {
1244 return new AnalysisOccurrencesParams.fromJson( 1335 return new AnalysisOccurrencesParams.fromJson(
1245 new ResponseDecoder(null), "params", notification.params); 1336 new ResponseDecoder(null), "params", notification.params);
1246 } 1337 }
1247 1338
1248 @override 1339 @override
1249 Map<String, dynamic> toJson() { 1340 Map<String, dynamic> toJson() {
1250 Map<String, dynamic> result = {}; 1341 Map<String, dynamic> result = {};
1251 result["file"] = file; 1342 result["file"] = file;
1252 result["occurrences"] = occurrences.map((Occurrences value) => value.toJson( )).toList(); 1343 result["occurrences"] =
1344 occurrences.map((Occurrences value) => value.toJson()).toList();
1253 return result; 1345 return result;
1254 } 1346 }
1255 1347
1256 Notification toNotification() { 1348 Notification toNotification() {
1257 return new Notification("analysis.occurrences", toJson()); 1349 return new Notification("analysis.occurrences", toJson());
1258 } 1350 }
1259 1351
1260 @override 1352 @override
1261 String toString() => JSON.encode(toJson()); 1353 String toString() => JSON.encode(toJson());
1262 1354
1263 @override 1355 @override
1264 bool operator==(other) { 1356 bool operator ==(other) {
1265 if (other is AnalysisOccurrencesParams) { 1357 if (other is AnalysisOccurrencesParams) {
1266 return file == other.file && 1358 return file == other.file &&
1267 listEqual(occurrences, other.occurrences, (Occurrences a, Occurrences b) => a == b); 1359 listEqual(occurrences, other.occurrences,
1360 (Occurrences a, Occurrences b) => a == b);
1268 } 1361 }
1269 return false; 1362 return false;
1270 } 1363 }
1271 1364
1272 @override 1365 @override
1273 int get hashCode { 1366 int get hashCode {
1274 int hash = 0; 1367 int hash = 0;
1275 hash = JenkinsSmiHash.combine(hash, file.hashCode); 1368 hash = JenkinsSmiHash.combine(hash, file.hashCode);
1276 hash = JenkinsSmiHash.combine(hash, occurrences.hashCode); 1369 hash = JenkinsSmiHash.combine(hash, occurrences.hashCode);
1277 return JenkinsSmiHash.finish(hash); 1370 return JenkinsSmiHash.finish(hash);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 void set outline(List<Outline> value) { 1410 void set outline(List<Outline> value) {
1318 assert(value != null); 1411 assert(value != null);
1319 this._outline = value; 1412 this._outline = value;
1320 } 1413 }
1321 1414
1322 AnalysisOutlineParams(String file, List<Outline> outline) { 1415 AnalysisOutlineParams(String file, List<Outline> outline) {
1323 this.file = file; 1416 this.file = file;
1324 this.outline = outline; 1417 this.outline = outline;
1325 } 1418 }
1326 1419
1327 factory AnalysisOutlineParams.fromJson(JsonDecoder jsonDecoder, String jsonPat h, Object json) { 1420 factory AnalysisOutlineParams.fromJson(
1421 JsonDecoder jsonDecoder, String jsonPath, Object json) {
1328 if (json == null) { 1422 if (json == null) {
1329 json = {}; 1423 json = {};
1330 } 1424 }
1331 if (json is Map) { 1425 if (json is Map) {
1332 String file; 1426 String file;
1333 if (json.containsKey("file")) { 1427 if (json.containsKey("file")) {
1334 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); 1428 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
1335 } else { 1429 } else {
1336 throw jsonDecoder.mismatch(jsonPath, "file"); 1430 throw jsonDecoder.mismatch(jsonPath, "file");
1337 } 1431 }
1338 List<Outline> outline; 1432 List<Outline> outline;
1339 if (json.containsKey("outline")) { 1433 if (json.containsKey("outline")) {
1340 outline = jsonDecoder.decodeList(jsonPath + ".outline", json["outline"], (String jsonPath, Object json) => new Outline.fromJson(jsonDecoder, jsonPath, j son)); 1434 outline = jsonDecoder.decodeList(
1435 jsonPath + ".outline",
1436 json["outline"],
1437 (String jsonPath, Object json) =>
1438 new Outline.fromJson(jsonDecoder, jsonPath, json));
1341 } else { 1439 } else {
1342 throw jsonDecoder.mismatch(jsonPath, "outline"); 1440 throw jsonDecoder.mismatch(jsonPath, "outline");
1343 } 1441 }
1344 return new AnalysisOutlineParams(file, outline); 1442 return new AnalysisOutlineParams(file, outline);
1345 } else { 1443 } else {
1346 throw jsonDecoder.mismatch(jsonPath, "analysis.outline params", json); 1444 throw jsonDecoder.mismatch(jsonPath, "analysis.outline params", json);
1347 } 1445 }
1348 } 1446 }
1349 1447
1350 factory AnalysisOutlineParams.fromNotification(Notification notification) { 1448 factory AnalysisOutlineParams.fromNotification(Notification notification) {
(...skipping 10 matching lines...) Expand all
1361 } 1459 }
1362 1460
1363 Notification toNotification() { 1461 Notification toNotification() {
1364 return new Notification("analysis.outline", toJson()); 1462 return new Notification("analysis.outline", toJson());
1365 } 1463 }
1366 1464
1367 @override 1465 @override
1368 String toString() => JSON.encode(toJson()); 1466 String toString() => JSON.encode(toJson());
1369 1467
1370 @override 1468 @override
1371 bool operator==(other) { 1469 bool operator ==(other) {
1372 if (other is AnalysisOutlineParams) { 1470 if (other is AnalysisOutlineParams) {
1373 return file == other.file && 1471 return file == other.file &&
1374 listEqual(outline, other.outline, (Outline a, Outline b) => a == b); 1472 listEqual(outline, other.outline, (Outline a, Outline b) => a == b);
1375 } 1473 }
1376 return false; 1474 return false;
1377 } 1475 }
1378 1476
1379 @override 1477 @override
1380 int get hashCode { 1478 int get hashCode {
1381 int hash = 0; 1479 int hash = 0;
(...skipping 30 matching lines...) Expand all
1412 * re-analyzed. 1510 * re-analyzed.
1413 */ 1511 */
1414 void set roots(List<String> value) { 1512 void set roots(List<String> value) {
1415 this._roots = value; 1513 this._roots = value;
1416 } 1514 }
1417 1515
1418 AnalysisReanalyzeParams({List<String> roots}) { 1516 AnalysisReanalyzeParams({List<String> roots}) {
1419 this.roots = roots; 1517 this.roots = roots;
1420 } 1518 }
1421 1519
1422 factory AnalysisReanalyzeParams.fromJson(JsonDecoder jsonDecoder, String jsonP ath, Object json) { 1520 factory AnalysisReanalyzeParams.fromJson(
1521 JsonDecoder jsonDecoder, String jsonPath, Object json) {
1423 if (json == null) { 1522 if (json == null) {
1424 json = {}; 1523 json = {};
1425 } 1524 }
1426 if (json is Map) { 1525 if (json is Map) {
1427 List<String> roots; 1526 List<String> roots;
1428 if (json.containsKey("roots")) { 1527 if (json.containsKey("roots")) {
1429 roots = jsonDecoder.decodeList(jsonPath + ".roots", json["roots"], jsonD ecoder.decodeString); 1528 roots = jsonDecoder.decodeList(
1529 jsonPath + ".roots", json["roots"], jsonDecoder.decodeString);
1430 } 1530 }
1431 return new AnalysisReanalyzeParams(roots: roots); 1531 return new AnalysisReanalyzeParams(roots: roots);
1432 } else { 1532 } else {
1433 throw jsonDecoder.mismatch(jsonPath, "analysis.reanalyze params", json); 1533 throw jsonDecoder.mismatch(jsonPath, "analysis.reanalyze params", json);
1434 } 1534 }
1435 } 1535 }
1436 1536
1437 factory AnalysisReanalyzeParams.fromRequest(Request request) { 1537 factory AnalysisReanalyzeParams.fromRequest(Request request) {
1438 return new AnalysisReanalyzeParams.fromJson( 1538 return new AnalysisReanalyzeParams.fromJson(
1439 new RequestDecoder(request), "params", request.params); 1539 new RequestDecoder(request), "params", request.params);
(...skipping 10 matching lines...) Expand all
1450 1550
1451 @override 1551 @override
1452 Request toRequest(String id) { 1552 Request toRequest(String id) {
1453 return new Request(id, "analysis.reanalyze", toJson()); 1553 return new Request(id, "analysis.reanalyze", toJson());
1454 } 1554 }
1455 1555
1456 @override 1556 @override
1457 String toString() => JSON.encode(toJson()); 1557 String toString() => JSON.encode(toJson());
1458 1558
1459 @override 1559 @override
1460 bool operator==(other) { 1560 bool operator ==(other) {
1461 if (other is AnalysisReanalyzeParams) { 1561 if (other is AnalysisReanalyzeParams) {
1462 return listEqual(roots, other.roots, (String a, String b) => a == b); 1562 return listEqual(roots, other.roots, (String a, String b) => a == b);
1463 } 1563 }
1464 return false; 1564 return false;
1465 } 1565 }
1466 1566
1467 @override 1567 @override
1468 int get hashCode { 1568 int get hashCode {
1469 int hash = 0; 1569 int hash = 0;
1470 hash = JenkinsSmiHash.combine(hash, roots.hashCode); 1570 hash = JenkinsSmiHash.combine(hash, roots.hashCode);
1471 return JenkinsSmiHash.finish(hash); 1571 return JenkinsSmiHash.finish(hash);
1472 } 1572 }
1473 } 1573 }
1474 1574
1475 /** 1575 /**
1476 * analysis.reanalyze result 1576 * analysis.reanalyze result
1477 * 1577 *
1478 * Clients may not extend, implement or mix-in this class. 1578 * Clients may not extend, implement or mix-in this class.
1479 */ 1579 */
1480 class AnalysisReanalyzeResult implements ResponseResult { 1580 class AnalysisReanalyzeResult implements ResponseResult {
1481 @override 1581 @override
1482 Map<String, dynamic> toJson() => <String, dynamic>{}; 1582 Map<String, dynamic> toJson() => <String, dynamic>{};
1483 1583
1484 @override 1584 @override
1485 Response toResponse(String id) { 1585 Response toResponse(String id) {
1486 return new Response(id, result: null); 1586 return new Response(id, result: null);
1487 } 1587 }
1488 1588
1489 @override 1589 @override
1490 bool operator==(other) { 1590 bool operator ==(other) {
1491 if (other is AnalysisReanalyzeResult) { 1591 if (other is AnalysisReanalyzeResult) {
1492 return true; 1592 return true;
1493 } 1593 }
1494 return false; 1594 return false;
1495 } 1595 }
1496 1596
1497 @override 1597 @override
1498 int get hashCode { 1598 int get hashCode {
1499 return 846803925; 1599 return 846803925;
1500 } 1600 }
1501 } 1601 }
1502 1602
1503 /** 1603 /**
1504 * AnalysisService 1604 * AnalysisService
1505 * 1605 *
1506 * enum { 1606 * enum {
1507 * FOLDING 1607 * FOLDING
1508 * HIGHLIGHTS 1608 * HIGHLIGHTS
1509 * NAVIGATION 1609 * NAVIGATION
1510 * OCCURRENCES 1610 * OCCURRENCES
1511 * OUTLINE 1611 * OUTLINE
1512 * } 1612 * }
1513 * 1613 *
1514 * Clients may not extend, implement or mix-in this class. 1614 * Clients may not extend, implement or mix-in this class.
1515 */ 1615 */
1516 class AnalysisService implements Enum { 1616 class AnalysisService implements Enum {
1517 static const AnalysisService FOLDING = const AnalysisService._("FOLDING"); 1617 static const AnalysisService FOLDING = const AnalysisService._("FOLDING");
1518 1618
1519 static const AnalysisService HIGHLIGHTS = const AnalysisService._("HIGHLIGHTS" ); 1619 static const AnalysisService HIGHLIGHTS =
1620 const AnalysisService._("HIGHLIGHTS");
1520 1621
1521 static const AnalysisService NAVIGATION = const AnalysisService._("NAVIGATION" ); 1622 static const AnalysisService NAVIGATION =
1623 const AnalysisService._("NAVIGATION");
1522 1624
1523 static const AnalysisService OCCURRENCES = const AnalysisService._("OCCURRENCE S"); 1625 static const AnalysisService OCCURRENCES =
1626 const AnalysisService._("OCCURRENCES");
1524 1627
1525 static const AnalysisService OUTLINE = const AnalysisService._("OUTLINE"); 1628 static const AnalysisService OUTLINE = const AnalysisService._("OUTLINE");
1526 1629
1527 /** 1630 /**
1528 * A list containing all of the enum values that are defined. 1631 * A list containing all of the enum values that are defined.
1529 */ 1632 */
1530 static const List<AnalysisService> VALUES = const <AnalysisService>[FOLDING, H IGHLIGHTS, NAVIGATION, OCCURRENCES, OUTLINE]; 1633 static const List<AnalysisService> VALUES = const <AnalysisService>[
1634 FOLDING,
1635 HIGHLIGHTS,
1636 NAVIGATION,
1637 OCCURRENCES,
1638 OUTLINE
1639 ];
1531 1640
1532 @override 1641 @override
1533 final String name; 1642 final String name;
1534 1643
1535 const AnalysisService._(this.name); 1644 const AnalysisService._(this.name);
1536 1645
1537 factory AnalysisService(String name) { 1646 factory AnalysisService(String name) {
1538 switch (name) { 1647 switch (name) {
1539 case "FOLDING": 1648 case "FOLDING":
1540 return FOLDING; 1649 return FOLDING;
1541 case "HIGHLIGHTS": 1650 case "HIGHLIGHTS":
1542 return HIGHLIGHTS; 1651 return HIGHLIGHTS;
1543 case "NAVIGATION": 1652 case "NAVIGATION":
1544 return NAVIGATION; 1653 return NAVIGATION;
1545 case "OCCURRENCES": 1654 case "OCCURRENCES":
1546 return OCCURRENCES; 1655 return OCCURRENCES;
1547 case "OUTLINE": 1656 case "OUTLINE":
1548 return OUTLINE; 1657 return OUTLINE;
1549 } 1658 }
1550 throw new Exception('Illegal enum value: $name'); 1659 throw new Exception('Illegal enum value: $name');
1551 } 1660 }
1552 1661
1553 factory AnalysisService.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obj ect json) { 1662 factory AnalysisService.fromJson(
1663 JsonDecoder jsonDecoder, String jsonPath, Object json) {
1554 if (json is String) { 1664 if (json is String) {
1555 try { 1665 try {
1556 return new AnalysisService(json); 1666 return new AnalysisService(json);
1557 } catch(_) { 1667 } catch (_) {
1558 // Fall through 1668 // Fall through
1559 } 1669 }
1560 } 1670 }
1561 throw jsonDecoder.mismatch(jsonPath, "AnalysisService", json); 1671 throw jsonDecoder.mismatch(jsonPath, "AnalysisService", json);
1562 } 1672 }
1563 1673
1564 @override 1674 @override
1565 String toString() => "AnalysisService.$name"; 1675 String toString() => "AnalysisService.$name";
1566 1676
1567 String toJson() => name; 1677 String toJson() => name;
(...skipping 21 matching lines...) Expand all
1589 */ 1699 */
1590 void set options(ContextBuilderOptions value) { 1700 void set options(ContextBuilderOptions value) {
1591 assert(value != null); 1701 assert(value != null);
1592 this._options = value; 1702 this._options = value;
1593 } 1703 }
1594 1704
1595 AnalysisSetContextBuilderOptionsParams(ContextBuilderOptions options) { 1705 AnalysisSetContextBuilderOptionsParams(ContextBuilderOptions options) {
1596 this.options = options; 1706 this.options = options;
1597 } 1707 }
1598 1708
1599 factory AnalysisSetContextBuilderOptionsParams.fromJson(JsonDecoder jsonDecode r, String jsonPath, Object json) { 1709 factory AnalysisSetContextBuilderOptionsParams.fromJson(
1710 JsonDecoder jsonDecoder, String jsonPath, Object json) {
1600 if (json == null) { 1711 if (json == null) {
1601 json = {}; 1712 json = {};
1602 } 1713 }
1603 if (json is Map) { 1714 if (json is Map) {
1604 ContextBuilderOptions options; 1715 ContextBuilderOptions options;
1605 if (json.containsKey("options")) { 1716 if (json.containsKey("options")) {
1606 options = new ContextBuilderOptions.fromJson(jsonDecoder, jsonPath + ".o ptions", json["options"]); 1717 options = new ContextBuilderOptions.fromJson(
1718 jsonDecoder, jsonPath + ".options", json["options"]);
1607 } else { 1719 } else {
1608 throw jsonDecoder.mismatch(jsonPath, "options"); 1720 throw jsonDecoder.mismatch(jsonPath, "options");
1609 } 1721 }
1610 return new AnalysisSetContextBuilderOptionsParams(options); 1722 return new AnalysisSetContextBuilderOptionsParams(options);
1611 } else { 1723 } else {
1612 throw jsonDecoder.mismatch(jsonPath, "analysis.setContextBuilderOptions pa rams", json); 1724 throw jsonDecoder.mismatch(
1725 jsonPath, "analysis.setContextBuilderOptions params", json);
1613 } 1726 }
1614 } 1727 }
1615 1728
1616 factory AnalysisSetContextBuilderOptionsParams.fromRequest(Request request) { 1729 factory AnalysisSetContextBuilderOptionsParams.fromRequest(Request request) {
1617 return new AnalysisSetContextBuilderOptionsParams.fromJson( 1730 return new AnalysisSetContextBuilderOptionsParams.fromJson(
1618 new RequestDecoder(request), "params", request.params); 1731 new RequestDecoder(request), "params", request.params);
1619 } 1732 }
1620 1733
1621 @override 1734 @override
1622 Map<String, dynamic> toJson() { 1735 Map<String, dynamic> toJson() {
1623 Map<String, dynamic> result = {}; 1736 Map<String, dynamic> result = {};
1624 result["options"] = options.toJson(); 1737 result["options"] = options.toJson();
1625 return result; 1738 return result;
1626 } 1739 }
1627 1740
1628 @override 1741 @override
1629 Request toRequest(String id) { 1742 Request toRequest(String id) {
1630 return new Request(id, "analysis.setContextBuilderOptions", toJson()); 1743 return new Request(id, "analysis.setContextBuilderOptions", toJson());
1631 } 1744 }
1632 1745
1633 @override 1746 @override
1634 String toString() => JSON.encode(toJson()); 1747 String toString() => JSON.encode(toJson());
1635 1748
1636 @override 1749 @override
1637 bool operator==(other) { 1750 bool operator ==(other) {
1638 if (other is AnalysisSetContextBuilderOptionsParams) { 1751 if (other is AnalysisSetContextBuilderOptionsParams) {
1639 return options == other.options; 1752 return options == other.options;
1640 } 1753 }
1641 return false; 1754 return false;
1642 } 1755 }
1643 1756
1644 @override 1757 @override
1645 int get hashCode { 1758 int get hashCode {
1646 int hash = 0; 1759 int hash = 0;
1647 hash = JenkinsSmiHash.combine(hash, options.hashCode); 1760 hash = JenkinsSmiHash.combine(hash, options.hashCode);
1648 return JenkinsSmiHash.finish(hash); 1761 return JenkinsSmiHash.finish(hash);
1649 } 1762 }
1650 } 1763 }
1651 1764
1652 /** 1765 /**
1653 * analysis.setContextBuilderOptions result 1766 * analysis.setContextBuilderOptions result
1654 * 1767 *
1655 * Clients may not extend, implement or mix-in this class. 1768 * Clients may not extend, implement or mix-in this class.
1656 */ 1769 */
1657 class AnalysisSetContextBuilderOptionsResult implements ResponseResult { 1770 class AnalysisSetContextBuilderOptionsResult implements ResponseResult {
1658 @override 1771 @override
1659 Map<String, dynamic> toJson() => <String, dynamic>{}; 1772 Map<String, dynamic> toJson() => <String, dynamic>{};
1660 1773
1661 @override 1774 @override
1662 Response toResponse(String id) { 1775 Response toResponse(String id) {
1663 return new Response(id, result: null); 1776 return new Response(id, result: null);
1664 } 1777 }
1665 1778
1666 @override 1779 @override
1667 bool operator==(other) { 1780 bool operator ==(other) {
1668 if (other is AnalysisSetContextBuilderOptionsResult) { 1781 if (other is AnalysisSetContextBuilderOptionsResult) {
1669 return true; 1782 return true;
1670 } 1783 }
1671 return false; 1784 return false;
1672 } 1785 }
1673 1786
1674 @override 1787 @override
1675 int get hashCode { 1788 int get hashCode {
1676 return 645412314; 1789 return 645412314;
1677 } 1790 }
(...skipping 21 matching lines...) Expand all
1699 */ 1812 */
1700 void set roots(List<ContextRoot> value) { 1813 void set roots(List<ContextRoot> value) {
1701 assert(value != null); 1814 assert(value != null);
1702 this._roots = value; 1815 this._roots = value;
1703 } 1816 }
1704 1817
1705 AnalysisSetContextRootsParams(List<ContextRoot> roots) { 1818 AnalysisSetContextRootsParams(List<ContextRoot> roots) {
1706 this.roots = roots; 1819 this.roots = roots;
1707 } 1820 }
1708 1821
1709 factory AnalysisSetContextRootsParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 1822 factory AnalysisSetContextRootsParams.fromJson(
1823 JsonDecoder jsonDecoder, String jsonPath, Object json) {
1710 if (json == null) { 1824 if (json == null) {
1711 json = {}; 1825 json = {};
1712 } 1826 }
1713 if (json is Map) { 1827 if (json is Map) {
1714 List<ContextRoot> roots; 1828 List<ContextRoot> roots;
1715 if (json.containsKey("roots")) { 1829 if (json.containsKey("roots")) {
1716 roots = jsonDecoder.decodeList(jsonPath + ".roots", json["roots"], (Stri ng jsonPath, Object json) => new ContextRoot.fromJson(jsonDecoder, jsonPath, jso n)); 1830 roots = jsonDecoder.decodeList(
1831 jsonPath + ".roots",
1832 json["roots"],
1833 (String jsonPath, Object json) =>
1834 new ContextRoot.fromJson(jsonDecoder, jsonPath, json));
1717 } else { 1835 } else {
1718 throw jsonDecoder.mismatch(jsonPath, "roots"); 1836 throw jsonDecoder.mismatch(jsonPath, "roots");
1719 } 1837 }
1720 return new AnalysisSetContextRootsParams(roots); 1838 return new AnalysisSetContextRootsParams(roots);
1721 } else { 1839 } else {
1722 throw jsonDecoder.mismatch(jsonPath, "analysis.setContextRoots params", js on); 1840 throw jsonDecoder.mismatch(
1841 jsonPath, "analysis.setContextRoots params", json);
1723 } 1842 }
1724 } 1843 }
1725 1844
1726 factory AnalysisSetContextRootsParams.fromRequest(Request request) { 1845 factory AnalysisSetContextRootsParams.fromRequest(Request request) {
1727 return new AnalysisSetContextRootsParams.fromJson( 1846 return new AnalysisSetContextRootsParams.fromJson(
1728 new RequestDecoder(request), "params", request.params); 1847 new RequestDecoder(request), "params", request.params);
1729 } 1848 }
1730 1849
1731 @override 1850 @override
1732 Map<String, dynamic> toJson() { 1851 Map<String, dynamic> toJson() {
1733 Map<String, dynamic> result = {}; 1852 Map<String, dynamic> result = {};
1734 result["roots"] = roots.map((ContextRoot value) => value.toJson()).toList(); 1853 result["roots"] = roots.map((ContextRoot value) => value.toJson()).toList();
1735 return result; 1854 return result;
1736 } 1855 }
1737 1856
1738 @override 1857 @override
1739 Request toRequest(String id) { 1858 Request toRequest(String id) {
1740 return new Request(id, "analysis.setContextRoots", toJson()); 1859 return new Request(id, "analysis.setContextRoots", toJson());
1741 } 1860 }
1742 1861
1743 @override 1862 @override
1744 String toString() => JSON.encode(toJson()); 1863 String toString() => JSON.encode(toJson());
1745 1864
1746 @override 1865 @override
1747 bool operator==(other) { 1866 bool operator ==(other) {
1748 if (other is AnalysisSetContextRootsParams) { 1867 if (other is AnalysisSetContextRootsParams) {
1749 return listEqual(roots, other.roots, (ContextRoot a, ContextRoot b) => a = = b); 1868 return listEqual(
1869 roots, other.roots, (ContextRoot a, ContextRoot b) => a == b);
1750 } 1870 }
1751 return false; 1871 return false;
1752 } 1872 }
1753 1873
1754 @override 1874 @override
1755 int get hashCode { 1875 int get hashCode {
1756 int hash = 0; 1876 int hash = 0;
1757 hash = JenkinsSmiHash.combine(hash, roots.hashCode); 1877 hash = JenkinsSmiHash.combine(hash, roots.hashCode);
1758 return JenkinsSmiHash.finish(hash); 1878 return JenkinsSmiHash.finish(hash);
1759 } 1879 }
1760 } 1880 }
1761 1881
1762 /** 1882 /**
1763 * analysis.setContextRoots result 1883 * analysis.setContextRoots result
1764 * 1884 *
1765 * Clients may not extend, implement or mix-in this class. 1885 * Clients may not extend, implement or mix-in this class.
1766 */ 1886 */
1767 class AnalysisSetContextRootsResult implements ResponseResult { 1887 class AnalysisSetContextRootsResult implements ResponseResult {
1768 @override 1888 @override
1769 Map<String, dynamic> toJson() => <String, dynamic>{}; 1889 Map<String, dynamic> toJson() => <String, dynamic>{};
1770 1890
1771 @override 1891 @override
1772 Response toResponse(String id) { 1892 Response toResponse(String id) {
1773 return new Response(id, result: null); 1893 return new Response(id, result: null);
1774 } 1894 }
1775 1895
1776 @override 1896 @override
1777 bool operator==(other) { 1897 bool operator ==(other) {
1778 if (other is AnalysisSetContextRootsResult) { 1898 if (other is AnalysisSetContextRootsResult) {
1779 return true; 1899 return true;
1780 } 1900 }
1781 return false; 1901 return false;
1782 } 1902 }
1783 1903
1784 @override 1904 @override
1785 int get hashCode { 1905 int get hashCode {
1786 return 969645618; 1906 return 969645618;
1787 } 1907 }
(...skipping 21 matching lines...) Expand all
1809 */ 1929 */
1810 void set files(List<String> value) { 1930 void set files(List<String> value) {
1811 assert(value != null); 1931 assert(value != null);
1812 this._files = value; 1932 this._files = value;
1813 } 1933 }
1814 1934
1815 AnalysisSetPriorityFilesParams(List<String> files) { 1935 AnalysisSetPriorityFilesParams(List<String> files) {
1816 this.files = files; 1936 this.files = files;
1817 } 1937 }
1818 1938
1819 factory AnalysisSetPriorityFilesParams.fromJson(JsonDecoder jsonDecoder, Strin g jsonPath, Object json) { 1939 factory AnalysisSetPriorityFilesParams.fromJson(
1940 JsonDecoder jsonDecoder, String jsonPath, Object json) {
1820 if (json == null) { 1941 if (json == null) {
1821 json = {}; 1942 json = {};
1822 } 1943 }
1823 if (json is Map) { 1944 if (json is Map) {
1824 List<String> files; 1945 List<String> files;
1825 if (json.containsKey("files")) { 1946 if (json.containsKey("files")) {
1826 files = jsonDecoder.decodeList(jsonPath + ".files", json["files"], jsonD ecoder.decodeString); 1947 files = jsonDecoder.decodeList(
1948 jsonPath + ".files", json["files"], jsonDecoder.decodeString);
1827 } else { 1949 } else {
1828 throw jsonDecoder.mismatch(jsonPath, "files"); 1950 throw jsonDecoder.mismatch(jsonPath, "files");
1829 } 1951 }
1830 return new AnalysisSetPriorityFilesParams(files); 1952 return new AnalysisSetPriorityFilesParams(files);
1831 } else { 1953 } else {
1832 throw jsonDecoder.mismatch(jsonPath, "analysis.setPriorityFiles params", j son); 1954 throw jsonDecoder.mismatch(
1955 jsonPath, "analysis.setPriorityFiles params", json);
1833 } 1956 }
1834 } 1957 }
1835 1958
1836 factory AnalysisSetPriorityFilesParams.fromRequest(Request request) { 1959 factory AnalysisSetPriorityFilesParams.fromRequest(Request request) {
1837 return new AnalysisSetPriorityFilesParams.fromJson( 1960 return new AnalysisSetPriorityFilesParams.fromJson(
1838 new RequestDecoder(request), "params", request.params); 1961 new RequestDecoder(request), "params", request.params);
1839 } 1962 }
1840 1963
1841 @override 1964 @override
1842 Map<String, dynamic> toJson() { 1965 Map<String, dynamic> toJson() {
1843 Map<String, dynamic> result = {}; 1966 Map<String, dynamic> result = {};
1844 result["files"] = files; 1967 result["files"] = files;
1845 return result; 1968 return result;
1846 } 1969 }
1847 1970
1848 @override 1971 @override
1849 Request toRequest(String id) { 1972 Request toRequest(String id) {
1850 return new Request(id, "analysis.setPriorityFiles", toJson()); 1973 return new Request(id, "analysis.setPriorityFiles", toJson());
1851 } 1974 }
1852 1975
1853 @override 1976 @override
1854 String toString() => JSON.encode(toJson()); 1977 String toString() => JSON.encode(toJson());
1855 1978
1856 @override 1979 @override
1857 bool operator==(other) { 1980 bool operator ==(other) {
1858 if (other is AnalysisSetPriorityFilesParams) { 1981 if (other is AnalysisSetPriorityFilesParams) {
1859 return listEqual(files, other.files, (String a, String b) => a == b); 1982 return listEqual(files, other.files, (String a, String b) => a == b);
1860 } 1983 }
1861 return false; 1984 return false;
1862 } 1985 }
1863 1986
1864 @override 1987 @override
1865 int get hashCode { 1988 int get hashCode {
1866 int hash = 0; 1989 int hash = 0;
1867 hash = JenkinsSmiHash.combine(hash, files.hashCode); 1990 hash = JenkinsSmiHash.combine(hash, files.hashCode);
1868 return JenkinsSmiHash.finish(hash); 1991 return JenkinsSmiHash.finish(hash);
1869 } 1992 }
1870 } 1993 }
1871 1994
1872 /** 1995 /**
1873 * analysis.setPriorityFiles result 1996 * analysis.setPriorityFiles result
1874 * 1997 *
1875 * Clients may not extend, implement or mix-in this class. 1998 * Clients may not extend, implement or mix-in this class.
1876 */ 1999 */
1877 class AnalysisSetPriorityFilesResult implements ResponseResult { 2000 class AnalysisSetPriorityFilesResult implements ResponseResult {
1878 @override 2001 @override
1879 Map<String, dynamic> toJson() => <String, dynamic>{}; 2002 Map<String, dynamic> toJson() => <String, dynamic>{};
1880 2003
1881 @override 2004 @override
1882 Response toResponse(String id) { 2005 Response toResponse(String id) {
1883 return new Response(id, result: null); 2006 return new Response(id, result: null);
1884 } 2007 }
1885 2008
1886 @override 2009 @override
1887 bool operator==(other) { 2010 bool operator ==(other) {
1888 if (other is AnalysisSetPriorityFilesResult) { 2011 if (other is AnalysisSetPriorityFilesResult) {
1889 return true; 2012 return true;
1890 } 2013 }
1891 return false; 2014 return false;
1892 } 2015 }
1893 2016
1894 @override 2017 @override
1895 int get hashCode { 2018 int get hashCode {
1896 return 330050055; 2019 return 330050055;
1897 } 2020 }
(...skipping 19 matching lines...) Expand all
1917 2040
1918 /** 2041 /**
1919 * A table mapping services to a list of the files being subscribed to the 2042 * A table mapping services to a list of the files being subscribed to the
1920 * service. 2043 * service.
1921 */ 2044 */
1922 void set subscriptions(Map<AnalysisService, List<String>> value) { 2045 void set subscriptions(Map<AnalysisService, List<String>> value) {
1923 assert(value != null); 2046 assert(value != null);
1924 this._subscriptions = value; 2047 this._subscriptions = value;
1925 } 2048 }
1926 2049
1927 AnalysisSetSubscriptionsParams(Map<AnalysisService, List<String>> subscription s) { 2050 AnalysisSetSubscriptionsParams(
2051 Map<AnalysisService, List<String>> subscriptions) {
1928 this.subscriptions = subscriptions; 2052 this.subscriptions = subscriptions;
1929 } 2053 }
1930 2054
1931 factory AnalysisSetSubscriptionsParams.fromJson(JsonDecoder jsonDecoder, Strin g jsonPath, Object json) { 2055 factory AnalysisSetSubscriptionsParams.fromJson(
2056 JsonDecoder jsonDecoder, String jsonPath, Object json) {
1932 if (json == null) { 2057 if (json == null) {
1933 json = {}; 2058 json = {};
1934 } 2059 }
1935 if (json is Map) { 2060 if (json is Map) {
1936 Map<AnalysisService, List<String>> subscriptions; 2061 Map<AnalysisService, List<String>> subscriptions;
1937 if (json.containsKey("subscriptions")) { 2062 if (json.containsKey("subscriptions")) {
1938 subscriptions = jsonDecoder.decodeMap(jsonPath + ".subscriptions", json[ "subscriptions"], keyDecoder: (String jsonPath, Object json) => new AnalysisServ ice.fromJson(jsonDecoder, jsonPath, json), valueDecoder: (String jsonPath, Objec t json) => jsonDecoder.decodeList(jsonPath, json, jsonDecoder.decodeString)); 2063 subscriptions = jsonDecoder.decodeMap(
2064 jsonPath + ".subscriptions", json["subscriptions"],
2065 keyDecoder: (String jsonPath, Object json) =>
2066 new AnalysisService.fromJson(jsonDecoder, jsonPath, json),
2067 valueDecoder: (String jsonPath, Object json) => jsonDecoder
2068 .decodeList(jsonPath, json, jsonDecoder.decodeString));
1939 } else { 2069 } else {
1940 throw jsonDecoder.mismatch(jsonPath, "subscriptions"); 2070 throw jsonDecoder.mismatch(jsonPath, "subscriptions");
1941 } 2071 }
1942 return new AnalysisSetSubscriptionsParams(subscriptions); 2072 return new AnalysisSetSubscriptionsParams(subscriptions);
1943 } else { 2073 } else {
1944 throw jsonDecoder.mismatch(jsonPath, "analysis.setSubscriptions params", j son); 2074 throw jsonDecoder.mismatch(
2075 jsonPath, "analysis.setSubscriptions params", json);
1945 } 2076 }
1946 } 2077 }
1947 2078
1948 factory AnalysisSetSubscriptionsParams.fromRequest(Request request) { 2079 factory AnalysisSetSubscriptionsParams.fromRequest(Request request) {
1949 return new AnalysisSetSubscriptionsParams.fromJson( 2080 return new AnalysisSetSubscriptionsParams.fromJson(
1950 new RequestDecoder(request), "params", request.params); 2081 new RequestDecoder(request), "params", request.params);
1951 } 2082 }
1952 2083
1953 @override 2084 @override
1954 Map<String, dynamic> toJson() { 2085 Map<String, dynamic> toJson() {
1955 Map<String, dynamic> result = {}; 2086 Map<String, dynamic> result = {};
1956 result["subscriptions"] = mapMap(subscriptions, keyCallback: (AnalysisServic e value) => value.toJson()); 2087 result["subscriptions"] = mapMap(subscriptions,
2088 keyCallback: (AnalysisService value) => value.toJson());
1957 return result; 2089 return result;
1958 } 2090 }
1959 2091
1960 @override 2092 @override
1961 Request toRequest(String id) { 2093 Request toRequest(String id) {
1962 return new Request(id, "analysis.setSubscriptions", toJson()); 2094 return new Request(id, "analysis.setSubscriptions", toJson());
1963 } 2095 }
1964 2096
1965 @override 2097 @override
1966 String toString() => JSON.encode(toJson()); 2098 String toString() => JSON.encode(toJson());
1967 2099
1968 @override 2100 @override
1969 bool operator==(other) { 2101 bool operator ==(other) {
1970 if (other is AnalysisSetSubscriptionsParams) { 2102 if (other is AnalysisSetSubscriptionsParams) {
1971 return mapEqual(subscriptions, other.subscriptions, (List<String> a, List< String> b) => listEqual(a, b, (String a, String b) => a == b)); 2103 return mapEqual(
2104 subscriptions,
2105 other.subscriptions,
2106 (List<String> a, List<String> b) =>
2107 listEqual(a, b, (String a, String b) => a == b));
1972 } 2108 }
1973 return false; 2109 return false;
1974 } 2110 }
1975 2111
1976 @override 2112 @override
1977 int get hashCode { 2113 int get hashCode {
1978 int hash = 0; 2114 int hash = 0;
1979 hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode); 2115 hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
1980 return JenkinsSmiHash.finish(hash); 2116 return JenkinsSmiHash.finish(hash);
1981 } 2117 }
1982 } 2118 }
1983 2119
1984 /** 2120 /**
1985 * analysis.setSubscriptions result 2121 * analysis.setSubscriptions result
1986 * 2122 *
1987 * Clients may not extend, implement or mix-in this class. 2123 * Clients may not extend, implement or mix-in this class.
1988 */ 2124 */
1989 class AnalysisSetSubscriptionsResult implements ResponseResult { 2125 class AnalysisSetSubscriptionsResult implements ResponseResult {
1990 @override 2126 @override
1991 Map<String, dynamic> toJson() => <String, dynamic>{}; 2127 Map<String, dynamic> toJson() => <String, dynamic>{};
1992 2128
1993 @override 2129 @override
1994 Response toResponse(String id) { 2130 Response toResponse(String id) {
1995 return new Response(id, result: null); 2131 return new Response(id, result: null);
1996 } 2132 }
1997 2133
1998 @override 2134 @override
1999 bool operator==(other) { 2135 bool operator ==(other) {
2000 if (other is AnalysisSetSubscriptionsResult) { 2136 if (other is AnalysisSetSubscriptionsResult) {
2001 return true; 2137 return true;
2002 } 2138 }
2003 return false; 2139 return false;
2004 } 2140 }
2005 2141
2006 @override 2142 @override
2007 int get hashCode { 2143 int get hashCode {
2008 return 218088493; 2144 return 218088493;
2009 } 2145 }
(...skipping 23 matching lines...) Expand all
2033 */ 2169 */
2034 void set files(Map<String, dynamic> value) { 2170 void set files(Map<String, dynamic> value) {
2035 assert(value != null); 2171 assert(value != null);
2036 this._files = value; 2172 this._files = value;
2037 } 2173 }
2038 2174
2039 AnalysisUpdateContentParams(Map<String, dynamic> files) { 2175 AnalysisUpdateContentParams(Map<String, dynamic> files) {
2040 this.files = files; 2176 this.files = files;
2041 } 2177 }
2042 2178
2043 factory AnalysisUpdateContentParams.fromJson(JsonDecoder jsonDecoder, String j sonPath, Object json) { 2179 factory AnalysisUpdateContentParams.fromJson(
2180 JsonDecoder jsonDecoder, String jsonPath, Object json) {
2044 if (json == null) { 2181 if (json == null) {
2045 json = {}; 2182 json = {};
2046 } 2183 }
2047 if (json is Map) { 2184 if (json is Map) {
2048 Map<String, dynamic> files; 2185 Map<String, dynamic> files;
2049 if (json.containsKey("files")) { 2186 if (json.containsKey("files")) {
2050 files = jsonDecoder.decodeMap(jsonPath + ".files", json["files"], valueD ecoder: (String jsonPath, Object json) => jsonDecoder.decodeUnion(jsonPath, json , "type", {"add": (String jsonPath, Object json) => new AddContentOverlay.fromJs on(jsonDecoder, jsonPath, json), "change": (String jsonPath, Object json) => new ChangeContentOverlay.fromJson(jsonDecoder, jsonPath, json), "remove": (String j sonPath, Object json) => new RemoveContentOverlay.fromJson(jsonDecoder, jsonPath , json)})); 2187 files = jsonDecoder.decodeMap(jsonPath + ".files", json["files"],
2188 valueDecoder: (String jsonPath, Object json) =>
2189 jsonDecoder.decodeUnion(jsonPath, json, "type", {
2190 "add": (String jsonPath, Object json) =>
2191 new AddContentOverlay.fromJson(
2192 jsonDecoder, jsonPath, json),
2193 "change": (String jsonPath, Object json) =>
2194 new ChangeContentOverlay.fromJson(
2195 jsonDecoder, jsonPath, json),
2196 "remove": (String jsonPath, Object json) =>
2197 new RemoveContentOverlay.fromJson(
2198 jsonDecoder, jsonPath, json)
2199 }));
2051 } else { 2200 } else {
2052 throw jsonDecoder.mismatch(jsonPath, "files"); 2201 throw jsonDecoder.mismatch(jsonPath, "files");
2053 } 2202 }
2054 return new AnalysisUpdateContentParams(files); 2203 return new AnalysisUpdateContentParams(files);
2055 } else { 2204 } else {
2056 throw jsonDecoder.mismatch(jsonPath, "analysis.updateContent params", json ); 2205 throw jsonDecoder.mismatch(
2206 jsonPath, "analysis.updateContent params", json);
2057 } 2207 }
2058 } 2208 }
2059 2209
2060 factory AnalysisUpdateContentParams.fromRequest(Request request) { 2210 factory AnalysisUpdateContentParams.fromRequest(Request request) {
2061 return new AnalysisUpdateContentParams.fromJson( 2211 return new AnalysisUpdateContentParams.fromJson(
2062 new RequestDecoder(request), "params", request.params); 2212 new RequestDecoder(request), "params", request.params);
2063 } 2213 }
2064 2214
2065 @override 2215 @override
2066 Map<String, dynamic> toJson() { 2216 Map<String, dynamic> toJson() {
2067 Map<String, dynamic> result = {}; 2217 Map<String, dynamic> result = {};
2068 result["files"] = mapMap(files, valueCallback: (dynamic value) => value.toJs on()); 2218 result["files"] =
2219 mapMap(files, valueCallback: (dynamic value) => value.toJson());
2069 return result; 2220 return result;
2070 } 2221 }
2071 2222
2072 @override 2223 @override
2073 Request toRequest(String id) { 2224 Request toRequest(String id) {
2074 return new Request(id, "analysis.updateContent", toJson()); 2225 return new Request(id, "analysis.updateContent", toJson());
2075 } 2226 }
2076 2227
2077 @override 2228 @override
2078 String toString() => JSON.encode(toJson()); 2229 String toString() => JSON.encode(toJson());
2079 2230
2080 @override 2231 @override
2081 bool operator==(other) { 2232 bool operator ==(other) {
2082 if (other is AnalysisUpdateContentParams) { 2233 if (other is AnalysisUpdateContentParams) {
2083 return mapEqual(files, other.files, (dynamic a, dynamic b) => a == b); 2234 return mapEqual(files, other.files, (dynamic a, dynamic b) => a == b);
2084 } 2235 }
2085 return false; 2236 return false;
2086 } 2237 }
2087 2238
2088 @override 2239 @override
2089 int get hashCode { 2240 int get hashCode {
2090 int hash = 0; 2241 int hash = 0;
2091 hash = JenkinsSmiHash.combine(hash, files.hashCode); 2242 hash = JenkinsSmiHash.combine(hash, files.hashCode);
2092 return JenkinsSmiHash.finish(hash); 2243 return JenkinsSmiHash.finish(hash);
2093 } 2244 }
2094 } 2245 }
2095 2246
2096 /** 2247 /**
2097 * analysis.updateContent result 2248 * analysis.updateContent result
2098 * 2249 *
2099 * Clients may not extend, implement or mix-in this class. 2250 * Clients may not extend, implement or mix-in this class.
2100 */ 2251 */
2101 class AnalysisUpdateContentResult implements ResponseResult { 2252 class AnalysisUpdateContentResult implements ResponseResult {
2102 @override 2253 @override
2103 Map<String, dynamic> toJson() => <String, dynamic>{}; 2254 Map<String, dynamic> toJson() => <String, dynamic>{};
2104 2255
2105 @override 2256 @override
2106 Response toResponse(String id) { 2257 Response toResponse(String id) {
2107 return new Response(id, result: null); 2258 return new Response(id, result: null);
2108 } 2259 }
2109 2260
2110 @override 2261 @override
2111 bool operator==(other) { 2262 bool operator ==(other) {
2112 if (other is AnalysisUpdateContentResult) { 2263 if (other is AnalysisUpdateContentResult) {
2113 return true; 2264 return true;
2114 } 2265 }
2115 return false; 2266 return false;
2116 } 2267 }
2117 2268
2118 @override 2269 @override
2119 int get hashCode { 2270 int get hashCode {
2120 return 468798730; 2271 return 468798730;
2121 } 2272 }
(...skipping 22 matching lines...) Expand all
2144 */ 2295 */
2145 void set edits(List<SourceEdit> value) { 2296 void set edits(List<SourceEdit> value) {
2146 assert(value != null); 2297 assert(value != null);
2147 this._edits = value; 2298 this._edits = value;
2148 } 2299 }
2149 2300
2150 ChangeContentOverlay(List<SourceEdit> edits) { 2301 ChangeContentOverlay(List<SourceEdit> edits) {
2151 this.edits = edits; 2302 this.edits = edits;
2152 } 2303 }
2153 2304
2154 factory ChangeContentOverlay.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) { 2305 factory ChangeContentOverlay.fromJson(
2306 JsonDecoder jsonDecoder, String jsonPath, Object json) {
2155 if (json == null) { 2307 if (json == null) {
2156 json = {}; 2308 json = {};
2157 } 2309 }
2158 if (json is Map) { 2310 if (json is Map) {
2159 if (json["type"] != "change") { 2311 if (json["type"] != "change") {
2160 throw jsonDecoder.mismatch(jsonPath, "equal " + "change", json); 2312 throw jsonDecoder.mismatch(jsonPath, "equal " + "change", json);
2161 } 2313 }
2162 List<SourceEdit> edits; 2314 List<SourceEdit> edits;
2163 if (json.containsKey("edits")) { 2315 if (json.containsKey("edits")) {
2164 edits = jsonDecoder.decodeList(jsonPath + ".edits", json["edits"], (Stri ng jsonPath, Object json) => new SourceEdit.fromJson(jsonDecoder, jsonPath, json )); 2316 edits = jsonDecoder.decodeList(
2317 jsonPath + ".edits",
2318 json["edits"],
2319 (String jsonPath, Object json) =>
2320 new SourceEdit.fromJson(jsonDecoder, jsonPath, json));
2165 } else { 2321 } else {
2166 throw jsonDecoder.mismatch(jsonPath, "edits"); 2322 throw jsonDecoder.mismatch(jsonPath, "edits");
2167 } 2323 }
2168 return new ChangeContentOverlay(edits); 2324 return new ChangeContentOverlay(edits);
2169 } else { 2325 } else {
2170 throw jsonDecoder.mismatch(jsonPath, "ChangeContentOverlay", json); 2326 throw jsonDecoder.mismatch(jsonPath, "ChangeContentOverlay", json);
2171 } 2327 }
2172 } 2328 }
2173 2329
2174 @override 2330 @override
2175 Map<String, dynamic> toJson() { 2331 Map<String, dynamic> toJson() {
2176 Map<String, dynamic> result = {}; 2332 Map<String, dynamic> result = {};
2177 result["type"] = "change"; 2333 result["type"] = "change";
2178 result["edits"] = edits.map((SourceEdit value) => value.toJson()).toList(); 2334 result["edits"] = edits.map((SourceEdit value) => value.toJson()).toList();
2179 return result; 2335 return result;
2180 } 2336 }
2181 2337
2182 @override 2338 @override
2183 String toString() => JSON.encode(toJson()); 2339 String toString() => JSON.encode(toJson());
2184 2340
2185 @override 2341 @override
2186 bool operator==(other) { 2342 bool operator ==(other) {
2187 if (other is ChangeContentOverlay) { 2343 if (other is ChangeContentOverlay) {
2188 return listEqual(edits, other.edits, (SourceEdit a, SourceEdit b) => a == b); 2344 return listEqual(
2345 edits, other.edits, (SourceEdit a, SourceEdit b) => a == b);
2189 } 2346 }
2190 return false; 2347 return false;
2191 } 2348 }
2192 2349
2193 @override 2350 @override
2194 int get hashCode { 2351 int get hashCode {
2195 int hash = 0; 2352 int hash = 0;
2196 hash = JenkinsSmiHash.combine(hash, 873118866); 2353 hash = JenkinsSmiHash.combine(hash, 873118866);
2197 hash = JenkinsSmiHash.combine(hash, edits.hashCode); 2354 hash = JenkinsSmiHash.combine(hash, edits.hashCode);
2198 return JenkinsSmiHash.finish(hash); 2355 return JenkinsSmiHash.finish(hash);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
2238 void set offset(int value) { 2395 void set offset(int value) {
2239 assert(value != null); 2396 assert(value != null);
2240 this._offset = value; 2397 this._offset = value;
2241 } 2398 }
2242 2399
2243 CompletionGetSuggestionsParams(String file, int offset) { 2400 CompletionGetSuggestionsParams(String file, int offset) {
2244 this.file = file; 2401 this.file = file;
2245 this.offset = offset; 2402 this.offset = offset;
2246 } 2403 }
2247 2404
2248 factory CompletionGetSuggestionsParams.fromJson(JsonDecoder jsonDecoder, Strin g jsonPath, Object json) { 2405 factory CompletionGetSuggestionsParams.fromJson(
2406 JsonDecoder jsonDecoder, String jsonPath, Object json) {
2249 if (json == null) { 2407 if (json == null) {
2250 json = {}; 2408 json = {};
2251 } 2409 }
2252 if (json is Map) { 2410 if (json is Map) {
2253 String file; 2411 String file;
2254 if (json.containsKey("file")) { 2412 if (json.containsKey("file")) {
2255 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); 2413 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
2256 } else { 2414 } else {
2257 throw jsonDecoder.mismatch(jsonPath, "file"); 2415 throw jsonDecoder.mismatch(jsonPath, "file");
2258 } 2416 }
2259 int offset; 2417 int offset;
2260 if (json.containsKey("offset")) { 2418 if (json.containsKey("offset")) {
2261 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); 2419 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
2262 } else { 2420 } else {
2263 throw jsonDecoder.mismatch(jsonPath, "offset"); 2421 throw jsonDecoder.mismatch(jsonPath, "offset");
2264 } 2422 }
2265 return new CompletionGetSuggestionsParams(file, offset); 2423 return new CompletionGetSuggestionsParams(file, offset);
2266 } else { 2424 } else {
2267 throw jsonDecoder.mismatch(jsonPath, "completion.getSuggestions params", j son); 2425 throw jsonDecoder.mismatch(
2426 jsonPath, "completion.getSuggestions params", json);
2268 } 2427 }
2269 } 2428 }
2270 2429
2271 factory CompletionGetSuggestionsParams.fromRequest(Request request) { 2430 factory CompletionGetSuggestionsParams.fromRequest(Request request) {
2272 return new CompletionGetSuggestionsParams.fromJson( 2431 return new CompletionGetSuggestionsParams.fromJson(
2273 new RequestDecoder(request), "params", request.params); 2432 new RequestDecoder(request), "params", request.params);
2274 } 2433 }
2275 2434
2276 @override 2435 @override
2277 Map<String, dynamic> toJson() { 2436 Map<String, dynamic> toJson() {
2278 Map<String, dynamic> result = {}; 2437 Map<String, dynamic> result = {};
2279 result["file"] = file; 2438 result["file"] = file;
2280 result["offset"] = offset; 2439 result["offset"] = offset;
2281 return result; 2440 return result;
2282 } 2441 }
2283 2442
2284 @override 2443 @override
2285 Request toRequest(String id) { 2444 Request toRequest(String id) {
2286 return new Request(id, "completion.getSuggestions", toJson()); 2445 return new Request(id, "completion.getSuggestions", toJson());
2287 } 2446 }
2288 2447
2289 @override 2448 @override
2290 String toString() => JSON.encode(toJson()); 2449 String toString() => JSON.encode(toJson());
2291 2450
2292 @override 2451 @override
2293 bool operator==(other) { 2452 bool operator ==(other) {
2294 if (other is CompletionGetSuggestionsParams) { 2453 if (other is CompletionGetSuggestionsParams) {
2295 return file == other.file && 2454 return file == other.file && offset == other.offset;
2296 offset == other.offset;
2297 } 2455 }
2298 return false; 2456 return false;
2299 } 2457 }
2300 2458
2301 @override 2459 @override
2302 int get hashCode { 2460 int get hashCode {
2303 int hash = 0; 2461 int hash = 0;
2304 hash = JenkinsSmiHash.combine(hash, file.hashCode); 2462 hash = JenkinsSmiHash.combine(hash, file.hashCode);
2305 hash = JenkinsSmiHash.combine(hash, offset.hashCode); 2463 hash = JenkinsSmiHash.combine(hash, offset.hashCode);
2306 return JenkinsSmiHash.finish(hash); 2464 return JenkinsSmiHash.finish(hash);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
2375 * possible completions at the requested cursor position, even those that do 2533 * possible completions at the requested cursor position, even those that do
2376 * not match the characters the user has already typed. This allows the 2534 * not match the characters the user has already typed. This allows the
2377 * client to respond to further keystrokes from the user without having to 2535 * client to respond to further keystrokes from the user without having to
2378 * make additional requests. 2536 * make additional requests.
2379 */ 2537 */
2380 void set results(List<CompletionSuggestion> value) { 2538 void set results(List<CompletionSuggestion> value) {
2381 assert(value != null); 2539 assert(value != null);
2382 this._results = value; 2540 this._results = value;
2383 } 2541 }
2384 2542
2385 CompletionGetSuggestionsResult(int replacementOffset, int replacementLength, L ist<CompletionSuggestion> results) { 2543 CompletionGetSuggestionsResult(int replacementOffset, int replacementLength,
2544 List<CompletionSuggestion> results) {
2386 this.replacementOffset = replacementOffset; 2545 this.replacementOffset = replacementOffset;
2387 this.replacementLength = replacementLength; 2546 this.replacementLength = replacementLength;
2388 this.results = results; 2547 this.results = results;
2389 } 2548 }
2390 2549
2391 factory CompletionGetSuggestionsResult.fromJson(JsonDecoder jsonDecoder, Strin g jsonPath, Object json) { 2550 factory CompletionGetSuggestionsResult.fromJson(
2551 JsonDecoder jsonDecoder, String jsonPath, Object json) {
2392 if (json == null) { 2552 if (json == null) {
2393 json = {}; 2553 json = {};
2394 } 2554 }
2395 if (json is Map) { 2555 if (json is Map) {
2396 int replacementOffset; 2556 int replacementOffset;
2397 if (json.containsKey("replacementOffset")) { 2557 if (json.containsKey("replacementOffset")) {
2398 replacementOffset = jsonDecoder.decodeInt(jsonPath + ".replacementOffset ", json["replacementOffset"]); 2558 replacementOffset = jsonDecoder.decodeInt(
2559 jsonPath + ".replacementOffset", json["replacementOffset"]);
2399 } else { 2560 } else {
2400 throw jsonDecoder.mismatch(jsonPath, "replacementOffset"); 2561 throw jsonDecoder.mismatch(jsonPath, "replacementOffset");
2401 } 2562 }
2402 int replacementLength; 2563 int replacementLength;
2403 if (json.containsKey("replacementLength")) { 2564 if (json.containsKey("replacementLength")) {
2404 replacementLength = jsonDecoder.decodeInt(jsonPath + ".replacementLength ", json["replacementLength"]); 2565 replacementLength = jsonDecoder.decodeInt(
2566 jsonPath + ".replacementLength", json["replacementLength"]);
2405 } else { 2567 } else {
2406 throw jsonDecoder.mismatch(jsonPath, "replacementLength"); 2568 throw jsonDecoder.mismatch(jsonPath, "replacementLength");
2407 } 2569 }
2408 List<CompletionSuggestion> results; 2570 List<CompletionSuggestion> results;
2409 if (json.containsKey("results")) { 2571 if (json.containsKey("results")) {
2410 results = jsonDecoder.decodeList(jsonPath + ".results", json["results"], (String jsonPath, Object json) => new CompletionSuggestion.fromJson(jsonDecoder , jsonPath, json)); 2572 results = jsonDecoder.decodeList(
2573 jsonPath + ".results",
2574 json["results"],
2575 (String jsonPath, Object json) =>
2576 new CompletionSuggestion.fromJson(jsonDecoder, jsonPath, json));
2411 } else { 2577 } else {
2412 throw jsonDecoder.mismatch(jsonPath, "results"); 2578 throw jsonDecoder.mismatch(jsonPath, "results");
2413 } 2579 }
2414 return new CompletionGetSuggestionsResult(replacementOffset, replacementLe ngth, results); 2580 return new CompletionGetSuggestionsResult(
2581 replacementOffset, replacementLength, results);
2415 } else { 2582 } else {
2416 throw jsonDecoder.mismatch(jsonPath, "completion.getSuggestions result", j son); 2583 throw jsonDecoder.mismatch(
2584 jsonPath, "completion.getSuggestions result", json);
2417 } 2585 }
2418 } 2586 }
2419 2587
2420 factory CompletionGetSuggestionsResult.fromResponse(Response response) { 2588 factory CompletionGetSuggestionsResult.fromResponse(Response response) {
2421 return new CompletionGetSuggestionsResult.fromJson( 2589 return new CompletionGetSuggestionsResult.fromJson(
2422 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), " result", response.result); 2590 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
2591 "result",
2592 response.result);
2423 } 2593 }
2424 2594
2425 @override 2595 @override
2426 Map<String, dynamic> toJson() { 2596 Map<String, dynamic> toJson() {
2427 Map<String, dynamic> result = {}; 2597 Map<String, dynamic> result = {};
2428 result["replacementOffset"] = replacementOffset; 2598 result["replacementOffset"] = replacementOffset;
2429 result["replacementLength"] = replacementLength; 2599 result["replacementLength"] = replacementLength;
2430 result["results"] = results.map((CompletionSuggestion value) => value.toJson ()).toList(); 2600 result["results"] =
2601 results.map((CompletionSuggestion value) => value.toJson()).toList();
2431 return result; 2602 return result;
2432 } 2603 }
2433 2604
2434 @override 2605 @override
2435 Response toResponse(String id) { 2606 Response toResponse(String id) {
2436 return new Response(id, result: toJson()); 2607 return new Response(id, result: toJson());
2437 } 2608 }
2438 2609
2439 @override 2610 @override
2440 String toString() => JSON.encode(toJson()); 2611 String toString() => JSON.encode(toJson());
2441 2612
2442 @override 2613 @override
2443 bool operator==(other) { 2614 bool operator ==(other) {
2444 if (other is CompletionGetSuggestionsResult) { 2615 if (other is CompletionGetSuggestionsResult) {
2445 return replacementOffset == other.replacementOffset && 2616 return replacementOffset == other.replacementOffset &&
2446 replacementLength == other.replacementLength && 2617 replacementLength == other.replacementLength &&
2447 listEqual(results, other.results, (CompletionSuggestion a, CompletionS uggestion b) => a == b); 2618 listEqual(results, other.results,
2619 (CompletionSuggestion a, CompletionSuggestion b) => a == b);
2448 } 2620 }
2449 return false; 2621 return false;
2450 } 2622 }
2451 2623
2452 @override 2624 @override
2453 int get hashCode { 2625 int get hashCode {
2454 int hash = 0; 2626 int hash = 0;
2455 hash = JenkinsSmiHash.combine(hash, replacementOffset.hashCode); 2627 hash = JenkinsSmiHash.combine(hash, replacementOffset.hashCode);
2456 hash = JenkinsSmiHash.combine(hash, replacementLength.hashCode); 2628 hash = JenkinsSmiHash.combine(hash, replacementLength.hashCode);
2457 hash = JenkinsSmiHash.combine(hash, results.hashCode); 2629 hash = JenkinsSmiHash.combine(hash, results.hashCode);
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
2837 String get importUri => _importUri; 3009 String get importUri => _importUri;
2838 3010
2839 /** 3011 /**
2840 * The import to be added if the suggestion is out of scope and needs an 3012 * The import to be added if the suggestion is out of scope and needs an
2841 * import to be added to be in scope. 3013 * import to be added to be in scope.
2842 */ 3014 */
2843 void set importUri(String value) { 3015 void set importUri(String value) {
2844 this._importUri = value; 3016 this._importUri = value;
2845 } 3017 }
2846 3018
2847 CompletionSuggestion(CompletionSuggestionKind kind, int relevance, String comp letion, int selectionOffset, int selectionLength, bool isDeprecated, bool isPote ntial, {String docSummary, String docComplete, String declaringType, String defa ultArgumentListString, List<int> defaultArgumentListTextRanges, Element element, String returnType, List<String> parameterNames, List<String> parameterTypes, in t requiredParameterCount, bool hasNamedParameters, String parameterName, String parameterType, String importUri}) { 3019 CompletionSuggestion(
3020 CompletionSuggestionKind kind,
3021 int relevance,
3022 String completion,
3023 int selectionOffset,
3024 int selectionLength,
3025 bool isDeprecated,
3026 bool isPotential,
3027 {String docSummary,
3028 String docComplete,
3029 String declaringType,
3030 String defaultArgumentListString,
3031 List<int> defaultArgumentListTextRanges,
3032 Element element,
3033 String returnType,
3034 List<String> parameterNames,
3035 List<String> parameterTypes,
3036 int requiredParameterCount,
3037 bool hasNamedParameters,
3038 String parameterName,
3039 String parameterType,
3040 String importUri}) {
2848 this.kind = kind; 3041 this.kind = kind;
2849 this.relevance = relevance; 3042 this.relevance = relevance;
2850 this.completion = completion; 3043 this.completion = completion;
2851 this.selectionOffset = selectionOffset; 3044 this.selectionOffset = selectionOffset;
2852 this.selectionLength = selectionLength; 3045 this.selectionLength = selectionLength;
2853 this.isDeprecated = isDeprecated; 3046 this.isDeprecated = isDeprecated;
2854 this.isPotential = isPotential; 3047 this.isPotential = isPotential;
2855 this.docSummary = docSummary; 3048 this.docSummary = docSummary;
2856 this.docComplete = docComplete; 3049 this.docComplete = docComplete;
2857 this.declaringType = declaringType; 3050 this.declaringType = declaringType;
2858 this.defaultArgumentListString = defaultArgumentListString; 3051 this.defaultArgumentListString = defaultArgumentListString;
2859 this.defaultArgumentListTextRanges = defaultArgumentListTextRanges; 3052 this.defaultArgumentListTextRanges = defaultArgumentListTextRanges;
2860 this.element = element; 3053 this.element = element;
2861 this.returnType = returnType; 3054 this.returnType = returnType;
2862 this.parameterNames = parameterNames; 3055 this.parameterNames = parameterNames;
2863 this.parameterTypes = parameterTypes; 3056 this.parameterTypes = parameterTypes;
2864 this.requiredParameterCount = requiredParameterCount; 3057 this.requiredParameterCount = requiredParameterCount;
2865 this.hasNamedParameters = hasNamedParameters; 3058 this.hasNamedParameters = hasNamedParameters;
2866 this.parameterName = parameterName; 3059 this.parameterName = parameterName;
2867 this.parameterType = parameterType; 3060 this.parameterType = parameterType;
2868 this.importUri = importUri; 3061 this.importUri = importUri;
2869 } 3062 }
2870 3063
2871 factory CompletionSuggestion.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) { 3064 factory CompletionSuggestion.fromJson(
3065 JsonDecoder jsonDecoder, String jsonPath, Object json) {
2872 if (json == null) { 3066 if (json == null) {
2873 json = {}; 3067 json = {};
2874 } 3068 }
2875 if (json is Map) { 3069 if (json is Map) {
2876 CompletionSuggestionKind kind; 3070 CompletionSuggestionKind kind;
2877 if (json.containsKey("kind")) { 3071 if (json.containsKey("kind")) {
2878 kind = new CompletionSuggestionKind.fromJson(jsonDecoder, jsonPath + ".k ind", json["kind"]); 3072 kind = new CompletionSuggestionKind.fromJson(
3073 jsonDecoder, jsonPath + ".kind", json["kind"]);
2879 } else { 3074 } else {
2880 throw jsonDecoder.mismatch(jsonPath, "kind"); 3075 throw jsonDecoder.mismatch(jsonPath, "kind");
2881 } 3076 }
2882 int relevance; 3077 int relevance;
2883 if (json.containsKey("relevance")) { 3078 if (json.containsKey("relevance")) {
2884 relevance = jsonDecoder.decodeInt(jsonPath + ".relevance", json["relevan ce"]); 3079 relevance =
3080 jsonDecoder.decodeInt(jsonPath + ".relevance", json["relevance"]);
2885 } else { 3081 } else {
2886 throw jsonDecoder.mismatch(jsonPath, "relevance"); 3082 throw jsonDecoder.mismatch(jsonPath, "relevance");
2887 } 3083 }
2888 String completion; 3084 String completion;
2889 if (json.containsKey("completion")) { 3085 if (json.containsKey("completion")) {
2890 completion = jsonDecoder.decodeString(jsonPath + ".completion", json["co mpletion"]); 3086 completion = jsonDecoder.decodeString(
3087 jsonPath + ".completion", json["completion"]);
2891 } else { 3088 } else {
2892 throw jsonDecoder.mismatch(jsonPath, "completion"); 3089 throw jsonDecoder.mismatch(jsonPath, "completion");
2893 } 3090 }
2894 int selectionOffset; 3091 int selectionOffset;
2895 if (json.containsKey("selectionOffset")) { 3092 if (json.containsKey("selectionOffset")) {
2896 selectionOffset = jsonDecoder.decodeInt(jsonPath + ".selectionOffset", j son["selectionOffset"]); 3093 selectionOffset = jsonDecoder.decodeInt(
3094 jsonPath + ".selectionOffset", json["selectionOffset"]);
2897 } else { 3095 } else {
2898 throw jsonDecoder.mismatch(jsonPath, "selectionOffset"); 3096 throw jsonDecoder.mismatch(jsonPath, "selectionOffset");
2899 } 3097 }
2900 int selectionLength; 3098 int selectionLength;
2901 if (json.containsKey("selectionLength")) { 3099 if (json.containsKey("selectionLength")) {
2902 selectionLength = jsonDecoder.decodeInt(jsonPath + ".selectionLength", j son["selectionLength"]); 3100 selectionLength = jsonDecoder.decodeInt(
3101 jsonPath + ".selectionLength", json["selectionLength"]);
2903 } else { 3102 } else {
2904 throw jsonDecoder.mismatch(jsonPath, "selectionLength"); 3103 throw jsonDecoder.mismatch(jsonPath, "selectionLength");
2905 } 3104 }
2906 bool isDeprecated; 3105 bool isDeprecated;
2907 if (json.containsKey("isDeprecated")) { 3106 if (json.containsKey("isDeprecated")) {
2908 isDeprecated = jsonDecoder.decodeBool(jsonPath + ".isDeprecated", json[" isDeprecated"]); 3107 isDeprecated = jsonDecoder.decodeBool(
3108 jsonPath + ".isDeprecated", json["isDeprecated"]);
2909 } else { 3109 } else {
2910 throw jsonDecoder.mismatch(jsonPath, "isDeprecated"); 3110 throw jsonDecoder.mismatch(jsonPath, "isDeprecated");
2911 } 3111 }
2912 bool isPotential; 3112 bool isPotential;
2913 if (json.containsKey("isPotential")) { 3113 if (json.containsKey("isPotential")) {
2914 isPotential = jsonDecoder.decodeBool(jsonPath + ".isPotential", json["is Potential"]); 3114 isPotential = jsonDecoder.decodeBool(
3115 jsonPath + ".isPotential", json["isPotential"]);
2915 } else { 3116 } else {
2916 throw jsonDecoder.mismatch(jsonPath, "isPotential"); 3117 throw jsonDecoder.mismatch(jsonPath, "isPotential");
2917 } 3118 }
2918 String docSummary; 3119 String docSummary;
2919 if (json.containsKey("docSummary")) { 3120 if (json.containsKey("docSummary")) {
2920 docSummary = jsonDecoder.decodeString(jsonPath + ".docSummary", json["do cSummary"]); 3121 docSummary = jsonDecoder.decodeString(
3122 jsonPath + ".docSummary", json["docSummary"]);
2921 } 3123 }
2922 String docComplete; 3124 String docComplete;
2923 if (json.containsKey("docComplete")) { 3125 if (json.containsKey("docComplete")) {
2924 docComplete = jsonDecoder.decodeString(jsonPath + ".docComplete", json[" docComplete"]); 3126 docComplete = jsonDecoder.decodeString(
3127 jsonPath + ".docComplete", json["docComplete"]);
2925 } 3128 }
2926 String declaringType; 3129 String declaringType;
2927 if (json.containsKey("declaringType")) { 3130 if (json.containsKey("declaringType")) {
2928 declaringType = jsonDecoder.decodeString(jsonPath + ".declaringType", js on["declaringType"]); 3131 declaringType = jsonDecoder.decodeString(
3132 jsonPath + ".declaringType", json["declaringType"]);
2929 } 3133 }
2930 String defaultArgumentListString; 3134 String defaultArgumentListString;
2931 if (json.containsKey("defaultArgumentListString")) { 3135 if (json.containsKey("defaultArgumentListString")) {
2932 defaultArgumentListString = jsonDecoder.decodeString(jsonPath + ".defaul tArgumentListString", json["defaultArgumentListString"]); 3136 defaultArgumentListString = jsonDecoder.decodeString(
3137 jsonPath + ".defaultArgumentListString",
3138 json["defaultArgumentListString"]);
2933 } 3139 }
2934 List<int> defaultArgumentListTextRanges; 3140 List<int> defaultArgumentListTextRanges;
2935 if (json.containsKey("defaultArgumentListTextRanges")) { 3141 if (json.containsKey("defaultArgumentListTextRanges")) {
2936 defaultArgumentListTextRanges = jsonDecoder.decodeList(jsonPath + ".defa ultArgumentListTextRanges", json["defaultArgumentListTextRanges"], jsonDecoder.d ecodeInt); 3142 defaultArgumentListTextRanges = jsonDecoder.decodeList(
3143 jsonPath + ".defaultArgumentListTextRanges",
3144 json["defaultArgumentListTextRanges"],
3145 jsonDecoder.decodeInt);
2937 } 3146 }
2938 Element element; 3147 Element element;
2939 if (json.containsKey("element")) { 3148 if (json.containsKey("element")) {
2940 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[ "element"]); 3149 element = new Element.fromJson(
3150 jsonDecoder, jsonPath + ".element", json["element"]);
2941 } 3151 }
2942 String returnType; 3152 String returnType;
2943 if (json.containsKey("returnType")) { 3153 if (json.containsKey("returnType")) {
2944 returnType = jsonDecoder.decodeString(jsonPath + ".returnType", json["re turnType"]); 3154 returnType = jsonDecoder.decodeString(
3155 jsonPath + ".returnType", json["returnType"]);
2945 } 3156 }
2946 List<String> parameterNames; 3157 List<String> parameterNames;
2947 if (json.containsKey("parameterNames")) { 3158 if (json.containsKey("parameterNames")) {
2948 parameterNames = jsonDecoder.decodeList(jsonPath + ".parameterNames", js on["parameterNames"], jsonDecoder.decodeString); 3159 parameterNames = jsonDecoder.decodeList(jsonPath + ".parameterNames",
3160 json["parameterNames"], jsonDecoder.decodeString);
2949 } 3161 }
2950 List<String> parameterTypes; 3162 List<String> parameterTypes;
2951 if (json.containsKey("parameterTypes")) { 3163 if (json.containsKey("parameterTypes")) {
2952 parameterTypes = jsonDecoder.decodeList(jsonPath + ".parameterTypes", js on["parameterTypes"], jsonDecoder.decodeString); 3164 parameterTypes = jsonDecoder.decodeList(jsonPath + ".parameterTypes",
3165 json["parameterTypes"], jsonDecoder.decodeString);
2953 } 3166 }
2954 int requiredParameterCount; 3167 int requiredParameterCount;
2955 if (json.containsKey("requiredParameterCount")) { 3168 if (json.containsKey("requiredParameterCount")) {
2956 requiredParameterCount = jsonDecoder.decodeInt(jsonPath + ".requiredPara meterCount", json["requiredParameterCount"]); 3169 requiredParameterCount = jsonDecoder.decodeInt(
3170 jsonPath + ".requiredParameterCount",
3171 json["requiredParameterCount"]);
2957 } 3172 }
2958 bool hasNamedParameters; 3173 bool hasNamedParameters;
2959 if (json.containsKey("hasNamedParameters")) { 3174 if (json.containsKey("hasNamedParameters")) {
2960 hasNamedParameters = jsonDecoder.decodeBool(jsonPath + ".hasNamedParamet ers", json["hasNamedParameters"]); 3175 hasNamedParameters = jsonDecoder.decodeBool(
3176 jsonPath + ".hasNamedParameters", json["hasNamedParameters"]);
2961 } 3177 }
2962 String parameterName; 3178 String parameterName;
2963 if (json.containsKey("parameterName")) { 3179 if (json.containsKey("parameterName")) {
2964 parameterName = jsonDecoder.decodeString(jsonPath + ".parameterName", js on["parameterName"]); 3180 parameterName = jsonDecoder.decodeString(
3181 jsonPath + ".parameterName", json["parameterName"]);
2965 } 3182 }
2966 String parameterType; 3183 String parameterType;
2967 if (json.containsKey("parameterType")) { 3184 if (json.containsKey("parameterType")) {
2968 parameterType = jsonDecoder.decodeString(jsonPath + ".parameterType", js on["parameterType"]); 3185 parameterType = jsonDecoder.decodeString(
3186 jsonPath + ".parameterType", json["parameterType"]);
2969 } 3187 }
2970 String importUri; 3188 String importUri;
2971 if (json.containsKey("importUri")) { 3189 if (json.containsKey("importUri")) {
2972 importUri = jsonDecoder.decodeString(jsonPath + ".importUri", json["impo rtUri"]); 3190 importUri = jsonDecoder.decodeString(
3191 jsonPath + ".importUri", json["importUri"]);
2973 } 3192 }
2974 return new CompletionSuggestion(kind, relevance, completion, selectionOffs et, selectionLength, isDeprecated, isPotential, docSummary: docSummary, docCompl ete: docComplete, declaringType: declaringType, defaultArgumentListString: defau ltArgumentListString, defaultArgumentListTextRanges: defaultArgumentListTextRang es, element: element, returnType: returnType, parameterNames: parameterNames, pa rameterTypes: parameterTypes, requiredParameterCount: requiredParameterCount, ha sNamedParameters: hasNamedParameters, parameterName: parameterName, parameterTyp e: parameterType, importUri: importUri); 3193 return new CompletionSuggestion(kind, relevance, completion,
3194 selectionOffset, selectionLength, isDeprecated, isPotential,
3195 docSummary: docSummary,
3196 docComplete: docComplete,
3197 declaringType: declaringType,
3198 defaultArgumentListString: defaultArgumentListString,
3199 defaultArgumentListTextRanges: defaultArgumentListTextRanges,
3200 element: element,
3201 returnType: returnType,
3202 parameterNames: parameterNames,
3203 parameterTypes: parameterTypes,
3204 requiredParameterCount: requiredParameterCount,
3205 hasNamedParameters: hasNamedParameters,
3206 parameterName: parameterName,
3207 parameterType: parameterType,
3208 importUri: importUri);
2975 } else { 3209 } else {
2976 throw jsonDecoder.mismatch(jsonPath, "CompletionSuggestion", json); 3210 throw jsonDecoder.mismatch(jsonPath, "CompletionSuggestion", json);
2977 } 3211 }
2978 } 3212 }
2979 3213
2980 @override 3214 @override
2981 Map<String, dynamic> toJson() { 3215 Map<String, dynamic> toJson() {
2982 Map<String, dynamic> result = {}; 3216 Map<String, dynamic> result = {};
2983 result["kind"] = kind.toJson(); 3217 result["kind"] = kind.toJson();
2984 result["relevance"] = relevance; 3218 result["relevance"] = relevance;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
3029 if (importUri != null) { 3263 if (importUri != null) {
3030 result["importUri"] = importUri; 3264 result["importUri"] = importUri;
3031 } 3265 }
3032 return result; 3266 return result;
3033 } 3267 }
3034 3268
3035 @override 3269 @override
3036 String toString() => JSON.encode(toJson()); 3270 String toString() => JSON.encode(toJson());
3037 3271
3038 @override 3272 @override
3039 bool operator==(other) { 3273 bool operator ==(other) {
3040 if (other is CompletionSuggestion) { 3274 if (other is CompletionSuggestion) {
3041 return kind == other.kind && 3275 return kind == other.kind &&
3042 relevance == other.relevance && 3276 relevance == other.relevance &&
3043 completion == other.completion && 3277 completion == other.completion &&
3044 selectionOffset == other.selectionOffset && 3278 selectionOffset == other.selectionOffset &&
3045 selectionLength == other.selectionLength && 3279 selectionLength == other.selectionLength &&
3046 isDeprecated == other.isDeprecated && 3280 isDeprecated == other.isDeprecated &&
3047 isPotential == other.isPotential && 3281 isPotential == other.isPotential &&
3048 docSummary == other.docSummary && 3282 docSummary == other.docSummary &&
3049 docComplete == other.docComplete && 3283 docComplete == other.docComplete &&
3050 declaringType == other.declaringType && 3284 declaringType == other.declaringType &&
3051 defaultArgumentListString == other.defaultArgumentListString && 3285 defaultArgumentListString == other.defaultArgumentListString &&
3052 listEqual(defaultArgumentListTextRanges, other.defaultArgumentListText Ranges, (int a, int b) => a == b) && 3286 listEqual(defaultArgumentListTextRanges,
3287 other.defaultArgumentListTextRanges, (int a, int b) => a == b) &&
3053 element == other.element && 3288 element == other.element &&
3054 returnType == other.returnType && 3289 returnType == other.returnType &&
3055 listEqual(parameterNames, other.parameterNames, (String a, String b) = > a == b) && 3290 listEqual(parameterNames, other.parameterNames,
3056 listEqual(parameterTypes, other.parameterTypes, (String a, String b) = > a == b) && 3291 (String a, String b) => a == b) &&
3292 listEqual(parameterTypes, other.parameterTypes,
3293 (String a, String b) => a == b) &&
3057 requiredParameterCount == other.requiredParameterCount && 3294 requiredParameterCount == other.requiredParameterCount &&
3058 hasNamedParameters == other.hasNamedParameters && 3295 hasNamedParameters == other.hasNamedParameters &&
3059 parameterName == other.parameterName && 3296 parameterName == other.parameterName &&
3060 parameterType == other.parameterType && 3297 parameterType == other.parameterType &&
3061 importUri == other.importUri; 3298 importUri == other.importUri;
3062 } 3299 }
3063 return false; 3300 return false;
3064 } 3301 }
3065 3302
3066 @override 3303 @override
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
3107 * 3344 *
3108 * Clients may not extend, implement or mix-in this class. 3345 * Clients may not extend, implement or mix-in this class.
3109 */ 3346 */
3110 class CompletionSuggestionKind implements Enum { 3347 class CompletionSuggestionKind implements Enum {
3111 /** 3348 /**
3112 * A list of arguments for the method or function that is being invoked. For 3349 * A list of arguments for the method or function that is being invoked. For
3113 * this suggestion kind, the completion field is a textual representation of 3350 * this suggestion kind, the completion field is a textual representation of
3114 * the invocation and the parameterNames, parameterTypes, and 3351 * the invocation and the parameterNames, parameterTypes, and
3115 * requiredParameterCount attributes are defined. 3352 * requiredParameterCount attributes are defined.
3116 */ 3353 */
3117 static const CompletionSuggestionKind ARGUMENT_LIST = const CompletionSuggesti onKind._("ARGUMENT_LIST"); 3354 static const CompletionSuggestionKind ARGUMENT_LIST =
3355 const CompletionSuggestionKind._("ARGUMENT_LIST");
3118 3356
3119 static const CompletionSuggestionKind IMPORT = const CompletionSuggestionKind. _("IMPORT"); 3357 static const CompletionSuggestionKind IMPORT =
3358 const CompletionSuggestionKind._("IMPORT");
3120 3359
3121 /** 3360 /**
3122 * The element identifier should be inserted at the completion location. For 3361 * The element identifier should be inserted at the completion location. For
3123 * example "someMethod" in import 'myLib.dart' show someMethod;. For 3362 * example "someMethod" in import 'myLib.dart' show someMethod;. For
3124 * suggestions of this kind, the element attribute is defined and the 3363 * suggestions of this kind, the element attribute is defined and the
3125 * completion field is the element's identifier. 3364 * completion field is the element's identifier.
3126 */ 3365 */
3127 static const CompletionSuggestionKind IDENTIFIER = const CompletionSuggestionK ind._("IDENTIFIER"); 3366 static const CompletionSuggestionKind IDENTIFIER =
3367 const CompletionSuggestionKind._("IDENTIFIER");
3128 3368
3129 /** 3369 /**
3130 * The element is being invoked at the completion location. For example, 3370 * The element is being invoked at the completion location. For example,
3131 * 'someMethod' in x.someMethod();. For suggestions of this kind, the element 3371 * 'someMethod' in x.someMethod();. For suggestions of this kind, the element
3132 * attribute is defined and the completion field is the element's identifier. 3372 * attribute is defined and the completion field is the element's identifier.
3133 */ 3373 */
3134 static const CompletionSuggestionKind INVOCATION = const CompletionSuggestionK ind._("INVOCATION"); 3374 static const CompletionSuggestionKind INVOCATION =
3375 const CompletionSuggestionKind._("INVOCATION");
3135 3376
3136 /** 3377 /**
3137 * A keyword is being suggested. For suggestions of this kind, the completion 3378 * A keyword is being suggested. For suggestions of this kind, the completion
3138 * is the keyword. 3379 * is the keyword.
3139 */ 3380 */
3140 static const CompletionSuggestionKind KEYWORD = const CompletionSuggestionKind ._("KEYWORD"); 3381 static const CompletionSuggestionKind KEYWORD =
3382 const CompletionSuggestionKind._("KEYWORD");
3141 3383
3142 /** 3384 /**
3143 * A named argument for the current call site is being suggested. For 3385 * A named argument for the current call site is being suggested. For
3144 * suggestions of this kind, the completion is the named argument identifier 3386 * suggestions of this kind, the completion is the named argument identifier
3145 * including a trailing ':' and a space. 3387 * including a trailing ':' and a space.
3146 */ 3388 */
3147 static const CompletionSuggestionKind NAMED_ARGUMENT = const CompletionSuggest ionKind._("NAMED_ARGUMENT"); 3389 static const CompletionSuggestionKind NAMED_ARGUMENT =
3390 const CompletionSuggestionKind._("NAMED_ARGUMENT");
3148 3391
3149 static const CompletionSuggestionKind OPTIONAL_ARGUMENT = const CompletionSugg estionKind._("OPTIONAL_ARGUMENT"); 3392 static const CompletionSuggestionKind OPTIONAL_ARGUMENT =
3393 const CompletionSuggestionKind._("OPTIONAL_ARGUMENT");
3150 3394
3151 static const CompletionSuggestionKind PARAMETER = const CompletionSuggestionKi nd._("PARAMETER"); 3395 static const CompletionSuggestionKind PARAMETER =
3396 const CompletionSuggestionKind._("PARAMETER");
3152 3397
3153 /** 3398 /**
3154 * A list containing all of the enum values that are defined. 3399 * A list containing all of the enum values that are defined.
3155 */ 3400 */
3156 static const List<CompletionSuggestionKind> VALUES = const <CompletionSuggesti onKind>[ARGUMENT_LIST, IMPORT, IDENTIFIER, INVOCATION, KEYWORD, NAMED_ARGUMENT, OPTIONAL_ARGUMENT, PARAMETER]; 3401 static const List<CompletionSuggestionKind> VALUES =
3402 const <CompletionSuggestionKind>[
3403 ARGUMENT_LIST,
3404 IMPORT,
3405 IDENTIFIER,
3406 INVOCATION,
3407 KEYWORD,
3408 NAMED_ARGUMENT,
3409 OPTIONAL_ARGUMENT,
3410 PARAMETER
3411 ];
3157 3412
3158 @override 3413 @override
3159 final String name; 3414 final String name;
3160 3415
3161 const CompletionSuggestionKind._(this.name); 3416 const CompletionSuggestionKind._(this.name);
3162 3417
3163 factory CompletionSuggestionKind(String name) { 3418 factory CompletionSuggestionKind(String name) {
3164 switch (name) { 3419 switch (name) {
3165 case "ARGUMENT_LIST": 3420 case "ARGUMENT_LIST":
3166 return ARGUMENT_LIST; 3421 return ARGUMENT_LIST;
3167 case "IMPORT": 3422 case "IMPORT":
3168 return IMPORT; 3423 return IMPORT;
3169 case "IDENTIFIER": 3424 case "IDENTIFIER":
3170 return IDENTIFIER; 3425 return IDENTIFIER;
3171 case "INVOCATION": 3426 case "INVOCATION":
3172 return INVOCATION; 3427 return INVOCATION;
3173 case "KEYWORD": 3428 case "KEYWORD":
3174 return KEYWORD; 3429 return KEYWORD;
3175 case "NAMED_ARGUMENT": 3430 case "NAMED_ARGUMENT":
3176 return NAMED_ARGUMENT; 3431 return NAMED_ARGUMENT;
3177 case "OPTIONAL_ARGUMENT": 3432 case "OPTIONAL_ARGUMENT":
3178 return OPTIONAL_ARGUMENT; 3433 return OPTIONAL_ARGUMENT;
3179 case "PARAMETER": 3434 case "PARAMETER":
3180 return PARAMETER; 3435 return PARAMETER;
3181 } 3436 }
3182 throw new Exception('Illegal enum value: $name'); 3437 throw new Exception('Illegal enum value: $name');
3183 } 3438 }
3184 3439
3185 factory CompletionSuggestionKind.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) { 3440 factory CompletionSuggestionKind.fromJson(
3441 JsonDecoder jsonDecoder, String jsonPath, Object json) {
3186 if (json is String) { 3442 if (json is String) {
3187 try { 3443 try {
3188 return new CompletionSuggestionKind(json); 3444 return new CompletionSuggestionKind(json);
3189 } catch(_) { 3445 } catch (_) {
3190 // Fall through 3446 // Fall through
3191 } 3447 }
3192 } 3448 }
3193 throw jsonDecoder.mismatch(jsonPath, "CompletionSuggestionKind", json); 3449 throw jsonDecoder.mismatch(jsonPath, "CompletionSuggestionKind", json);
3194 } 3450 }
3195 3451
3196 @override 3452 @override
3197 String toString() => "CompletionSuggestionKind.$name"; 3453 String toString() => "CompletionSuggestionKind.$name";
3198 3454
3199 String toJson() => name; 3455 String toJson() => name;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
3237 */ 3493 */
3238 void set dartSdkSummaryPath(String value) { 3494 void set dartSdkSummaryPath(String value) {
3239 this._dartSdkSummaryPath = value; 3495 this._dartSdkSummaryPath = value;
3240 } 3496 }
3241 3497
3242 /** 3498 /**
3243 * The file path of the analysis options file that should be used in place of 3499 * The file path of the analysis options file that should be used in place of
3244 * any file in the root directory or a parent of the root directory. The 3500 * any file in the root directory or a parent of the root directory. The
3245 * field will be omitted if the normal lookup mechanism should be used. 3501 * field will be omitted if the normal lookup mechanism should be used.
3246 */ 3502 */
3247 List<String> get defaultAnalysisOptionsFilePath => _defaultAnalysisOptionsFile Path; 3503 List<String> get defaultAnalysisOptionsFilePath =>
3504 _defaultAnalysisOptionsFilePath;
3248 3505
3249 /** 3506 /**
3250 * The file path of the analysis options file that should be used in place of 3507 * The file path of the analysis options file that should be used in place of
3251 * any file in the root directory or a parent of the root directory. The 3508 * any file in the root directory or a parent of the root directory. The
3252 * field will be omitted if the normal lookup mechanism should be used. 3509 * field will be omitted if the normal lookup mechanism should be used.
3253 */ 3510 */
3254 void set defaultAnalysisOptionsFilePath(List<String> value) { 3511 void set defaultAnalysisOptionsFilePath(List<String> value) {
3255 this._defaultAnalysisOptionsFilePath = value; 3512 this._defaultAnalysisOptionsFilePath = value;
3256 } 3513 }
3257 3514
(...skipping 26 matching lines...) Expand all
3284 void set defaultPackageFilePath(List<String> value) { 3541 void set defaultPackageFilePath(List<String> value) {
3285 this._defaultPackageFilePath = value; 3542 this._defaultPackageFilePath = value;
3286 } 3543 }
3287 3544
3288 /** 3545 /**
3289 * The file path of the packages directory that should be used in place of 3546 * The file path of the packages directory that should be used in place of
3290 * any file found using the normal (Package Specification DEP) lookup 3547 * any file found using the normal (Package Specification DEP) lookup
3291 * mechanism. The field will be omitted if the normal lookup mechanism should 3548 * mechanism. The field will be omitted if the normal lookup mechanism should
3292 * be used. 3549 * be used.
3293 */ 3550 */
3294 List<String> get defaultPackagesDirectoryPath => _defaultPackagesDirectoryPath ; 3551 List<String> get defaultPackagesDirectoryPath =>
3552 _defaultPackagesDirectoryPath;
3295 3553
3296 /** 3554 /**
3297 * The file path of the packages directory that should be used in place of 3555 * The file path of the packages directory that should be used in place of
3298 * any file found using the normal (Package Specification DEP) lookup 3556 * any file found using the normal (Package Specification DEP) lookup
3299 * mechanism. The field will be omitted if the normal lookup mechanism should 3557 * mechanism. The field will be omitted if the normal lookup mechanism should
3300 * be used. 3558 * be used.
3301 */ 3559 */
3302 void set defaultPackagesDirectoryPath(List<String> value) { 3560 void set defaultPackagesDirectoryPath(List<String> value) {
3303 this._defaultPackagesDirectoryPath = value; 3561 this._defaultPackagesDirectoryPath = value;
3304 } 3562 }
3305 3563
3306 ContextBuilderOptions({String dartSdkSummaryPath, List<String> defaultAnalysis OptionsFilePath, Map<String, String> declaredVariables, List<String> defaultPack ageFilePath, List<String> defaultPackagesDirectoryPath}) { 3564 ContextBuilderOptions(
3565 {String dartSdkSummaryPath,
3566 List<String> defaultAnalysisOptionsFilePath,
3567 Map<String, String> declaredVariables,
3568 List<String> defaultPackageFilePath,
3569 List<String> defaultPackagesDirectoryPath}) {
3307 this.dartSdkSummaryPath = dartSdkSummaryPath; 3570 this.dartSdkSummaryPath = dartSdkSummaryPath;
3308 this.defaultAnalysisOptionsFilePath = defaultAnalysisOptionsFilePath; 3571 this.defaultAnalysisOptionsFilePath = defaultAnalysisOptionsFilePath;
3309 this.declaredVariables = declaredVariables; 3572 this.declaredVariables = declaredVariables;
3310 this.defaultPackageFilePath = defaultPackageFilePath; 3573 this.defaultPackageFilePath = defaultPackageFilePath;
3311 this.defaultPackagesDirectoryPath = defaultPackagesDirectoryPath; 3574 this.defaultPackagesDirectoryPath = defaultPackagesDirectoryPath;
3312 } 3575 }
3313 3576
3314 factory ContextBuilderOptions.fromJson(JsonDecoder jsonDecoder, String jsonPat h, Object json) { 3577 factory ContextBuilderOptions.fromJson(
3578 JsonDecoder jsonDecoder, String jsonPath, Object json) {
3315 if (json == null) { 3579 if (json == null) {
3316 json = {}; 3580 json = {};
3317 } 3581 }
3318 if (json is Map) { 3582 if (json is Map) {
3319 String dartSdkSummaryPath; 3583 String dartSdkSummaryPath;
3320 if (json.containsKey("dartSdkSummaryPath")) { 3584 if (json.containsKey("dartSdkSummaryPath")) {
3321 dartSdkSummaryPath = jsonDecoder.decodeString(jsonPath + ".dartSdkSummar yPath", json["dartSdkSummaryPath"]); 3585 dartSdkSummaryPath = jsonDecoder.decodeString(
3586 jsonPath + ".dartSdkSummaryPath", json["dartSdkSummaryPath"]);
3322 } 3587 }
3323 List<String> defaultAnalysisOptionsFilePath; 3588 List<String> defaultAnalysisOptionsFilePath;
3324 if (json.containsKey("defaultAnalysisOptionsFilePath")) { 3589 if (json.containsKey("defaultAnalysisOptionsFilePath")) {
3325 defaultAnalysisOptionsFilePath = jsonDecoder.decodeList(jsonPath + ".def aultAnalysisOptionsFilePath", json["defaultAnalysisOptionsFilePath"], jsonDecode r.decodeString); 3590 defaultAnalysisOptionsFilePath = jsonDecoder.decodeList(
3591 jsonPath + ".defaultAnalysisOptionsFilePath",
3592 json["defaultAnalysisOptionsFilePath"],
3593 jsonDecoder.decodeString);
3326 } 3594 }
3327 Map<String, String> declaredVariables; 3595 Map<String, String> declaredVariables;
3328 if (json.containsKey("declaredVariables")) { 3596 if (json.containsKey("declaredVariables")) {
3329 declaredVariables = jsonDecoder.decodeMap(jsonPath + ".declaredVariables ", json["declaredVariables"], valueDecoder: jsonDecoder.decodeString); 3597 declaredVariables = jsonDecoder.decodeMap(
3598 jsonPath + ".declaredVariables", json["declaredVariables"],
3599 valueDecoder: jsonDecoder.decodeString);
3330 } 3600 }
3331 List<String> defaultPackageFilePath; 3601 List<String> defaultPackageFilePath;
3332 if (json.containsKey("defaultPackageFilePath")) { 3602 if (json.containsKey("defaultPackageFilePath")) {
3333 defaultPackageFilePath = jsonDecoder.decodeList(jsonPath + ".defaultPack ageFilePath", json["defaultPackageFilePath"], jsonDecoder.decodeString); 3603 defaultPackageFilePath = jsonDecoder.decodeList(
3604 jsonPath + ".defaultPackageFilePath",
3605 json["defaultPackageFilePath"],
3606 jsonDecoder.decodeString);
3334 } 3607 }
3335 List<String> defaultPackagesDirectoryPath; 3608 List<String> defaultPackagesDirectoryPath;
3336 if (json.containsKey("defaultPackagesDirectoryPath")) { 3609 if (json.containsKey("defaultPackagesDirectoryPath")) {
3337 defaultPackagesDirectoryPath = jsonDecoder.decodeList(jsonPath + ".defau ltPackagesDirectoryPath", json["defaultPackagesDirectoryPath"], jsonDecoder.deco deString); 3610 defaultPackagesDirectoryPath = jsonDecoder.decodeList(
3611 jsonPath + ".defaultPackagesDirectoryPath",
3612 json["defaultPackagesDirectoryPath"],
3613 jsonDecoder.decodeString);
3338 } 3614 }
3339 return new ContextBuilderOptions(dartSdkSummaryPath: dartSdkSummaryPath, d efaultAnalysisOptionsFilePath: defaultAnalysisOptionsFilePath, declaredVariables : declaredVariables, defaultPackageFilePath: defaultPackageFilePath, defaultPack agesDirectoryPath: defaultPackagesDirectoryPath); 3615 return new ContextBuilderOptions(
3616 dartSdkSummaryPath: dartSdkSummaryPath,
3617 defaultAnalysisOptionsFilePath: defaultAnalysisOptionsFilePath,
3618 declaredVariables: declaredVariables,
3619 defaultPackageFilePath: defaultPackageFilePath,
3620 defaultPackagesDirectoryPath: defaultPackagesDirectoryPath);
3340 } else { 3621 } else {
3341 throw jsonDecoder.mismatch(jsonPath, "ContextBuilderOptions", json); 3622 throw jsonDecoder.mismatch(jsonPath, "ContextBuilderOptions", json);
3342 } 3623 }
3343 } 3624 }
3344 3625
3345 @override 3626 @override
3346 Map<String, dynamic> toJson() { 3627 Map<String, dynamic> toJson() {
3347 Map<String, dynamic> result = {}; 3628 Map<String, dynamic> result = {};
3348 if (dartSdkSummaryPath != null) { 3629 if (dartSdkSummaryPath != null) {
3349 result["dartSdkSummaryPath"] = dartSdkSummaryPath; 3630 result["dartSdkSummaryPath"] = dartSdkSummaryPath;
(...skipping 10 matching lines...) Expand all
3360 if (defaultPackagesDirectoryPath != null) { 3641 if (defaultPackagesDirectoryPath != null) {
3361 result["defaultPackagesDirectoryPath"] = defaultPackagesDirectoryPath; 3642 result["defaultPackagesDirectoryPath"] = defaultPackagesDirectoryPath;
3362 } 3643 }
3363 return result; 3644 return result;
3364 } 3645 }
3365 3646
3366 @override 3647 @override
3367 String toString() => JSON.encode(toJson()); 3648 String toString() => JSON.encode(toJson());
3368 3649
3369 @override 3650 @override
3370 bool operator==(other) { 3651 bool operator ==(other) {
3371 if (other is ContextBuilderOptions) { 3652 if (other is ContextBuilderOptions) {
3372 return dartSdkSummaryPath == other.dartSdkSummaryPath && 3653 return dartSdkSummaryPath == other.dartSdkSummaryPath &&
3373 listEqual(defaultAnalysisOptionsFilePath, other.defaultAnalysisOptions FilePath, (String a, String b) => a == b) && 3654 listEqual(
3374 mapEqual(declaredVariables, other.declaredVariables, (String a, String b) => a == b) && 3655 defaultAnalysisOptionsFilePath,
3375 listEqual(defaultPackageFilePath, other.defaultPackageFilePath, (Strin g a, String b) => a == b) && 3656 other.defaultAnalysisOptionsFilePath,
3376 listEqual(defaultPackagesDirectoryPath, other.defaultPackagesDirectory Path, (String a, String b) => a == b); 3657 (String a, String b) => a == b) &&
3658 mapEqual(declaredVariables, other.declaredVariables,
3659 (String a, String b) => a == b) &&
3660 listEqual(defaultPackageFilePath, other.defaultPackageFilePath,
3661 (String a, String b) => a == b) &&
3662 listEqual(
3663 defaultPackagesDirectoryPath,
3664 other.defaultPackagesDirectoryPath,
3665 (String a, String b) => a == b);
3377 } 3666 }
3378 return false; 3667 return false;
3379 } 3668 }
3380 3669
3381 @override 3670 @override
3382 int get hashCode { 3671 int get hashCode {
3383 int hash = 0; 3672 int hash = 0;
3384 hash = JenkinsSmiHash.combine(hash, dartSdkSummaryPath.hashCode); 3673 hash = JenkinsSmiHash.combine(hash, dartSdkSummaryPath.hashCode);
3385 hash = JenkinsSmiHash.combine(hash, defaultAnalysisOptionsFilePath.hashCode) ; 3674 hash =
3675 JenkinsSmiHash.combine(hash, defaultAnalysisOptionsFilePath.hashCode);
3386 hash = JenkinsSmiHash.combine(hash, declaredVariables.hashCode); 3676 hash = JenkinsSmiHash.combine(hash, declaredVariables.hashCode);
3387 hash = JenkinsSmiHash.combine(hash, defaultPackageFilePath.hashCode); 3677 hash = JenkinsSmiHash.combine(hash, defaultPackageFilePath.hashCode);
3388 hash = JenkinsSmiHash.combine(hash, defaultPackagesDirectoryPath.hashCode); 3678 hash = JenkinsSmiHash.combine(hash, defaultPackagesDirectoryPath.hashCode);
3389 return JenkinsSmiHash.finish(hash); 3679 return JenkinsSmiHash.finish(hash);
3390 } 3680 }
3391 } 3681 }
3392 3682
3393 /** 3683 /**
3394 * ContextRoot 3684 * ContextRoot
3395 * 3685 *
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
3433 void set exclude(List<String> value) { 3723 void set exclude(List<String> value) {
3434 assert(value != null); 3724 assert(value != null);
3435 this._exclude = value; 3725 this._exclude = value;
3436 } 3726 }
3437 3727
3438 ContextRoot(String root, List<String> exclude) { 3728 ContextRoot(String root, List<String> exclude) {
3439 this.root = root; 3729 this.root = root;
3440 this.exclude = exclude; 3730 this.exclude = exclude;
3441 } 3731 }
3442 3732
3443 factory ContextRoot.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 3733 factory ContextRoot.fromJson(
3734 JsonDecoder jsonDecoder, String jsonPath, Object json) {
3444 if (json == null) { 3735 if (json == null) {
3445 json = {}; 3736 json = {};
3446 } 3737 }
3447 if (json is Map) { 3738 if (json is Map) {
3448 String root; 3739 String root;
3449 if (json.containsKey("root")) { 3740 if (json.containsKey("root")) {
3450 root = jsonDecoder.decodeString(jsonPath + ".root", json["root"]); 3741 root = jsonDecoder.decodeString(jsonPath + ".root", json["root"]);
3451 } else { 3742 } else {
3452 throw jsonDecoder.mismatch(jsonPath, "root"); 3743 throw jsonDecoder.mismatch(jsonPath, "root");
3453 } 3744 }
3454 List<String> exclude; 3745 List<String> exclude;
3455 if (json.containsKey("exclude")) { 3746 if (json.containsKey("exclude")) {
3456 exclude = jsonDecoder.decodeList(jsonPath + ".exclude", json["exclude"], jsonDecoder.decodeString); 3747 exclude = jsonDecoder.decodeList(
3748 jsonPath + ".exclude", json["exclude"], jsonDecoder.decodeString);
3457 } else { 3749 } else {
3458 throw jsonDecoder.mismatch(jsonPath, "exclude"); 3750 throw jsonDecoder.mismatch(jsonPath, "exclude");
3459 } 3751 }
3460 return new ContextRoot(root, exclude); 3752 return new ContextRoot(root, exclude);
3461 } else { 3753 } else {
3462 throw jsonDecoder.mismatch(jsonPath, "ContextRoot", json); 3754 throw jsonDecoder.mismatch(jsonPath, "ContextRoot", json);
3463 } 3755 }
3464 } 3756 }
3465 3757
3466 @override 3758 @override
3467 Map<String, dynamic> toJson() { 3759 Map<String, dynamic> toJson() {
3468 Map<String, dynamic> result = {}; 3760 Map<String, dynamic> result = {};
3469 result["root"] = root; 3761 result["root"] = root;
3470 result["exclude"] = exclude; 3762 result["exclude"] = exclude;
3471 return result; 3763 return result;
3472 } 3764 }
3473 3765
3474 @override 3766 @override
3475 String toString() => JSON.encode(toJson()); 3767 String toString() => JSON.encode(toJson());
3476 3768
3477 @override 3769 @override
3478 bool operator==(other) { 3770 bool operator ==(other) {
3479 if (other is ContextRoot) { 3771 if (other is ContextRoot) {
3480 return root == other.root && 3772 return root == other.root &&
3481 listEqual(exclude, other.exclude, (String a, String b) => a == b); 3773 listEqual(exclude, other.exclude, (String a, String b) => a == b);
3482 } 3774 }
3483 return false; 3775 return false;
3484 } 3776 }
3485 3777
3486 @override 3778 @override
3487 int get hashCode { 3779 int get hashCode {
3488 int hash = 0; 3780 int hash = 0;
3489 hash = JenkinsSmiHash.combine(hash, root.hashCode); 3781 hash = JenkinsSmiHash.combine(hash, root.hashCode);
3490 hash = JenkinsSmiHash.combine(hash, exclude.hashCode); 3782 hash = JenkinsSmiHash.combine(hash, exclude.hashCode);
3491 return JenkinsSmiHash.finish(hash); 3783 return JenkinsSmiHash.finish(hash);
3492 } 3784 }
3493 } 3785 }
3494 3786
3495 /** 3787 /**
3496 * convertGetterToMethod feedback 3788 * convertGetterToMethod feedback
3497 * 3789 *
3498 * Clients may not extend, implement or mix-in this class. 3790 * Clients may not extend, implement or mix-in this class.
3499 */ 3791 */
3500 class ConvertGetterToMethodFeedback extends RefactoringFeedback implements HasTo Json { 3792 class ConvertGetterToMethodFeedback extends RefactoringFeedback
3793 implements HasToJson {
3501 @override 3794 @override
3502 bool operator==(other) { 3795 bool operator ==(other) {
3503 if (other is ConvertGetterToMethodFeedback) { 3796 if (other is ConvertGetterToMethodFeedback) {
3504 return true; 3797 return true;
3505 } 3798 }
3506 return false; 3799 return false;
3507 } 3800 }
3508 3801
3509 @override 3802 @override
3510 int get hashCode { 3803 int get hashCode {
3511 return 616032599; 3804 return 616032599;
3512 } 3805 }
3513 } 3806 }
3514 3807
3515 /** 3808 /**
3516 * convertGetterToMethod options 3809 * convertGetterToMethod options
3517 * 3810 *
3518 * Clients may not extend, implement or mix-in this class. 3811 * Clients may not extend, implement or mix-in this class.
3519 */ 3812 */
3520 class ConvertGetterToMethodOptions extends RefactoringOptions implements HasToJs on { 3813 class ConvertGetterToMethodOptions extends RefactoringOptions
3814 implements HasToJson {
3521 @override 3815 @override
3522 bool operator==(other) { 3816 bool operator ==(other) {
3523 if (other is ConvertGetterToMethodOptions) { 3817 if (other is ConvertGetterToMethodOptions) {
3524 return true; 3818 return true;
3525 } 3819 }
3526 return false; 3820 return false;
3527 } 3821 }
3528 3822
3529 @override 3823 @override
3530 int get hashCode { 3824 int get hashCode {
3531 return 488848400; 3825 return 488848400;
3532 } 3826 }
3533 } 3827 }
3534 3828
3535 /** 3829 /**
3536 * convertMethodToGetter feedback 3830 * convertMethodToGetter feedback
3537 * 3831 *
3538 * Clients may not extend, implement or mix-in this class. 3832 * Clients may not extend, implement or mix-in this class.
3539 */ 3833 */
3540 class ConvertMethodToGetterFeedback extends RefactoringFeedback implements HasTo Json { 3834 class ConvertMethodToGetterFeedback extends RefactoringFeedback
3835 implements HasToJson {
3541 @override 3836 @override
3542 bool operator==(other) { 3837 bool operator ==(other) {
3543 if (other is ConvertMethodToGetterFeedback) { 3838 if (other is ConvertMethodToGetterFeedback) {
3544 return true; 3839 return true;
3545 } 3840 }
3546 return false; 3841 return false;
3547 } 3842 }
3548 3843
3549 @override 3844 @override
3550 int get hashCode { 3845 int get hashCode {
3551 return 165291526; 3846 return 165291526;
3552 } 3847 }
3553 } 3848 }
3554 3849
3555 /** 3850 /**
3556 * convertMethodToGetter options 3851 * convertMethodToGetter options
3557 * 3852 *
3558 * Clients may not extend, implement or mix-in this class. 3853 * Clients may not extend, implement or mix-in this class.
3559 */ 3854 */
3560 class ConvertMethodToGetterOptions extends RefactoringOptions implements HasToJs on { 3855 class ConvertMethodToGetterOptions extends RefactoringOptions
3856 implements HasToJson {
3561 @override 3857 @override
3562 bool operator==(other) { 3858 bool operator ==(other) {
3563 if (other is ConvertMethodToGetterOptions) { 3859 if (other is ConvertMethodToGetterOptions) {
3564 return true; 3860 return true;
3565 } 3861 }
3566 return false; 3862 return false;
3567 } 3863 }
3568 3864
3569 @override 3865 @override
3570 int get hashCode { 3866 int get hashCode {
3571 return 27952290; 3867 return 27952290;
3572 } 3868 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
3628 assert(value != null); 3924 assert(value != null);
3629 this._length = value; 3925 this._length = value;
3630 } 3926 }
3631 3927
3632 EditGetAssistsParams(String file, int offset, int length) { 3928 EditGetAssistsParams(String file, int offset, int length) {
3633 this.file = file; 3929 this.file = file;
3634 this.offset = offset; 3930 this.offset = offset;
3635 this.length = length; 3931 this.length = length;
3636 } 3932 }
3637 3933
3638 factory EditGetAssistsParams.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) { 3934 factory EditGetAssistsParams.fromJson(
3935 JsonDecoder jsonDecoder, String jsonPath, Object json) {
3639 if (json == null) { 3936 if (json == null) {
3640 json = {}; 3937 json = {};
3641 } 3938 }
3642 if (json is Map) { 3939 if (json is Map) {
3643 String file; 3940 String file;
3644 if (json.containsKey("file")) { 3941 if (json.containsKey("file")) {
3645 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); 3942 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
3646 } else { 3943 } else {
3647 throw jsonDecoder.mismatch(jsonPath, "file"); 3944 throw jsonDecoder.mismatch(jsonPath, "file");
3648 } 3945 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
3680 3977
3681 @override 3978 @override
3682 Request toRequest(String id) { 3979 Request toRequest(String id) {
3683 return new Request(id, "edit.getAssists", toJson()); 3980 return new Request(id, "edit.getAssists", toJson());
3684 } 3981 }
3685 3982
3686 @override 3983 @override
3687 String toString() => JSON.encode(toJson()); 3984 String toString() => JSON.encode(toJson());
3688 3985
3689 @override 3986 @override
3690 bool operator==(other) { 3987 bool operator ==(other) {
3691 if (other is EditGetAssistsParams) { 3988 if (other is EditGetAssistsParams) {
3692 return file == other.file && 3989 return file == other.file &&
3693 offset == other.offset && 3990 offset == other.offset &&
3694 length == other.length; 3991 length == other.length;
3695 } 3992 }
3696 return false; 3993 return false;
3697 } 3994 }
3698 3995
3699 @override 3996 @override
3700 int get hashCode { 3997 int get hashCode {
(...skipping 27 matching lines...) Expand all
3728 */ 4025 */
3729 void set assists(List<PrioritizedSourceChange> value) { 4026 void set assists(List<PrioritizedSourceChange> value) {
3730 assert(value != null); 4027 assert(value != null);
3731 this._assists = value; 4028 this._assists = value;
3732 } 4029 }
3733 4030
3734 EditGetAssistsResult(List<PrioritizedSourceChange> assists) { 4031 EditGetAssistsResult(List<PrioritizedSourceChange> assists) {
3735 this.assists = assists; 4032 this.assists = assists;
3736 } 4033 }
3737 4034
3738 factory EditGetAssistsResult.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) { 4035 factory EditGetAssistsResult.fromJson(
4036 JsonDecoder jsonDecoder, String jsonPath, Object json) {
3739 if (json == null) { 4037 if (json == null) {
3740 json = {}; 4038 json = {};
3741 } 4039 }
3742 if (json is Map) { 4040 if (json is Map) {
3743 List<PrioritizedSourceChange> assists; 4041 List<PrioritizedSourceChange> assists;
3744 if (json.containsKey("assists")) { 4042 if (json.containsKey("assists")) {
3745 assists = jsonDecoder.decodeList(jsonPath + ".assists", json["assists"], (String jsonPath, Object json) => new PrioritizedSourceChange.fromJson(jsonDeco der, jsonPath, json)); 4043 assists = jsonDecoder.decodeList(
4044 jsonPath + ".assists",
4045 json["assists"],
4046 (String jsonPath, Object json) =>
4047 new PrioritizedSourceChange.fromJson(
4048 jsonDecoder, jsonPath, json));
3746 } else { 4049 } else {
3747 throw jsonDecoder.mismatch(jsonPath, "assists"); 4050 throw jsonDecoder.mismatch(jsonPath, "assists");
3748 } 4051 }
3749 return new EditGetAssistsResult(assists); 4052 return new EditGetAssistsResult(assists);
3750 } else { 4053 } else {
3751 throw jsonDecoder.mismatch(jsonPath, "edit.getAssists result", json); 4054 throw jsonDecoder.mismatch(jsonPath, "edit.getAssists result", json);
3752 } 4055 }
3753 } 4056 }
3754 4057
3755 factory EditGetAssistsResult.fromResponse(Response response) { 4058 factory EditGetAssistsResult.fromResponse(Response response) {
3756 return new EditGetAssistsResult.fromJson( 4059 return new EditGetAssistsResult.fromJson(
3757 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), " result", response.result); 4060 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
4061 "result",
4062 response.result);
3758 } 4063 }
3759 4064
3760 @override 4065 @override
3761 Map<String, dynamic> toJson() { 4066 Map<String, dynamic> toJson() {
3762 Map<String, dynamic> result = {}; 4067 Map<String, dynamic> result = {};
3763 result["assists"] = assists.map((PrioritizedSourceChange value) => value.toJ son()).toList(); 4068 result["assists"] =
4069 assists.map((PrioritizedSourceChange value) => value.toJson()).toList();
3764 return result; 4070 return result;
3765 } 4071 }
3766 4072
3767 @override 4073 @override
3768 Response toResponse(String id) { 4074 Response toResponse(String id) {
3769 return new Response(id, result: toJson()); 4075 return new Response(id, result: toJson());
3770 } 4076 }
3771 4077
3772 @override 4078 @override
3773 String toString() => JSON.encode(toJson()); 4079 String toString() => JSON.encode(toJson());
3774 4080
3775 @override 4081 @override
3776 bool operator==(other) { 4082 bool operator ==(other) {
3777 if (other is EditGetAssistsResult) { 4083 if (other is EditGetAssistsResult) {
3778 return listEqual(assists, other.assists, (PrioritizedSourceChange a, Prior itizedSourceChange b) => a == b); 4084 return listEqual(assists, other.assists,
4085 (PrioritizedSourceChange a, PrioritizedSourceChange b) => a == b);
3779 } 4086 }
3780 return false; 4087 return false;
3781 } 4088 }
3782 4089
3783 @override 4090 @override
3784 int get hashCode { 4091 int get hashCode {
3785 int hash = 0; 4092 int hash = 0;
3786 hash = JenkinsSmiHash.combine(hash, assists.hashCode); 4093 hash = JenkinsSmiHash.combine(hash, assists.hashCode);
3787 return JenkinsSmiHash.finish(hash); 4094 return JenkinsSmiHash.finish(hash);
3788 } 4095 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
3844 assert(value != null); 4151 assert(value != null);
3845 this._length = value; 4152 this._length = value;
3846 } 4153 }
3847 4154
3848 EditGetAvailableRefactoringsParams(String file, int offset, int length) { 4155 EditGetAvailableRefactoringsParams(String file, int offset, int length) {
3849 this.file = file; 4156 this.file = file;
3850 this.offset = offset; 4157 this.offset = offset;
3851 this.length = length; 4158 this.length = length;
3852 } 4159 }
3853 4160
3854 factory EditGetAvailableRefactoringsParams.fromJson(JsonDecoder jsonDecoder, S tring jsonPath, Object json) { 4161 factory EditGetAvailableRefactoringsParams.fromJson(
4162 JsonDecoder jsonDecoder, String jsonPath, Object json) {
3855 if (json == null) { 4163 if (json == null) {
3856 json = {}; 4164 json = {};
3857 } 4165 }
3858 if (json is Map) { 4166 if (json is Map) {
3859 String file; 4167 String file;
3860 if (json.containsKey("file")) { 4168 if (json.containsKey("file")) {
3861 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); 4169 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
3862 } else { 4170 } else {
3863 throw jsonDecoder.mismatch(jsonPath, "file"); 4171 throw jsonDecoder.mismatch(jsonPath, "file");
3864 } 4172 }
3865 int offset; 4173 int offset;
3866 if (json.containsKey("offset")) { 4174 if (json.containsKey("offset")) {
3867 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); 4175 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
3868 } else { 4176 } else {
3869 throw jsonDecoder.mismatch(jsonPath, "offset"); 4177 throw jsonDecoder.mismatch(jsonPath, "offset");
3870 } 4178 }
3871 int length; 4179 int length;
3872 if (json.containsKey("length")) { 4180 if (json.containsKey("length")) {
3873 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]); 4181 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
3874 } else { 4182 } else {
3875 throw jsonDecoder.mismatch(jsonPath, "length"); 4183 throw jsonDecoder.mismatch(jsonPath, "length");
3876 } 4184 }
3877 return new EditGetAvailableRefactoringsParams(file, offset, length); 4185 return new EditGetAvailableRefactoringsParams(file, offset, length);
3878 } else { 4186 } else {
3879 throw jsonDecoder.mismatch(jsonPath, "edit.getAvailableRefactorings params ", json); 4187 throw jsonDecoder.mismatch(
4188 jsonPath, "edit.getAvailableRefactorings params", json);
3880 } 4189 }
3881 } 4190 }
3882 4191
3883 factory EditGetAvailableRefactoringsParams.fromRequest(Request request) { 4192 factory EditGetAvailableRefactoringsParams.fromRequest(Request request) {
3884 return new EditGetAvailableRefactoringsParams.fromJson( 4193 return new EditGetAvailableRefactoringsParams.fromJson(
3885 new RequestDecoder(request), "params", request.params); 4194 new RequestDecoder(request), "params", request.params);
3886 } 4195 }
3887 4196
3888 @override 4197 @override
3889 Map<String, dynamic> toJson() { 4198 Map<String, dynamic> toJson() {
3890 Map<String, dynamic> result = {}; 4199 Map<String, dynamic> result = {};
3891 result["file"] = file; 4200 result["file"] = file;
3892 result["offset"] = offset; 4201 result["offset"] = offset;
3893 result["length"] = length; 4202 result["length"] = length;
3894 return result; 4203 return result;
3895 } 4204 }
3896 4205
3897 @override 4206 @override
3898 Request toRequest(String id) { 4207 Request toRequest(String id) {
3899 return new Request(id, "edit.getAvailableRefactorings", toJson()); 4208 return new Request(id, "edit.getAvailableRefactorings", toJson());
3900 } 4209 }
3901 4210
3902 @override 4211 @override
3903 String toString() => JSON.encode(toJson()); 4212 String toString() => JSON.encode(toJson());
3904 4213
3905 @override 4214 @override
3906 bool operator==(other) { 4215 bool operator ==(other) {
3907 if (other is EditGetAvailableRefactoringsParams) { 4216 if (other is EditGetAvailableRefactoringsParams) {
3908 return file == other.file && 4217 return file == other.file &&
3909 offset == other.offset && 4218 offset == other.offset &&
3910 length == other.length; 4219 length == other.length;
3911 } 4220 }
3912 return false; 4221 return false;
3913 } 4222 }
3914 4223
3915 @override 4224 @override
3916 int get hashCode { 4225 int get hashCode {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
3954 */ 4263 */
3955 void set kinds(List<RefactoringKind> value) { 4264 void set kinds(List<RefactoringKind> value) {
3956 assert(value != null); 4265 assert(value != null);
3957 this._kinds = value; 4266 this._kinds = value;
3958 } 4267 }
3959 4268
3960 EditGetAvailableRefactoringsResult(List<RefactoringKind> kinds) { 4269 EditGetAvailableRefactoringsResult(List<RefactoringKind> kinds) {
3961 this.kinds = kinds; 4270 this.kinds = kinds;
3962 } 4271 }
3963 4272
3964 factory EditGetAvailableRefactoringsResult.fromJson(JsonDecoder jsonDecoder, S tring jsonPath, Object json) { 4273 factory EditGetAvailableRefactoringsResult.fromJson(
4274 JsonDecoder jsonDecoder, String jsonPath, Object json) {
3965 if (json == null) { 4275 if (json == null) {
3966 json = {}; 4276 json = {};
3967 } 4277 }
3968 if (json is Map) { 4278 if (json is Map) {
3969 List<RefactoringKind> kinds; 4279 List<RefactoringKind> kinds;
3970 if (json.containsKey("kinds")) { 4280 if (json.containsKey("kinds")) {
3971 kinds = jsonDecoder.decodeList(jsonPath + ".kinds", json["kinds"], (Stri ng jsonPath, Object json) => new RefactoringKind.fromJson(jsonDecoder, jsonPath, json)); 4281 kinds = jsonDecoder.decodeList(
4282 jsonPath + ".kinds",
4283 json["kinds"],
4284 (String jsonPath, Object json) =>
4285 new RefactoringKind.fromJson(jsonDecoder, jsonPath, json));
3972 } else { 4286 } else {
3973 throw jsonDecoder.mismatch(jsonPath, "kinds"); 4287 throw jsonDecoder.mismatch(jsonPath, "kinds");
3974 } 4288 }
3975 return new EditGetAvailableRefactoringsResult(kinds); 4289 return new EditGetAvailableRefactoringsResult(kinds);
3976 } else { 4290 } else {
3977 throw jsonDecoder.mismatch(jsonPath, "edit.getAvailableRefactorings result ", json); 4291 throw jsonDecoder.mismatch(
4292 jsonPath, "edit.getAvailableRefactorings result", json);
3978 } 4293 }
3979 } 4294 }
3980 4295
3981 factory EditGetAvailableRefactoringsResult.fromResponse(Response response) { 4296 factory EditGetAvailableRefactoringsResult.fromResponse(Response response) {
3982 return new EditGetAvailableRefactoringsResult.fromJson( 4297 return new EditGetAvailableRefactoringsResult.fromJson(
3983 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), " result", response.result); 4298 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
4299 "result",
4300 response.result);
3984 } 4301 }
3985 4302
3986 @override 4303 @override
3987 Map<String, dynamic> toJson() { 4304 Map<String, dynamic> toJson() {
3988 Map<String, dynamic> result = {}; 4305 Map<String, dynamic> result = {};
3989 result["kinds"] = kinds.map((RefactoringKind value) => value.toJson()).toLis t(); 4306 result["kinds"] =
4307 kinds.map((RefactoringKind value) => value.toJson()).toList();
3990 return result; 4308 return result;
3991 } 4309 }
3992 4310
3993 @override 4311 @override
3994 Response toResponse(String id) { 4312 Response toResponse(String id) {
3995 return new Response(id, result: toJson()); 4313 return new Response(id, result: toJson());
3996 } 4314 }
3997 4315
3998 @override 4316 @override
3999 String toString() => JSON.encode(toJson()); 4317 String toString() => JSON.encode(toJson());
4000 4318
4001 @override 4319 @override
4002 bool operator==(other) { 4320 bool operator ==(other) {
4003 if (other is EditGetAvailableRefactoringsResult) { 4321 if (other is EditGetAvailableRefactoringsResult) {
4004 return listEqual(kinds, other.kinds, (RefactoringKind a, RefactoringKind b ) => a == b); 4322 return listEqual(
4323 kinds, other.kinds, (RefactoringKind a, RefactoringKind b) => a == b);
4005 } 4324 }
4006 return false; 4325 return false;
4007 } 4326 }
4008 4327
4009 @override 4328 @override
4010 int get hashCode { 4329 int get hashCode {
4011 int hash = 0; 4330 int hash = 0;
4012 hash = JenkinsSmiHash.combine(hash, kinds.hashCode); 4331 hash = JenkinsSmiHash.combine(hash, kinds.hashCode);
4013 return JenkinsSmiHash.finish(hash); 4332 return JenkinsSmiHash.finish(hash);
4014 } 4333 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
4053 void set offset(int value) { 4372 void set offset(int value) {
4054 assert(value != null); 4373 assert(value != null);
4055 this._offset = value; 4374 this._offset = value;
4056 } 4375 }
4057 4376
4058 EditGetFixesParams(String file, int offset) { 4377 EditGetFixesParams(String file, int offset) {
4059 this.file = file; 4378 this.file = file;
4060 this.offset = offset; 4379 this.offset = offset;
4061 } 4380 }
4062 4381
4063 factory EditGetFixesParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 4382 factory EditGetFixesParams.fromJson(
4383 JsonDecoder jsonDecoder, String jsonPath, Object json) {
4064 if (json == null) { 4384 if (json == null) {
4065 json = {}; 4385 json = {};
4066 } 4386 }
4067 if (json is Map) { 4387 if (json is Map) {
4068 String file; 4388 String file;
4069 if (json.containsKey("file")) { 4389 if (json.containsKey("file")) {
4070 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); 4390 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
4071 } else { 4391 } else {
4072 throw jsonDecoder.mismatch(jsonPath, "file"); 4392 throw jsonDecoder.mismatch(jsonPath, "file");
4073 } 4393 }
(...skipping 24 matching lines...) Expand all
4098 4418
4099 @override 4419 @override
4100 Request toRequest(String id) { 4420 Request toRequest(String id) {
4101 return new Request(id, "edit.getFixes", toJson()); 4421 return new Request(id, "edit.getFixes", toJson());
4102 } 4422 }
4103 4423
4104 @override 4424 @override
4105 String toString() => JSON.encode(toJson()); 4425 String toString() => JSON.encode(toJson());
4106 4426
4107 @override 4427 @override
4108 bool operator==(other) { 4428 bool operator ==(other) {
4109 if (other is EditGetFixesParams) { 4429 if (other is EditGetFixesParams) {
4110 return file == other.file && 4430 return file == other.file && offset == other.offset;
4111 offset == other.offset;
4112 } 4431 }
4113 return false; 4432 return false;
4114 } 4433 }
4115 4434
4116 @override 4435 @override
4117 int get hashCode { 4436 int get hashCode {
4118 int hash = 0; 4437 int hash = 0;
4119 hash = JenkinsSmiHash.combine(hash, file.hashCode); 4438 hash = JenkinsSmiHash.combine(hash, file.hashCode);
4120 hash = JenkinsSmiHash.combine(hash, offset.hashCode); 4439 hash = JenkinsSmiHash.combine(hash, offset.hashCode);
4121 return JenkinsSmiHash.finish(hash); 4440 return JenkinsSmiHash.finish(hash);
(...skipping 22 matching lines...) Expand all
4144 */ 4463 */
4145 void set fixes(List<AnalysisErrorFixes> value) { 4464 void set fixes(List<AnalysisErrorFixes> value) {
4146 assert(value != null); 4465 assert(value != null);
4147 this._fixes = value; 4466 this._fixes = value;
4148 } 4467 }
4149 4468
4150 EditGetFixesResult(List<AnalysisErrorFixes> fixes) { 4469 EditGetFixesResult(List<AnalysisErrorFixes> fixes) {
4151 this.fixes = fixes; 4470 this.fixes = fixes;
4152 } 4471 }
4153 4472
4154 factory EditGetFixesResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 4473 factory EditGetFixesResult.fromJson(
4474 JsonDecoder jsonDecoder, String jsonPath, Object json) {
4155 if (json == null) { 4475 if (json == null) {
4156 json = {}; 4476 json = {};
4157 } 4477 }
4158 if (json is Map) { 4478 if (json is Map) {
4159 List<AnalysisErrorFixes> fixes; 4479 List<AnalysisErrorFixes> fixes;
4160 if (json.containsKey("fixes")) { 4480 if (json.containsKey("fixes")) {
4161 fixes = jsonDecoder.decodeList(jsonPath + ".fixes", json["fixes"], (Stri ng jsonPath, Object json) => new AnalysisErrorFixes.fromJson(jsonDecoder, jsonPa th, json)); 4481 fixes = jsonDecoder.decodeList(
4482 jsonPath + ".fixes",
4483 json["fixes"],
4484 (String jsonPath, Object json) =>
4485 new AnalysisErrorFixes.fromJson(jsonDecoder, jsonPath, json));
4162 } else { 4486 } else {
4163 throw jsonDecoder.mismatch(jsonPath, "fixes"); 4487 throw jsonDecoder.mismatch(jsonPath, "fixes");
4164 } 4488 }
4165 return new EditGetFixesResult(fixes); 4489 return new EditGetFixesResult(fixes);
4166 } else { 4490 } else {
4167 throw jsonDecoder.mismatch(jsonPath, "edit.getFixes result", json); 4491 throw jsonDecoder.mismatch(jsonPath, "edit.getFixes result", json);
4168 } 4492 }
4169 } 4493 }
4170 4494
4171 factory EditGetFixesResult.fromResponse(Response response) { 4495 factory EditGetFixesResult.fromResponse(Response response) {
4172 return new EditGetFixesResult.fromJson( 4496 return new EditGetFixesResult.fromJson(
4173 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), " result", response.result); 4497 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
4498 "result",
4499 response.result);
4174 } 4500 }
4175 4501
4176 @override 4502 @override
4177 Map<String, dynamic> toJson() { 4503 Map<String, dynamic> toJson() {
4178 Map<String, dynamic> result = {}; 4504 Map<String, dynamic> result = {};
4179 result["fixes"] = fixes.map((AnalysisErrorFixes value) => value.toJson()).to List(); 4505 result["fixes"] =
4506 fixes.map((AnalysisErrorFixes value) => value.toJson()).toList();
4180 return result; 4507 return result;
4181 } 4508 }
4182 4509
4183 @override 4510 @override
4184 Response toResponse(String id) { 4511 Response toResponse(String id) {
4185 return new Response(id, result: toJson()); 4512 return new Response(id, result: toJson());
4186 } 4513 }
4187 4514
4188 @override 4515 @override
4189 String toString() => JSON.encode(toJson()); 4516 String toString() => JSON.encode(toJson());
4190 4517
4191 @override 4518 @override
4192 bool operator==(other) { 4519 bool operator ==(other) {
4193 if (other is EditGetFixesResult) { 4520 if (other is EditGetFixesResult) {
4194 return listEqual(fixes, other.fixes, (AnalysisErrorFixes a, AnalysisErrorF ixes b) => a == b); 4521 return listEqual(fixes, other.fixes,
4522 (AnalysisErrorFixes a, AnalysisErrorFixes b) => a == b);
4195 } 4523 }
4196 return false; 4524 return false;
4197 } 4525 }
4198 4526
4199 @override 4527 @override
4200 int get hashCode { 4528 int get hashCode {
4201 int hash = 0; 4529 int hash = 0;
4202 hash = JenkinsSmiHash.combine(hash, fixes.hashCode); 4530 hash = JenkinsSmiHash.combine(hash, fixes.hashCode);
4203 return JenkinsSmiHash.finish(hash); 4531 return JenkinsSmiHash.finish(hash);
4204 } 4532 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
4311 * Data used to provide values provided by the user. The structure of the 4639 * Data used to provide values provided by the user. The structure of the
4312 * data is dependent on the kind of refactoring being performed. The data 4640 * data is dependent on the kind of refactoring being performed. The data
4313 * that is expected is documented in the section titled Refactorings, labeled 4641 * that is expected is documented in the section titled Refactorings, labeled
4314 * as "Options". This field can be omitted if the refactoring does not 4642 * as "Options". This field can be omitted if the refactoring does not
4315 * require any options or if the values of those options are not known. 4643 * require any options or if the values of those options are not known.
4316 */ 4644 */
4317 void set options(RefactoringOptions value) { 4645 void set options(RefactoringOptions value) {
4318 this._options = value; 4646 this._options = value;
4319 } 4647 }
4320 4648
4321 EditGetRefactoringParams(RefactoringKind kind, String file, int offset, int le ngth, bool validateOnly, {RefactoringOptions options}) { 4649 EditGetRefactoringParams(RefactoringKind kind, String file, int offset,
4650 int length, bool validateOnly,
4651 {RefactoringOptions options}) {
4322 this.kind = kind; 4652 this.kind = kind;
4323 this.file = file; 4653 this.file = file;
4324 this.offset = offset; 4654 this.offset = offset;
4325 this.length = length; 4655 this.length = length;
4326 this.validateOnly = validateOnly; 4656 this.validateOnly = validateOnly;
4327 this.options = options; 4657 this.options = options;
4328 } 4658 }
4329 4659
4330 factory EditGetRefactoringParams.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) { 4660 factory EditGetRefactoringParams.fromJson(
4661 JsonDecoder jsonDecoder, String jsonPath, Object json) {
4331 if (json == null) { 4662 if (json == null) {
4332 json = {}; 4663 json = {};
4333 } 4664 }
4334 if (json is Map) { 4665 if (json is Map) {
4335 RefactoringKind kind; 4666 RefactoringKind kind;
4336 if (json.containsKey("kind")) { 4667 if (json.containsKey("kind")) {
4337 kind = new RefactoringKind.fromJson(jsonDecoder, jsonPath + ".kind", jso n["kind"]); 4668 kind = new RefactoringKind.fromJson(
4669 jsonDecoder, jsonPath + ".kind", json["kind"]);
4338 } else { 4670 } else {
4339 throw jsonDecoder.mismatch(jsonPath, "kind"); 4671 throw jsonDecoder.mismatch(jsonPath, "kind");
4340 } 4672 }
4341 String file; 4673 String file;
4342 if (json.containsKey("file")) { 4674 if (json.containsKey("file")) {
4343 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); 4675 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
4344 } else { 4676 } else {
4345 throw jsonDecoder.mismatch(jsonPath, "file"); 4677 throw jsonDecoder.mismatch(jsonPath, "file");
4346 } 4678 }
4347 int offset; 4679 int offset;
4348 if (json.containsKey("offset")) { 4680 if (json.containsKey("offset")) {
4349 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); 4681 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
4350 } else { 4682 } else {
4351 throw jsonDecoder.mismatch(jsonPath, "offset"); 4683 throw jsonDecoder.mismatch(jsonPath, "offset");
4352 } 4684 }
4353 int length; 4685 int length;
4354 if (json.containsKey("length")) { 4686 if (json.containsKey("length")) {
4355 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]); 4687 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
4356 } else { 4688 } else {
4357 throw jsonDecoder.mismatch(jsonPath, "length"); 4689 throw jsonDecoder.mismatch(jsonPath, "length");
4358 } 4690 }
4359 bool validateOnly; 4691 bool validateOnly;
4360 if (json.containsKey("validateOnly")) { 4692 if (json.containsKey("validateOnly")) {
4361 validateOnly = jsonDecoder.decodeBool(jsonPath + ".validateOnly", json[" validateOnly"]); 4693 validateOnly = jsonDecoder.decodeBool(
4694 jsonPath + ".validateOnly", json["validateOnly"]);
4362 } else { 4695 } else {
4363 throw jsonDecoder.mismatch(jsonPath, "validateOnly"); 4696 throw jsonDecoder.mismatch(jsonPath, "validateOnly");
4364 } 4697 }
4365 RefactoringOptions options; 4698 RefactoringOptions options;
4366 if (json.containsKey("options")) { 4699 if (json.containsKey("options")) {
4367 options = new RefactoringOptions.fromJson(jsonDecoder, jsonPath + ".opti ons", json["options"], kind); 4700 options = new RefactoringOptions.fromJson(
4701 jsonDecoder, jsonPath + ".options", json["options"], kind);
4368 } 4702 }
4369 return new EditGetRefactoringParams(kind, file, offset, length, validateOn ly, options: options); 4703 return new EditGetRefactoringParams(
4704 kind, file, offset, length, validateOnly,
4705 options: options);
4370 } else { 4706 } else {
4371 throw jsonDecoder.mismatch(jsonPath, "edit.getRefactoring params", json); 4707 throw jsonDecoder.mismatch(jsonPath, "edit.getRefactoring params", json);
4372 } 4708 }
4373 } 4709 }
4374 4710
4375 factory EditGetRefactoringParams.fromRequest(Request request) { 4711 factory EditGetRefactoringParams.fromRequest(Request request) {
4376 var params = new EditGetRefactoringParams.fromJson( 4712 var params = new EditGetRefactoringParams.fromJson(
4377 new RequestDecoder(request), "params", request.params); 4713 new RequestDecoder(request), "params", request.params);
4378 REQUEST_ID_REFACTORING_KINDS[request.id] = params.kind; 4714 REQUEST_ID_REFACTORING_KINDS[request.id] = params.kind;
4379 return params; 4715 return params;
(...skipping 15 matching lines...) Expand all
4395 4731
4396 @override 4732 @override
4397 Request toRequest(String id) { 4733 Request toRequest(String id) {
4398 return new Request(id, "edit.getRefactoring", toJson()); 4734 return new Request(id, "edit.getRefactoring", toJson());
4399 } 4735 }
4400 4736
4401 @override 4737 @override
4402 String toString() => JSON.encode(toJson()); 4738 String toString() => JSON.encode(toJson());
4403 4739
4404 @override 4740 @override
4405 bool operator==(other) { 4741 bool operator ==(other) {
4406 if (other is EditGetRefactoringParams) { 4742 if (other is EditGetRefactoringParams) {
4407 return kind == other.kind && 4743 return kind == other.kind &&
4408 file == other.file && 4744 file == other.file &&
4409 offset == other.offset && 4745 offset == other.offset &&
4410 length == other.length && 4746 length == other.length &&
4411 validateOnly == other.validateOnly && 4747 validateOnly == other.validateOnly &&
4412 options == other.options; 4748 options == other.options;
4413 } 4749 }
4414 return false; 4750 return false;
4415 } 4751 }
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
4556 * known to be valid if there was insufficient type information for the 4892 * known to be valid if there was insufficient type information for the
4557 * plugin to be able to determine whether or not the code needs to be 4893 * plugin to be able to determine whether or not the code needs to be
4558 * modified, such as when a member is being renamed and there is a reference 4894 * modified, such as when a member is being renamed and there is a reference
4559 * to a member from an unknown type. This field can be omitted if the change 4895 * to a member from an unknown type. This field can be omitted if the change
4560 * field is omitted or if there are no potential edits for the refactoring. 4896 * field is omitted or if there are no potential edits for the refactoring.
4561 */ 4897 */
4562 void set potentialEdits(List<String> value) { 4898 void set potentialEdits(List<String> value) {
4563 this._potentialEdits = value; 4899 this._potentialEdits = value;
4564 } 4900 }
4565 4901
4566 EditGetRefactoringResult(List<RefactoringProblem> initialProblems, List<Refact oringProblem> optionsProblems, List<RefactoringProblem> finalProblems, {Refactor ingFeedback feedback, SourceChange change, List<String> potentialEdits}) { 4902 EditGetRefactoringResult(
4903 List<RefactoringProblem> initialProblems,
4904 List<RefactoringProblem> optionsProblems,
4905 List<RefactoringProblem> finalProblems,
4906 {RefactoringFeedback feedback,
4907 SourceChange change,
4908 List<String> potentialEdits}) {
4567 this.initialProblems = initialProblems; 4909 this.initialProblems = initialProblems;
4568 this.optionsProblems = optionsProblems; 4910 this.optionsProblems = optionsProblems;
4569 this.finalProblems = finalProblems; 4911 this.finalProblems = finalProblems;
4570 this.feedback = feedback; 4912 this.feedback = feedback;
4571 this.change = change; 4913 this.change = change;
4572 this.potentialEdits = potentialEdits; 4914 this.potentialEdits = potentialEdits;
4573 } 4915 }
4574 4916
4575 factory EditGetRefactoringResult.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) { 4917 factory EditGetRefactoringResult.fromJson(
4918 JsonDecoder jsonDecoder, String jsonPath, Object json) {
4576 if (json == null) { 4919 if (json == null) {
4577 json = {}; 4920 json = {};
4578 } 4921 }
4579 if (json is Map) { 4922 if (json is Map) {
4580 List<RefactoringProblem> initialProblems; 4923 List<RefactoringProblem> initialProblems;
4581 if (json.containsKey("initialProblems")) { 4924 if (json.containsKey("initialProblems")) {
4582 initialProblems = jsonDecoder.decodeList(jsonPath + ".initialProblems", json["initialProblems"], (String jsonPath, Object json) => new RefactoringProble m.fromJson(jsonDecoder, jsonPath, json)); 4925 initialProblems = jsonDecoder.decodeList(
4926 jsonPath + ".initialProblems",
4927 json["initialProblems"],
4928 (String jsonPath, Object json) =>
4929 new RefactoringProblem.fromJson(jsonDecoder, jsonPath, json));
4583 } else { 4930 } else {
4584 throw jsonDecoder.mismatch(jsonPath, "initialProblems"); 4931 throw jsonDecoder.mismatch(jsonPath, "initialProblems");
4585 } 4932 }
4586 List<RefactoringProblem> optionsProblems; 4933 List<RefactoringProblem> optionsProblems;
4587 if (json.containsKey("optionsProblems")) { 4934 if (json.containsKey("optionsProblems")) {
4588 optionsProblems = jsonDecoder.decodeList(jsonPath + ".optionsProblems", json["optionsProblems"], (String jsonPath, Object json) => new RefactoringProble m.fromJson(jsonDecoder, jsonPath, json)); 4935 optionsProblems = jsonDecoder.decodeList(
4936 jsonPath + ".optionsProblems",
4937 json["optionsProblems"],
4938 (String jsonPath, Object json) =>
4939 new RefactoringProblem.fromJson(jsonDecoder, jsonPath, json));
4589 } else { 4940 } else {
4590 throw jsonDecoder.mismatch(jsonPath, "optionsProblems"); 4941 throw jsonDecoder.mismatch(jsonPath, "optionsProblems");
4591 } 4942 }
4592 List<RefactoringProblem> finalProblems; 4943 List<RefactoringProblem> finalProblems;
4593 if (json.containsKey("finalProblems")) { 4944 if (json.containsKey("finalProblems")) {
4594 finalProblems = jsonDecoder.decodeList(jsonPath + ".finalProblems", json ["finalProblems"], (String jsonPath, Object json) => new RefactoringProblem.from Json(jsonDecoder, jsonPath, json)); 4945 finalProblems = jsonDecoder.decodeList(
4946 jsonPath + ".finalProblems",
4947 json["finalProblems"],
4948 (String jsonPath, Object json) =>
4949 new RefactoringProblem.fromJson(jsonDecoder, jsonPath, json));
4595 } else { 4950 } else {
4596 throw jsonDecoder.mismatch(jsonPath, "finalProblems"); 4951 throw jsonDecoder.mismatch(jsonPath, "finalProblems");
4597 } 4952 }
4598 RefactoringFeedback feedback; 4953 RefactoringFeedback feedback;
4599 if (json.containsKey("feedback")) { 4954 if (json.containsKey("feedback")) {
4600 feedback = new RefactoringFeedback.fromJson(jsonDecoder, jsonPath + ".fe edback", json["feedback"], json); 4955 feedback = new RefactoringFeedback.fromJson(
4956 jsonDecoder, jsonPath + ".feedback", json["feedback"], json);
4601 } 4957 }
4602 SourceChange change; 4958 SourceChange change;
4603 if (json.containsKey("change")) { 4959 if (json.containsKey("change")) {
4604 change = new SourceChange.fromJson(jsonDecoder, jsonPath + ".change", js on["change"]); 4960 change = new SourceChange.fromJson(
4961 jsonDecoder, jsonPath + ".change", json["change"]);
4605 } 4962 }
4606 List<String> potentialEdits; 4963 List<String> potentialEdits;
4607 if (json.containsKey("potentialEdits")) { 4964 if (json.containsKey("potentialEdits")) {
4608 potentialEdits = jsonDecoder.decodeList(jsonPath + ".potentialEdits", js on["potentialEdits"], jsonDecoder.decodeString); 4965 potentialEdits = jsonDecoder.decodeList(jsonPath + ".potentialEdits",
4966 json["potentialEdits"], jsonDecoder.decodeString);
4609 } 4967 }
4610 return new EditGetRefactoringResult(initialProblems, optionsProblems, fina lProblems, feedback: feedback, change: change, potentialEdits: potentialEdits); 4968 return new EditGetRefactoringResult(
4969 initialProblems, optionsProblems, finalProblems,
4970 feedback: feedback, change: change, potentialEdits: potentialEdits);
4611 } else { 4971 } else {
4612 throw jsonDecoder.mismatch(jsonPath, "edit.getRefactoring result", json); 4972 throw jsonDecoder.mismatch(jsonPath, "edit.getRefactoring result", json);
4613 } 4973 }
4614 } 4974 }
4615 4975
4616 factory EditGetRefactoringResult.fromResponse(Response response) { 4976 factory EditGetRefactoringResult.fromResponse(Response response) {
4617 return new EditGetRefactoringResult.fromJson( 4977 return new EditGetRefactoringResult.fromJson(
4618 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), " result", response.result); 4978 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
4979 "result",
4980 response.result);
4619 } 4981 }
4620 4982
4621 @override 4983 @override
4622 Map<String, dynamic> toJson() { 4984 Map<String, dynamic> toJson() {
4623 Map<String, dynamic> result = {}; 4985 Map<String, dynamic> result = {};
4624 result["initialProblems"] = initialProblems.map((RefactoringProblem value) = > value.toJson()).toList(); 4986 result["initialProblems"] = initialProblems
4625 result["optionsProblems"] = optionsProblems.map((RefactoringProblem value) = > value.toJson()).toList(); 4987 .map((RefactoringProblem value) => value.toJson())
4626 result["finalProblems"] = finalProblems.map((RefactoringProblem value) => va lue.toJson()).toList(); 4988 .toList();
4989 result["optionsProblems"] = optionsProblems
4990 .map((RefactoringProblem value) => value.toJson())
4991 .toList();
4992 result["finalProblems"] = finalProblems
4993 .map((RefactoringProblem value) => value.toJson())
4994 .toList();
4627 if (feedback != null) { 4995 if (feedback != null) {
4628 result["feedback"] = feedback.toJson(); 4996 result["feedback"] = feedback.toJson();
4629 } 4997 }
4630 if (change != null) { 4998 if (change != null) {
4631 result["change"] = change.toJson(); 4999 result["change"] = change.toJson();
4632 } 5000 }
4633 if (potentialEdits != null) { 5001 if (potentialEdits != null) {
4634 result["potentialEdits"] = potentialEdits; 5002 result["potentialEdits"] = potentialEdits;
4635 } 5003 }
4636 return result; 5004 return result;
4637 } 5005 }
4638 5006
4639 @override 5007 @override
4640 Response toResponse(String id) { 5008 Response toResponse(String id) {
4641 return new Response(id, result: toJson()); 5009 return new Response(id, result: toJson());
4642 } 5010 }
4643 5011
4644 @override 5012 @override
4645 String toString() => JSON.encode(toJson()); 5013 String toString() => JSON.encode(toJson());
4646 5014
4647 @override 5015 @override
4648 bool operator==(other) { 5016 bool operator ==(other) {
4649 if (other is EditGetRefactoringResult) { 5017 if (other is EditGetRefactoringResult) {
4650 return listEqual(initialProblems, other.initialProblems, (RefactoringProbl em a, RefactoringProblem b) => a == b) && 5018 return listEqual(initialProblems, other.initialProblems,
4651 listEqual(optionsProblems, other.optionsProblems, (RefactoringProblem a, RefactoringProblem b) => a == b) && 5019 (RefactoringProblem a, RefactoringProblem b) => a == b) &&
4652 listEqual(finalProblems, other.finalProblems, (RefactoringProblem a, R efactoringProblem b) => a == b) && 5020 listEqual(optionsProblems, other.optionsProblems,
5021 (RefactoringProblem a, RefactoringProblem b) => a == b) &&
5022 listEqual(finalProblems, other.finalProblems,
5023 (RefactoringProblem a, RefactoringProblem b) => a == b) &&
4653 feedback == other.feedback && 5024 feedback == other.feedback &&
4654 change == other.change && 5025 change == other.change &&
4655 listEqual(potentialEdits, other.potentialEdits, (String a, String b) = > a == b); 5026 listEqual(potentialEdits, other.potentialEdits,
5027 (String a, String b) => a == b);
4656 } 5028 }
4657 return false; 5029 return false;
4658 } 5030 }
4659 5031
4660 @override 5032 @override
4661 int get hashCode { 5033 int get hashCode {
4662 int hash = 0; 5034 int hash = 0;
4663 hash = JenkinsSmiHash.combine(hash, initialProblems.hashCode); 5035 hash = JenkinsSmiHash.combine(hash, initialProblems.hashCode);
4664 hash = JenkinsSmiHash.combine(hash, optionsProblems.hashCode); 5036 hash = JenkinsSmiHash.combine(hash, optionsProblems.hashCode);
4665 hash = JenkinsSmiHash.combine(hash, finalProblems.hashCode); 5037 hash = JenkinsSmiHash.combine(hash, finalProblems.hashCode);
(...skipping 20 matching lines...) Expand all
4686 * Clients may not extend, implement or mix-in this class. 5058 * Clients may not extend, implement or mix-in this class.
4687 */ 5059 */
4688 class Element implements HasToJson { 5060 class Element implements HasToJson {
4689 static const int FLAG_ABSTRACT = 0x01; 5061 static const int FLAG_ABSTRACT = 0x01;
4690 static const int FLAG_CONST = 0x02; 5062 static const int FLAG_CONST = 0x02;
4691 static const int FLAG_FINAL = 0x04; 5063 static const int FLAG_FINAL = 0x04;
4692 static const int FLAG_STATIC = 0x08; 5064 static const int FLAG_STATIC = 0x08;
4693 static const int FLAG_PRIVATE = 0x10; 5065 static const int FLAG_PRIVATE = 0x10;
4694 static const int FLAG_DEPRECATED = 0x20; 5066 static const int FLAG_DEPRECATED = 0x20;
4695 5067
4696 static int makeFlags({isAbstract: false, isConst: false, isFinal: false, isSta tic: false, isPrivate: false, isDeprecated: false}) { 5068 static int makeFlags(
5069 {isAbstract: false,
5070 isConst: false,
5071 isFinal: false,
5072 isStatic: false,
5073 isPrivate: false,
5074 isDeprecated: false}) {
4697 int flags = 0; 5075 int flags = 0;
4698 if (isAbstract) flags |= FLAG_ABSTRACT; 5076 if (isAbstract) flags |= FLAG_ABSTRACT;
4699 if (isConst) flags |= FLAG_CONST; 5077 if (isConst) flags |= FLAG_CONST;
4700 if (isFinal) flags |= FLAG_FINAL; 5078 if (isFinal) flags |= FLAG_FINAL;
4701 if (isStatic) flags |= FLAG_STATIC; 5079 if (isStatic) flags |= FLAG_STATIC;
4702 if (isPrivate) flags |= FLAG_PRIVATE; 5080 if (isPrivate) flags |= FLAG_PRIVATE;
4703 if (isDeprecated) flags |= FLAG_DEPRECATED; 5081 if (isDeprecated) flags |= FLAG_DEPRECATED;
4704 return flags; 5082 return flags;
4705 } 5083 }
4706 5084
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
4828 String get typeParameters => _typeParameters; 5206 String get typeParameters => _typeParameters;
4829 5207
4830 /** 5208 /**
4831 * The type parameter list for the element. If the element doesn't have type 5209 * The type parameter list for the element. If the element doesn't have type
4832 * parameters, this field will not be defined. 5210 * parameters, this field will not be defined.
4833 */ 5211 */
4834 void set typeParameters(String value) { 5212 void set typeParameters(String value) {
4835 this._typeParameters = value; 5213 this._typeParameters = value;
4836 } 5214 }
4837 5215
4838 Element(ElementKind kind, String name, int flags, {Location location, String p arameters, String returnType, String typeParameters}) { 5216 Element(ElementKind kind, String name, int flags,
5217 {Location location,
5218 String parameters,
5219 String returnType,
5220 String typeParameters}) {
4839 this.kind = kind; 5221 this.kind = kind;
4840 this.name = name; 5222 this.name = name;
4841 this.location = location; 5223 this.location = location;
4842 this.flags = flags; 5224 this.flags = flags;
4843 this.parameters = parameters; 5225 this.parameters = parameters;
4844 this.returnType = returnType; 5226 this.returnType = returnType;
4845 this.typeParameters = typeParameters; 5227 this.typeParameters = typeParameters;
4846 } 5228 }
4847 5229
4848 factory Element.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json ) { 5230 factory Element.fromJson(
5231 JsonDecoder jsonDecoder, String jsonPath, Object json) {
4849 if (json == null) { 5232 if (json == null) {
4850 json = {}; 5233 json = {};
4851 } 5234 }
4852 if (json is Map) { 5235 if (json is Map) {
4853 ElementKind kind; 5236 ElementKind kind;
4854 if (json.containsKey("kind")) { 5237 if (json.containsKey("kind")) {
4855 kind = new ElementKind.fromJson(jsonDecoder, jsonPath + ".kind", json["k ind"]); 5238 kind = new ElementKind.fromJson(
5239 jsonDecoder, jsonPath + ".kind", json["kind"]);
4856 } else { 5240 } else {
4857 throw jsonDecoder.mismatch(jsonPath, "kind"); 5241 throw jsonDecoder.mismatch(jsonPath, "kind");
4858 } 5242 }
4859 String name; 5243 String name;
4860 if (json.containsKey("name")) { 5244 if (json.containsKey("name")) {
4861 name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]); 5245 name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
4862 } else { 5246 } else {
4863 throw jsonDecoder.mismatch(jsonPath, "name"); 5247 throw jsonDecoder.mismatch(jsonPath, "name");
4864 } 5248 }
4865 Location location; 5249 Location location;
4866 if (json.containsKey("location")) { 5250 if (json.containsKey("location")) {
4867 location = new Location.fromJson(jsonDecoder, jsonPath + ".location", js on["location"]); 5251 location = new Location.fromJson(
5252 jsonDecoder, jsonPath + ".location", json["location"]);
4868 } 5253 }
4869 int flags; 5254 int flags;
4870 if (json.containsKey("flags")) { 5255 if (json.containsKey("flags")) {
4871 flags = jsonDecoder.decodeInt(jsonPath + ".flags", json["flags"]); 5256 flags = jsonDecoder.decodeInt(jsonPath + ".flags", json["flags"]);
4872 } else { 5257 } else {
4873 throw jsonDecoder.mismatch(jsonPath, "flags"); 5258 throw jsonDecoder.mismatch(jsonPath, "flags");
4874 } 5259 }
4875 String parameters; 5260 String parameters;
4876 if (json.containsKey("parameters")) { 5261 if (json.containsKey("parameters")) {
4877 parameters = jsonDecoder.decodeString(jsonPath + ".parameters", json["pa rameters"]); 5262 parameters = jsonDecoder.decodeString(
5263 jsonPath + ".parameters", json["parameters"]);
4878 } 5264 }
4879 String returnType; 5265 String returnType;
4880 if (json.containsKey("returnType")) { 5266 if (json.containsKey("returnType")) {
4881 returnType = jsonDecoder.decodeString(jsonPath + ".returnType", json["re turnType"]); 5267 returnType = jsonDecoder.decodeString(
5268 jsonPath + ".returnType", json["returnType"]);
4882 } 5269 }
4883 String typeParameters; 5270 String typeParameters;
4884 if (json.containsKey("typeParameters")) { 5271 if (json.containsKey("typeParameters")) {
4885 typeParameters = jsonDecoder.decodeString(jsonPath + ".typeParameters", json["typeParameters"]); 5272 typeParameters = jsonDecoder.decodeString(
5273 jsonPath + ".typeParameters", json["typeParameters"]);
4886 } 5274 }
4887 return new Element(kind, name, flags, location: location, parameters: para meters, returnType: returnType, typeParameters: typeParameters); 5275 return new Element(kind, name, flags,
5276 location: location,
5277 parameters: parameters,
5278 returnType: returnType,
5279 typeParameters: typeParameters);
4888 } else { 5280 } else {
4889 throw jsonDecoder.mismatch(jsonPath, "Element", json); 5281 throw jsonDecoder.mismatch(jsonPath, "Element", json);
4890 } 5282 }
4891 } 5283 }
4892 5284
4893 bool get isAbstract => (flags & FLAG_ABSTRACT) != 0; 5285 bool get isAbstract => (flags & FLAG_ABSTRACT) != 0;
4894 bool get isConst => (flags & FLAG_CONST) != 0; 5286 bool get isConst => (flags & FLAG_CONST) != 0;
4895 bool get isFinal => (flags & FLAG_FINAL) != 0; 5287 bool get isFinal => (flags & FLAG_FINAL) != 0;
4896 bool get isStatic => (flags & FLAG_STATIC) != 0; 5288 bool get isStatic => (flags & FLAG_STATIC) != 0;
4897 bool get isPrivate => (flags & FLAG_PRIVATE) != 0; 5289 bool get isPrivate => (flags & FLAG_PRIVATE) != 0;
(...skipping 17 matching lines...) Expand all
4915 if (typeParameters != null) { 5307 if (typeParameters != null) {
4916 result["typeParameters"] = typeParameters; 5308 result["typeParameters"] = typeParameters;
4917 } 5309 }
4918 return result; 5310 return result;
4919 } 5311 }
4920 5312
4921 @override 5313 @override
4922 String toString() => JSON.encode(toJson()); 5314 String toString() => JSON.encode(toJson());
4923 5315
4924 @override 5316 @override
4925 bool operator==(other) { 5317 bool operator ==(other) {
4926 if (other is Element) { 5318 if (other is Element) {
4927 return kind == other.kind && 5319 return kind == other.kind &&
4928 name == other.name && 5320 name == other.name &&
4929 location == other.location && 5321 location == other.location &&
4930 flags == other.flags && 5322 flags == other.flags &&
4931 parameters == other.parameters && 5323 parameters == other.parameters &&
4932 returnType == other.returnType && 5324 returnType == other.returnType &&
4933 typeParameters == other.typeParameters; 5325 typeParameters == other.typeParameters;
4934 } 5326 }
4935 return false; 5327 return false;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
4974 * TOP_LEVEL_VARIABLE 5366 * TOP_LEVEL_VARIABLE
4975 * TYPE_PARAMETER 5367 * TYPE_PARAMETER
4976 * UNKNOWN 5368 * UNKNOWN
4977 * } 5369 * }
4978 * 5370 *
4979 * Clients may not extend, implement or mix-in this class. 5371 * Clients may not extend, implement or mix-in this class.
4980 */ 5372 */
4981 class ElementKind implements Enum { 5373 class ElementKind implements Enum {
4982 static const ElementKind CLASS = const ElementKind._("CLASS"); 5374 static const ElementKind CLASS = const ElementKind._("CLASS");
4983 5375
4984 static const ElementKind CLASS_TYPE_ALIAS = const ElementKind._("CLASS_TYPE_AL IAS"); 5376 static const ElementKind CLASS_TYPE_ALIAS =
5377 const ElementKind._("CLASS_TYPE_ALIAS");
4985 5378
4986 static const ElementKind COMPILATION_UNIT = const ElementKind._("COMPILATION_U NIT"); 5379 static const ElementKind COMPILATION_UNIT =
5380 const ElementKind._("COMPILATION_UNIT");
4987 5381
4988 static const ElementKind CONSTRUCTOR = const ElementKind._("CONSTRUCTOR"); 5382 static const ElementKind CONSTRUCTOR = const ElementKind._("CONSTRUCTOR");
4989 5383
4990 static const ElementKind ENUM = const ElementKind._("ENUM"); 5384 static const ElementKind ENUM = const ElementKind._("ENUM");
4991 5385
4992 static const ElementKind ENUM_CONSTANT = const ElementKind._("ENUM_CONSTANT"); 5386 static const ElementKind ENUM_CONSTANT = const ElementKind._("ENUM_CONSTANT");
4993 5387
4994 static const ElementKind FIELD = const ElementKind._("FIELD"); 5388 static const ElementKind FIELD = const ElementKind._("FIELD");
4995 5389
4996 static const ElementKind FILE = const ElementKind._("FILE"); 5390 static const ElementKind FILE = const ElementKind._("FILE");
4997 5391
4998 static const ElementKind FUNCTION = const ElementKind._("FUNCTION"); 5392 static const ElementKind FUNCTION = const ElementKind._("FUNCTION");
4999 5393
5000 static const ElementKind FUNCTION_TYPE_ALIAS = const ElementKind._("FUNCTION_T YPE_ALIAS"); 5394 static const ElementKind FUNCTION_TYPE_ALIAS =
5395 const ElementKind._("FUNCTION_TYPE_ALIAS");
5001 5396
5002 static const ElementKind GETTER = const ElementKind._("GETTER"); 5397 static const ElementKind GETTER = const ElementKind._("GETTER");
5003 5398
5004 static const ElementKind LABEL = const ElementKind._("LABEL"); 5399 static const ElementKind LABEL = const ElementKind._("LABEL");
5005 5400
5006 static const ElementKind LIBRARY = const ElementKind._("LIBRARY"); 5401 static const ElementKind LIBRARY = const ElementKind._("LIBRARY");
5007 5402
5008 static const ElementKind LOCAL_VARIABLE = const ElementKind._("LOCAL_VARIABLE" ); 5403 static const ElementKind LOCAL_VARIABLE =
5404 const ElementKind._("LOCAL_VARIABLE");
5009 5405
5010 static const ElementKind METHOD = const ElementKind._("METHOD"); 5406 static const ElementKind METHOD = const ElementKind._("METHOD");
5011 5407
5012 static const ElementKind PARAMETER = const ElementKind._("PARAMETER"); 5408 static const ElementKind PARAMETER = const ElementKind._("PARAMETER");
5013 5409
5014 static const ElementKind PREFIX = const ElementKind._("PREFIX"); 5410 static const ElementKind PREFIX = const ElementKind._("PREFIX");
5015 5411
5016 static const ElementKind SETTER = const ElementKind._("SETTER"); 5412 static const ElementKind SETTER = const ElementKind._("SETTER");
5017 5413
5018 static const ElementKind TOP_LEVEL_VARIABLE = const ElementKind._("TOP_LEVEL_V ARIABLE"); 5414 static const ElementKind TOP_LEVEL_VARIABLE =
5415 const ElementKind._("TOP_LEVEL_VARIABLE");
5019 5416
5020 static const ElementKind TYPE_PARAMETER = const ElementKind._("TYPE_PARAMETER" ); 5417 static const ElementKind TYPE_PARAMETER =
5418 const ElementKind._("TYPE_PARAMETER");
5021 5419
5022 static const ElementKind UNKNOWN = const ElementKind._("UNKNOWN"); 5420 static const ElementKind UNKNOWN = const ElementKind._("UNKNOWN");
5023 5421
5024 /** 5422 /**
5025 * A list containing all of the enum values that are defined. 5423 * A list containing all of the enum values that are defined.
5026 */ 5424 */
5027 static const List<ElementKind> VALUES = const <ElementKind>[CLASS, CLASS_TYPE_ ALIAS, COMPILATION_UNIT, CONSTRUCTOR, ENUM, ENUM_CONSTANT, FIELD, FILE, FUNCTION , FUNCTION_TYPE_ALIAS, GETTER, LABEL, LIBRARY, LOCAL_VARIABLE, METHOD, PARAMETER , PREFIX, SETTER, TOP_LEVEL_VARIABLE, TYPE_PARAMETER, UNKNOWN]; 5425 static const List<ElementKind> VALUES = const <ElementKind>[
5426 CLASS,
5427 CLASS_TYPE_ALIAS,
5428 COMPILATION_UNIT,
5429 CONSTRUCTOR,
5430 ENUM,
5431 ENUM_CONSTANT,
5432 FIELD,
5433 FILE,
5434 FUNCTION,
5435 FUNCTION_TYPE_ALIAS,
5436 GETTER,
5437 LABEL,
5438 LIBRARY,
5439 LOCAL_VARIABLE,
5440 METHOD,
5441 PARAMETER,
5442 PREFIX,
5443 SETTER,
5444 TOP_LEVEL_VARIABLE,
5445 TYPE_PARAMETER,
5446 UNKNOWN
5447 ];
5028 5448
5029 @override 5449 @override
5030 final String name; 5450 final String name;
5031 5451
5032 const ElementKind._(this.name); 5452 const ElementKind._(this.name);
5033 5453
5034 factory ElementKind(String name) { 5454 factory ElementKind(String name) {
5035 switch (name) { 5455 switch (name) {
5036 case "CLASS": 5456 case "CLASS":
5037 return CLASS; 5457 return CLASS;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
5072 case "TOP_LEVEL_VARIABLE": 5492 case "TOP_LEVEL_VARIABLE":
5073 return TOP_LEVEL_VARIABLE; 5493 return TOP_LEVEL_VARIABLE;
5074 case "TYPE_PARAMETER": 5494 case "TYPE_PARAMETER":
5075 return TYPE_PARAMETER; 5495 return TYPE_PARAMETER;
5076 case "UNKNOWN": 5496 case "UNKNOWN":
5077 return UNKNOWN; 5497 return UNKNOWN;
5078 } 5498 }
5079 throw new Exception('Illegal enum value: $name'); 5499 throw new Exception('Illegal enum value: $name');
5080 } 5500 }
5081 5501
5082 factory ElementKind.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 5502 factory ElementKind.fromJson(
5503 JsonDecoder jsonDecoder, String jsonPath, Object json) {
5083 if (json is String) { 5504 if (json is String) {
5084 try { 5505 try {
5085 return new ElementKind(json); 5506 return new ElementKind(json);
5086 } catch(_) { 5507 } catch (_) {
5087 // Fall through 5508 // Fall through
5088 } 5509 }
5089 } 5510 }
5090 throw jsonDecoder.mismatch(jsonPath, "ElementKind", json); 5511 throw jsonDecoder.mismatch(jsonPath, "ElementKind", json);
5091 } 5512 }
5092 5513
5093 @override 5514 @override
5094 String toString() => "ElementKind.$name"; 5515 String toString() => "ElementKind.$name";
5095 5516
5096 String toJson() => name; 5517 String toJson() => name;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
5188 * The lengths of the expressions that would be replaced by a reference to 5609 * The lengths of the expressions that would be replaced by a reference to
5189 * the variable. The lengths correspond to the offsets. In other words, for a 5610 * the variable. The lengths correspond to the offsets. In other words, for a
5190 * given expression, if the offset of that expression is offsets[i], then the 5611 * given expression, if the offset of that expression is offsets[i], then the
5191 * length of that expression is lengths[i]. 5612 * length of that expression is lengths[i].
5192 */ 5613 */
5193 void set lengths(List<int> value) { 5614 void set lengths(List<int> value) {
5194 assert(value != null); 5615 assert(value != null);
5195 this._lengths = value; 5616 this._lengths = value;
5196 } 5617 }
5197 5618
5198 ExtractLocalVariableFeedback(List<String> names, List<int> offsets, List<int> lengths, {List<int> coveringExpressionOffsets, List<int> coveringExpressionLengt hs}) { 5619 ExtractLocalVariableFeedback(
5620 List<String> names, List<int> offsets, List<int> lengths,
5621 {List<int> coveringExpressionOffsets,
5622 List<int> coveringExpressionLengths}) {
5199 this.coveringExpressionOffsets = coveringExpressionOffsets; 5623 this.coveringExpressionOffsets = coveringExpressionOffsets;
5200 this.coveringExpressionLengths = coveringExpressionLengths; 5624 this.coveringExpressionLengths = coveringExpressionLengths;
5201 this.names = names; 5625 this.names = names;
5202 this.offsets = offsets; 5626 this.offsets = offsets;
5203 this.lengths = lengths; 5627 this.lengths = lengths;
5204 } 5628 }
5205 5629
5206 factory ExtractLocalVariableFeedback.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 5630 factory ExtractLocalVariableFeedback.fromJson(
5631 JsonDecoder jsonDecoder, String jsonPath, Object json) {
5207 if (json == null) { 5632 if (json == null) {
5208 json = {}; 5633 json = {};
5209 } 5634 }
5210 if (json is Map) { 5635 if (json is Map) {
5211 List<int> coveringExpressionOffsets; 5636 List<int> coveringExpressionOffsets;
5212 if (json.containsKey("coveringExpressionOffsets")) { 5637 if (json.containsKey("coveringExpressionOffsets")) {
5213 coveringExpressionOffsets = jsonDecoder.decodeList(jsonPath + ".covering ExpressionOffsets", json["coveringExpressionOffsets"], jsonDecoder.decodeInt); 5638 coveringExpressionOffsets = jsonDecoder.decodeList(
5639 jsonPath + ".coveringExpressionOffsets",
5640 json["coveringExpressionOffsets"],
5641 jsonDecoder.decodeInt);
5214 } 5642 }
5215 List<int> coveringExpressionLengths; 5643 List<int> coveringExpressionLengths;
5216 if (json.containsKey("coveringExpressionLengths")) { 5644 if (json.containsKey("coveringExpressionLengths")) {
5217 coveringExpressionLengths = jsonDecoder.decodeList(jsonPath + ".covering ExpressionLengths", json["coveringExpressionLengths"], jsonDecoder.decodeInt); 5645 coveringExpressionLengths = jsonDecoder.decodeList(
5646 jsonPath + ".coveringExpressionLengths",
5647 json["coveringExpressionLengths"],
5648 jsonDecoder.decodeInt);
5218 } 5649 }
5219 List<String> names; 5650 List<String> names;
5220 if (json.containsKey("names")) { 5651 if (json.containsKey("names")) {
5221 names = jsonDecoder.decodeList(jsonPath + ".names", json["names"], jsonD ecoder.decodeString); 5652 names = jsonDecoder.decodeList(
5653 jsonPath + ".names", json["names"], jsonDecoder.decodeString);
5222 } else { 5654 } else {
5223 throw jsonDecoder.mismatch(jsonPath, "names"); 5655 throw jsonDecoder.mismatch(jsonPath, "names");
5224 } 5656 }
5225 List<int> offsets; 5657 List<int> offsets;
5226 if (json.containsKey("offsets")) { 5658 if (json.containsKey("offsets")) {
5227 offsets = jsonDecoder.decodeList(jsonPath + ".offsets", json["offsets"], jsonDecoder.decodeInt); 5659 offsets = jsonDecoder.decodeList(
5660 jsonPath + ".offsets", json["offsets"], jsonDecoder.decodeInt);
5228 } else { 5661 } else {
5229 throw jsonDecoder.mismatch(jsonPath, "offsets"); 5662 throw jsonDecoder.mismatch(jsonPath, "offsets");
5230 } 5663 }
5231 List<int> lengths; 5664 List<int> lengths;
5232 if (json.containsKey("lengths")) { 5665 if (json.containsKey("lengths")) {
5233 lengths = jsonDecoder.decodeList(jsonPath + ".lengths", json["lengths"], jsonDecoder.decodeInt); 5666 lengths = jsonDecoder.decodeList(
5667 jsonPath + ".lengths", json["lengths"], jsonDecoder.decodeInt);
5234 } else { 5668 } else {
5235 throw jsonDecoder.mismatch(jsonPath, "lengths"); 5669 throw jsonDecoder.mismatch(jsonPath, "lengths");
5236 } 5670 }
5237 return new ExtractLocalVariableFeedback(names, offsets, lengths, coveringE xpressionOffsets: coveringExpressionOffsets, coveringExpressionLengths: covering ExpressionLengths); 5671 return new ExtractLocalVariableFeedback(names, offsets, lengths,
5672 coveringExpressionOffsets: coveringExpressionOffsets,
5673 coveringExpressionLengths: coveringExpressionLengths);
5238 } else { 5674 } else {
5239 throw jsonDecoder.mismatch(jsonPath, "extractLocalVariable feedback", json ); 5675 throw jsonDecoder.mismatch(
5676 jsonPath, "extractLocalVariable feedback", json);
5240 } 5677 }
5241 } 5678 }
5242 5679
5243 @override 5680 @override
5244 Map<String, dynamic> toJson() { 5681 Map<String, dynamic> toJson() {
5245 Map<String, dynamic> result = {}; 5682 Map<String, dynamic> result = {};
5246 if (coveringExpressionOffsets != null) { 5683 if (coveringExpressionOffsets != null) {
5247 result["coveringExpressionOffsets"] = coveringExpressionOffsets; 5684 result["coveringExpressionOffsets"] = coveringExpressionOffsets;
5248 } 5685 }
5249 if (coveringExpressionLengths != null) { 5686 if (coveringExpressionLengths != null) {
5250 result["coveringExpressionLengths"] = coveringExpressionLengths; 5687 result["coveringExpressionLengths"] = coveringExpressionLengths;
5251 } 5688 }
5252 result["names"] = names; 5689 result["names"] = names;
5253 result["offsets"] = offsets; 5690 result["offsets"] = offsets;
5254 result["lengths"] = lengths; 5691 result["lengths"] = lengths;
5255 return result; 5692 return result;
5256 } 5693 }
5257 5694
5258 @override 5695 @override
5259 String toString() => JSON.encode(toJson()); 5696 String toString() => JSON.encode(toJson());
5260 5697
5261 @override 5698 @override
5262 bool operator==(other) { 5699 bool operator ==(other) {
5263 if (other is ExtractLocalVariableFeedback) { 5700 if (other is ExtractLocalVariableFeedback) {
5264 return listEqual(coveringExpressionOffsets, other.coveringExpressionOffset s, (int a, int b) => a == b) && 5701 return listEqual(coveringExpressionOffsets,
5265 listEqual(coveringExpressionLengths, other.coveringExpressionLengths, (int a, int b) => a == b) && 5702 other.coveringExpressionOffsets, (int a, int b) => a == b) &&
5703 listEqual(coveringExpressionLengths, other.coveringExpressionLengths,
5704 (int a, int b) => a == b) &&
5266 listEqual(names, other.names, (String a, String b) => a == b) && 5705 listEqual(names, other.names, (String a, String b) => a == b) &&
5267 listEqual(offsets, other.offsets, (int a, int b) => a == b) && 5706 listEqual(offsets, other.offsets, (int a, int b) => a == b) &&
5268 listEqual(lengths, other.lengths, (int a, int b) => a == b); 5707 listEqual(lengths, other.lengths, (int a, int b) => a == b);
5269 } 5708 }
5270 return false; 5709 return false;
5271 } 5710 }
5272 5711
5273 @override 5712 @override
5274 int get hashCode { 5713 int get hashCode {
5275 int hash = 0; 5714 int hash = 0;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
5327 void set extractAll(bool value) { 5766 void set extractAll(bool value) {
5328 assert(value != null); 5767 assert(value != null);
5329 this._extractAll = value; 5768 this._extractAll = value;
5330 } 5769 }
5331 5770
5332 ExtractLocalVariableOptions(String name, bool extractAll) { 5771 ExtractLocalVariableOptions(String name, bool extractAll) {
5333 this.name = name; 5772 this.name = name;
5334 this.extractAll = extractAll; 5773 this.extractAll = extractAll;
5335 } 5774 }
5336 5775
5337 factory ExtractLocalVariableOptions.fromJson(JsonDecoder jsonDecoder, String j sonPath, Object json) { 5776 factory ExtractLocalVariableOptions.fromJson(
5777 JsonDecoder jsonDecoder, String jsonPath, Object json) {
5338 if (json == null) { 5778 if (json == null) {
5339 json = {}; 5779 json = {};
5340 } 5780 }
5341 if (json is Map) { 5781 if (json is Map) {
5342 String name; 5782 String name;
5343 if (json.containsKey("name")) { 5783 if (json.containsKey("name")) {
5344 name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]); 5784 name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
5345 } else { 5785 } else {
5346 throw jsonDecoder.mismatch(jsonPath, "name"); 5786 throw jsonDecoder.mismatch(jsonPath, "name");
5347 } 5787 }
5348 bool extractAll; 5788 bool extractAll;
5349 if (json.containsKey("extractAll")) { 5789 if (json.containsKey("extractAll")) {
5350 extractAll = jsonDecoder.decodeBool(jsonPath + ".extractAll", json["extr actAll"]); 5790 extractAll = jsonDecoder.decodeBool(
5791 jsonPath + ".extractAll", json["extractAll"]);
5351 } else { 5792 } else {
5352 throw jsonDecoder.mismatch(jsonPath, "extractAll"); 5793 throw jsonDecoder.mismatch(jsonPath, "extractAll");
5353 } 5794 }
5354 return new ExtractLocalVariableOptions(name, extractAll); 5795 return new ExtractLocalVariableOptions(name, extractAll);
5355 } else { 5796 } else {
5356 throw jsonDecoder.mismatch(jsonPath, "extractLocalVariable options", json) ; 5797 throw jsonDecoder.mismatch(
5798 jsonPath, "extractLocalVariable options", json);
5357 } 5799 }
5358 } 5800 }
5359 5801
5360 factory ExtractLocalVariableOptions.fromRefactoringParams(EditGetRefactoringPa rams refactoringParams, Request request) { 5802 factory ExtractLocalVariableOptions.fromRefactoringParams(
5803 EditGetRefactoringParams refactoringParams, Request request) {
5361 return new ExtractLocalVariableOptions.fromJson( 5804 return new ExtractLocalVariableOptions.fromJson(
5362 new RequestDecoder(request), "options", refactoringParams.options); 5805 new RequestDecoder(request), "options", refactoringParams.options);
5363 } 5806 }
5364 5807
5365 @override 5808 @override
5366 Map<String, dynamic> toJson() { 5809 Map<String, dynamic> toJson() {
5367 Map<String, dynamic> result = {}; 5810 Map<String, dynamic> result = {};
5368 result["name"] = name; 5811 result["name"] = name;
5369 result["extractAll"] = extractAll; 5812 result["extractAll"] = extractAll;
5370 return result; 5813 return result;
5371 } 5814 }
5372 5815
5373 @override 5816 @override
5374 String toString() => JSON.encode(toJson()); 5817 String toString() => JSON.encode(toJson());
5375 5818
5376 @override 5819 @override
5377 bool operator==(other) { 5820 bool operator ==(other) {
5378 if (other is ExtractLocalVariableOptions) { 5821 if (other is ExtractLocalVariableOptions) {
5379 return name == other.name && 5822 return name == other.name && extractAll == other.extractAll;
5380 extractAll == other.extractAll;
5381 } 5823 }
5382 return false; 5824 return false;
5383 } 5825 }
5384 5826
5385 @override 5827 @override
5386 int get hashCode { 5828 int get hashCode {
5387 int hash = 0; 5829 int hash = 0;
5388 hash = JenkinsSmiHash.combine(hash, name.hashCode); 5830 hash = JenkinsSmiHash.combine(hash, name.hashCode);
5389 hash = JenkinsSmiHash.combine(hash, extractAll.hashCode); 5831 hash = JenkinsSmiHash.combine(hash, extractAll.hashCode);
5390 return JenkinsSmiHash.finish(hash); 5832 return JenkinsSmiHash.finish(hash);
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
5535 * invocation of the method. The lengths correspond to the offsets. In other 5977 * invocation of the method. The lengths correspond to the offsets. In other
5536 * words, for a given expression (or block of statements), if the offset of 5978 * words, for a given expression (or block of statements), if the offset of
5537 * that expression is offsets[i], then the length of that expression is 5979 * that expression is offsets[i], then the length of that expression is
5538 * lengths[i]. 5980 * lengths[i].
5539 */ 5981 */
5540 void set lengths(List<int> value) { 5982 void set lengths(List<int> value) {
5541 assert(value != null); 5983 assert(value != null);
5542 this._lengths = value; 5984 this._lengths = value;
5543 } 5985 }
5544 5986
5545 ExtractMethodFeedback(int offset, int length, String returnType, List<String> names, bool canCreateGetter, List<RefactoringMethodParameter> parameters, List<i nt> offsets, List<int> lengths) { 5987 ExtractMethodFeedback(
5988 int offset,
5989 int length,
5990 String returnType,
5991 List<String> names,
5992 bool canCreateGetter,
5993 List<RefactoringMethodParameter> parameters,
5994 List<int> offsets,
5995 List<int> lengths) {
5546 this.offset = offset; 5996 this.offset = offset;
5547 this.length = length; 5997 this.length = length;
5548 this.returnType = returnType; 5998 this.returnType = returnType;
5549 this.names = names; 5999 this.names = names;
5550 this.canCreateGetter = canCreateGetter; 6000 this.canCreateGetter = canCreateGetter;
5551 this.parameters = parameters; 6001 this.parameters = parameters;
5552 this.offsets = offsets; 6002 this.offsets = offsets;
5553 this.lengths = lengths; 6003 this.lengths = lengths;
5554 } 6004 }
5555 6005
5556 factory ExtractMethodFeedback.fromJson(JsonDecoder jsonDecoder, String jsonPat h, Object json) { 6006 factory ExtractMethodFeedback.fromJson(
6007 JsonDecoder jsonDecoder, String jsonPath, Object json) {
5557 if (json == null) { 6008 if (json == null) {
5558 json = {}; 6009 json = {};
5559 } 6010 }
5560 if (json is Map) { 6011 if (json is Map) {
5561 int offset; 6012 int offset;
5562 if (json.containsKey("offset")) { 6013 if (json.containsKey("offset")) {
5563 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); 6014 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
5564 } else { 6015 } else {
5565 throw jsonDecoder.mismatch(jsonPath, "offset"); 6016 throw jsonDecoder.mismatch(jsonPath, "offset");
5566 } 6017 }
5567 int length; 6018 int length;
5568 if (json.containsKey("length")) { 6019 if (json.containsKey("length")) {
5569 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]); 6020 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
5570 } else { 6021 } else {
5571 throw jsonDecoder.mismatch(jsonPath, "length"); 6022 throw jsonDecoder.mismatch(jsonPath, "length");
5572 } 6023 }
5573 String returnType; 6024 String returnType;
5574 if (json.containsKey("returnType")) { 6025 if (json.containsKey("returnType")) {
5575 returnType = jsonDecoder.decodeString(jsonPath + ".returnType", json["re turnType"]); 6026 returnType = jsonDecoder.decodeString(
6027 jsonPath + ".returnType", json["returnType"]);
5576 } else { 6028 } else {
5577 throw jsonDecoder.mismatch(jsonPath, "returnType"); 6029 throw jsonDecoder.mismatch(jsonPath, "returnType");
5578 } 6030 }
5579 List<String> names; 6031 List<String> names;
5580 if (json.containsKey("names")) { 6032 if (json.containsKey("names")) {
5581 names = jsonDecoder.decodeList(jsonPath + ".names", json["names"], jsonD ecoder.decodeString); 6033 names = jsonDecoder.decodeList(
6034 jsonPath + ".names", json["names"], jsonDecoder.decodeString);
5582 } else { 6035 } else {
5583 throw jsonDecoder.mismatch(jsonPath, "names"); 6036 throw jsonDecoder.mismatch(jsonPath, "names");
5584 } 6037 }
5585 bool canCreateGetter; 6038 bool canCreateGetter;
5586 if (json.containsKey("canCreateGetter")) { 6039 if (json.containsKey("canCreateGetter")) {
5587 canCreateGetter = jsonDecoder.decodeBool(jsonPath + ".canCreateGetter", json["canCreateGetter"]); 6040 canCreateGetter = jsonDecoder.decodeBool(
6041 jsonPath + ".canCreateGetter", json["canCreateGetter"]);
5588 } else { 6042 } else {
5589 throw jsonDecoder.mismatch(jsonPath, "canCreateGetter"); 6043 throw jsonDecoder.mismatch(jsonPath, "canCreateGetter");
5590 } 6044 }
5591 List<RefactoringMethodParameter> parameters; 6045 List<RefactoringMethodParameter> parameters;
5592 if (json.containsKey("parameters")) { 6046 if (json.containsKey("parameters")) {
5593 parameters = jsonDecoder.decodeList(jsonPath + ".parameters", json["para meters"], (String jsonPath, Object json) => new RefactoringMethodParameter.fromJ son(jsonDecoder, jsonPath, json)); 6047 parameters = jsonDecoder.decodeList(
6048 jsonPath + ".parameters",
6049 json["parameters"],
6050 (String jsonPath, Object json) =>
6051 new RefactoringMethodParameter.fromJson(
6052 jsonDecoder, jsonPath, json));
5594 } else { 6053 } else {
5595 throw jsonDecoder.mismatch(jsonPath, "parameters"); 6054 throw jsonDecoder.mismatch(jsonPath, "parameters");
5596 } 6055 }
5597 List<int> offsets; 6056 List<int> offsets;
5598 if (json.containsKey("offsets")) { 6057 if (json.containsKey("offsets")) {
5599 offsets = jsonDecoder.decodeList(jsonPath + ".offsets", json["offsets"], jsonDecoder.decodeInt); 6058 offsets = jsonDecoder.decodeList(
6059 jsonPath + ".offsets", json["offsets"], jsonDecoder.decodeInt);
5600 } else { 6060 } else {
5601 throw jsonDecoder.mismatch(jsonPath, "offsets"); 6061 throw jsonDecoder.mismatch(jsonPath, "offsets");
5602 } 6062 }
5603 List<int> lengths; 6063 List<int> lengths;
5604 if (json.containsKey("lengths")) { 6064 if (json.containsKey("lengths")) {
5605 lengths = jsonDecoder.decodeList(jsonPath + ".lengths", json["lengths"], jsonDecoder.decodeInt); 6065 lengths = jsonDecoder.decodeList(
6066 jsonPath + ".lengths", json["lengths"], jsonDecoder.decodeInt);
5606 } else { 6067 } else {
5607 throw jsonDecoder.mismatch(jsonPath, "lengths"); 6068 throw jsonDecoder.mismatch(jsonPath, "lengths");
5608 } 6069 }
5609 return new ExtractMethodFeedback(offset, length, returnType, names, canCre ateGetter, parameters, offsets, lengths); 6070 return new ExtractMethodFeedback(offset, length, returnType, names,
6071 canCreateGetter, parameters, offsets, lengths);
5610 } else { 6072 } else {
5611 throw jsonDecoder.mismatch(jsonPath, "extractMethod feedback", json); 6073 throw jsonDecoder.mismatch(jsonPath, "extractMethod feedback", json);
5612 } 6074 }
5613 } 6075 }
5614 6076
5615 @override 6077 @override
5616 Map<String, dynamic> toJson() { 6078 Map<String, dynamic> toJson() {
5617 Map<String, dynamic> result = {}; 6079 Map<String, dynamic> result = {};
5618 result["offset"] = offset; 6080 result["offset"] = offset;
5619 result["length"] = length; 6081 result["length"] = length;
5620 result["returnType"] = returnType; 6082 result["returnType"] = returnType;
5621 result["names"] = names; 6083 result["names"] = names;
5622 result["canCreateGetter"] = canCreateGetter; 6084 result["canCreateGetter"] = canCreateGetter;
5623 result["parameters"] = parameters.map((RefactoringMethodParameter value) => value.toJson()).toList(); 6085 result["parameters"] = parameters
6086 .map((RefactoringMethodParameter value) => value.toJson())
6087 .toList();
5624 result["offsets"] = offsets; 6088 result["offsets"] = offsets;
5625 result["lengths"] = lengths; 6089 result["lengths"] = lengths;
5626 return result; 6090 return result;
5627 } 6091 }
5628 6092
5629 @override 6093 @override
5630 String toString() => JSON.encode(toJson()); 6094 String toString() => JSON.encode(toJson());
5631 6095
5632 @override 6096 @override
5633 bool operator==(other) { 6097 bool operator ==(other) {
5634 if (other is ExtractMethodFeedback) { 6098 if (other is ExtractMethodFeedback) {
5635 return offset == other.offset && 6099 return offset == other.offset &&
5636 length == other.length && 6100 length == other.length &&
5637 returnType == other.returnType && 6101 returnType == other.returnType &&
5638 listEqual(names, other.names, (String a, String b) => a == b) && 6102 listEqual(names, other.names, (String a, String b) => a == b) &&
5639 canCreateGetter == other.canCreateGetter && 6103 canCreateGetter == other.canCreateGetter &&
5640 listEqual(parameters, other.parameters, (RefactoringMethodParameter a, RefactoringMethodParameter b) => a == b) && 6104 listEqual(
6105 parameters,
6106 other.parameters,
6107 (RefactoringMethodParameter a, RefactoringMethodParameter b) =>
6108 a == b) &&
5641 listEqual(offsets, other.offsets, (int a, int b) => a == b) && 6109 listEqual(offsets, other.offsets, (int a, int b) => a == b) &&
5642 listEqual(lengths, other.lengths, (int a, int b) => a == b); 6110 listEqual(lengths, other.lengths, (int a, int b) => a == b);
5643 } 6111 }
5644 return false; 6112 return false;
5645 } 6113 }
5646 6114
5647 @override 6115 @override
5648 int get hashCode { 6116 int get hashCode {
5649 int hash = 0; 6117 int hash = 0;
5650 hash = JenkinsSmiHash.combine(hash, offset.hashCode); 6118 hash = JenkinsSmiHash.combine(hash, offset.hashCode);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
5765 /** 6233 /**
5766 * True if all occurrences of the expression or statements should be replaced 6234 * True if all occurrences of the expression or statements should be replaced
5767 * by an invocation of the method. The expression or statements used to 6235 * by an invocation of the method. The expression or statements used to
5768 * initiate the refactoring will always be replaced. 6236 * initiate the refactoring will always be replaced.
5769 */ 6237 */
5770 void set extractAll(bool value) { 6238 void set extractAll(bool value) {
5771 assert(value != null); 6239 assert(value != null);
5772 this._extractAll = value; 6240 this._extractAll = value;
5773 } 6241 }
5774 6242
5775 ExtractMethodOptions(String returnType, bool createGetter, String name, List<R efactoringMethodParameter> parameters, bool extractAll) { 6243 ExtractMethodOptions(String returnType, bool createGetter, String name,
6244 List<RefactoringMethodParameter> parameters, bool extractAll) {
5776 this.returnType = returnType; 6245 this.returnType = returnType;
5777 this.createGetter = createGetter; 6246 this.createGetter = createGetter;
5778 this.name = name; 6247 this.name = name;
5779 this.parameters = parameters; 6248 this.parameters = parameters;
5780 this.extractAll = extractAll; 6249 this.extractAll = extractAll;
5781 } 6250 }
5782 6251
5783 factory ExtractMethodOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) { 6252 factory ExtractMethodOptions.fromJson(
6253 JsonDecoder jsonDecoder, String jsonPath, Object json) {
5784 if (json == null) { 6254 if (json == null) {
5785 json = {}; 6255 json = {};
5786 } 6256 }
5787 if (json is Map) { 6257 if (json is Map) {
5788 String returnType; 6258 String returnType;
5789 if (json.containsKey("returnType")) { 6259 if (json.containsKey("returnType")) {
5790 returnType = jsonDecoder.decodeString(jsonPath + ".returnType", json["re turnType"]); 6260 returnType = jsonDecoder.decodeString(
6261 jsonPath + ".returnType", json["returnType"]);
5791 } else { 6262 } else {
5792 throw jsonDecoder.mismatch(jsonPath, "returnType"); 6263 throw jsonDecoder.mismatch(jsonPath, "returnType");
5793 } 6264 }
5794 bool createGetter; 6265 bool createGetter;
5795 if (json.containsKey("createGetter")) { 6266 if (json.containsKey("createGetter")) {
5796 createGetter = jsonDecoder.decodeBool(jsonPath + ".createGetter", json[" createGetter"]); 6267 createGetter = jsonDecoder.decodeBool(
6268 jsonPath + ".createGetter", json["createGetter"]);
5797 } else { 6269 } else {
5798 throw jsonDecoder.mismatch(jsonPath, "createGetter"); 6270 throw jsonDecoder.mismatch(jsonPath, "createGetter");
5799 } 6271 }
5800 String name; 6272 String name;
5801 if (json.containsKey("name")) { 6273 if (json.containsKey("name")) {
5802 name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]); 6274 name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
5803 } else { 6275 } else {
5804 throw jsonDecoder.mismatch(jsonPath, "name"); 6276 throw jsonDecoder.mismatch(jsonPath, "name");
5805 } 6277 }
5806 List<RefactoringMethodParameter> parameters; 6278 List<RefactoringMethodParameter> parameters;
5807 if (json.containsKey("parameters")) { 6279 if (json.containsKey("parameters")) {
5808 parameters = jsonDecoder.decodeList(jsonPath + ".parameters", json["para meters"], (String jsonPath, Object json) => new RefactoringMethodParameter.fromJ son(jsonDecoder, jsonPath, json)); 6280 parameters = jsonDecoder.decodeList(
6281 jsonPath + ".parameters",
6282 json["parameters"],
6283 (String jsonPath, Object json) =>
6284 new RefactoringMethodParameter.fromJson(
6285 jsonDecoder, jsonPath, json));
5809 } else { 6286 } else {
5810 throw jsonDecoder.mismatch(jsonPath, "parameters"); 6287 throw jsonDecoder.mismatch(jsonPath, "parameters");
5811 } 6288 }
5812 bool extractAll; 6289 bool extractAll;
5813 if (json.containsKey("extractAll")) { 6290 if (json.containsKey("extractAll")) {
5814 extractAll = jsonDecoder.decodeBool(jsonPath + ".extractAll", json["extr actAll"]); 6291 extractAll = jsonDecoder.decodeBool(
6292 jsonPath + ".extractAll", json["extractAll"]);
5815 } else { 6293 } else {
5816 throw jsonDecoder.mismatch(jsonPath, "extractAll"); 6294 throw jsonDecoder.mismatch(jsonPath, "extractAll");
5817 } 6295 }
5818 return new ExtractMethodOptions(returnType, createGetter, name, parameters , extractAll); 6296 return new ExtractMethodOptions(
6297 returnType, createGetter, name, parameters, extractAll);
5819 } else { 6298 } else {
5820 throw jsonDecoder.mismatch(jsonPath, "extractMethod options", json); 6299 throw jsonDecoder.mismatch(jsonPath, "extractMethod options", json);
5821 } 6300 }
5822 } 6301 }
5823 6302
5824 factory ExtractMethodOptions.fromRefactoringParams(EditGetRefactoringParams re factoringParams, Request request) { 6303 factory ExtractMethodOptions.fromRefactoringParams(
6304 EditGetRefactoringParams refactoringParams, Request request) {
5825 return new ExtractMethodOptions.fromJson( 6305 return new ExtractMethodOptions.fromJson(
5826 new RequestDecoder(request), "options", refactoringParams.options); 6306 new RequestDecoder(request), "options", refactoringParams.options);
5827 } 6307 }
5828 6308
5829 @override 6309 @override
5830 Map<String, dynamic> toJson() { 6310 Map<String, dynamic> toJson() {
5831 Map<String, dynamic> result = {}; 6311 Map<String, dynamic> result = {};
5832 result["returnType"] = returnType; 6312 result["returnType"] = returnType;
5833 result["createGetter"] = createGetter; 6313 result["createGetter"] = createGetter;
5834 result["name"] = name; 6314 result["name"] = name;
5835 result["parameters"] = parameters.map((RefactoringMethodParameter value) => value.toJson()).toList(); 6315 result["parameters"] = parameters
6316 .map((RefactoringMethodParameter value) => value.toJson())
6317 .toList();
5836 result["extractAll"] = extractAll; 6318 result["extractAll"] = extractAll;
5837 return result; 6319 return result;
5838 } 6320 }
5839 6321
5840 @override 6322 @override
5841 String toString() => JSON.encode(toJson()); 6323 String toString() => JSON.encode(toJson());
5842 6324
5843 @override 6325 @override
5844 bool operator==(other) { 6326 bool operator ==(other) {
5845 if (other is ExtractMethodOptions) { 6327 if (other is ExtractMethodOptions) {
5846 return returnType == other.returnType && 6328 return returnType == other.returnType &&
5847 createGetter == other.createGetter && 6329 createGetter == other.createGetter &&
5848 name == other.name && 6330 name == other.name &&
5849 listEqual(parameters, other.parameters, (RefactoringMethodParameter a, RefactoringMethodParameter b) => a == b) && 6331 listEqual(
6332 parameters,
6333 other.parameters,
6334 (RefactoringMethodParameter a, RefactoringMethodParameter b) =>
6335 a == b) &&
5850 extractAll == other.extractAll; 6336 extractAll == other.extractAll;
5851 } 6337 }
5852 return false; 6338 return false;
5853 } 6339 }
5854 6340
5855 @override 6341 @override
5856 int get hashCode { 6342 int get hashCode {
5857 int hash = 0; 6343 int hash = 0;
5858 hash = JenkinsSmiHash.combine(hash, returnType.hashCode); 6344 hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
5859 hash = JenkinsSmiHash.combine(hash, createGetter.hashCode); 6345 hash = JenkinsSmiHash.combine(hash, createGetter.hashCode);
(...skipping 17 matching lines...) Expand all
5877 * 6363 *
5878 * Clients may not extend, implement or mix-in this class. 6364 * Clients may not extend, implement or mix-in this class.
5879 */ 6365 */
5880 class FoldingKind implements Enum { 6366 class FoldingKind implements Enum {
5881 static const FoldingKind COMMENT = const FoldingKind._("COMMENT"); 6367 static const FoldingKind COMMENT = const FoldingKind._("COMMENT");
5882 6368
5883 static const FoldingKind CLASS_MEMBER = const FoldingKind._("CLASS_MEMBER"); 6369 static const FoldingKind CLASS_MEMBER = const FoldingKind._("CLASS_MEMBER");
5884 6370
5885 static const FoldingKind DIRECTIVES = const FoldingKind._("DIRECTIVES"); 6371 static const FoldingKind DIRECTIVES = const FoldingKind._("DIRECTIVES");
5886 6372
5887 static const FoldingKind DOCUMENTATION_COMMENT = const FoldingKind._("DOCUMENT ATION_COMMENT"); 6373 static const FoldingKind DOCUMENTATION_COMMENT =
6374 const FoldingKind._("DOCUMENTATION_COMMENT");
5888 6375
5889 static const FoldingKind TOP_LEVEL_DECLARATION = const FoldingKind._("TOP_LEVE L_DECLARATION"); 6376 static const FoldingKind TOP_LEVEL_DECLARATION =
6377 const FoldingKind._("TOP_LEVEL_DECLARATION");
5890 6378
5891 /** 6379 /**
5892 * A list containing all of the enum values that are defined. 6380 * A list containing all of the enum values that are defined.
5893 */ 6381 */
5894 static const List<FoldingKind> VALUES = const <FoldingKind>[COMMENT, CLASS_MEM BER, DIRECTIVES, DOCUMENTATION_COMMENT, TOP_LEVEL_DECLARATION]; 6382 static const List<FoldingKind> VALUES = const <FoldingKind>[
6383 COMMENT,
6384 CLASS_MEMBER,
6385 DIRECTIVES,
6386 DOCUMENTATION_COMMENT,
6387 TOP_LEVEL_DECLARATION
6388 ];
5895 6389
5896 @override 6390 @override
5897 final String name; 6391 final String name;
5898 6392
5899 const FoldingKind._(this.name); 6393 const FoldingKind._(this.name);
5900 6394
5901 factory FoldingKind(String name) { 6395 factory FoldingKind(String name) {
5902 switch (name) { 6396 switch (name) {
5903 case "COMMENT": 6397 case "COMMENT":
5904 return COMMENT; 6398 return COMMENT;
5905 case "CLASS_MEMBER": 6399 case "CLASS_MEMBER":
5906 return CLASS_MEMBER; 6400 return CLASS_MEMBER;
5907 case "DIRECTIVES": 6401 case "DIRECTIVES":
5908 return DIRECTIVES; 6402 return DIRECTIVES;
5909 case "DOCUMENTATION_COMMENT": 6403 case "DOCUMENTATION_COMMENT":
5910 return DOCUMENTATION_COMMENT; 6404 return DOCUMENTATION_COMMENT;
5911 case "TOP_LEVEL_DECLARATION": 6405 case "TOP_LEVEL_DECLARATION":
5912 return TOP_LEVEL_DECLARATION; 6406 return TOP_LEVEL_DECLARATION;
5913 } 6407 }
5914 throw new Exception('Illegal enum value: $name'); 6408 throw new Exception('Illegal enum value: $name');
5915 } 6409 }
5916 6410
5917 factory FoldingKind.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 6411 factory FoldingKind.fromJson(
6412 JsonDecoder jsonDecoder, String jsonPath, Object json) {
5918 if (json is String) { 6413 if (json is String) {
5919 try { 6414 try {
5920 return new FoldingKind(json); 6415 return new FoldingKind(json);
5921 } catch(_) { 6416 } catch (_) {
5922 // Fall through 6417 // Fall through
5923 } 6418 }
5924 } 6419 }
5925 throw jsonDecoder.mismatch(jsonPath, "FoldingKind", json); 6420 throw jsonDecoder.mismatch(jsonPath, "FoldingKind", json);
5926 } 6421 }
5927 6422
5928 @override 6423 @override
5929 String toString() => "FoldingKind.$name"; 6424 String toString() => "FoldingKind.$name";
5930 6425
5931 String toJson() => name; 6426 String toJson() => name;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
5987 assert(value != null); 6482 assert(value != null);
5988 this._length = value; 6483 this._length = value;
5989 } 6484 }
5990 6485
5991 FoldingRegion(FoldingKind kind, int offset, int length) { 6486 FoldingRegion(FoldingKind kind, int offset, int length) {
5992 this.kind = kind; 6487 this.kind = kind;
5993 this.offset = offset; 6488 this.offset = offset;
5994 this.length = length; 6489 this.length = length;
5995 } 6490 }
5996 6491
5997 factory FoldingRegion.fromJson(JsonDecoder jsonDecoder, String jsonPath, Objec t json) { 6492 factory FoldingRegion.fromJson(
6493 JsonDecoder jsonDecoder, String jsonPath, Object json) {
5998 if (json == null) { 6494 if (json == null) {
5999 json = {}; 6495 json = {};
6000 } 6496 }
6001 if (json is Map) { 6497 if (json is Map) {
6002 FoldingKind kind; 6498 FoldingKind kind;
6003 if (json.containsKey("kind")) { 6499 if (json.containsKey("kind")) {
6004 kind = new FoldingKind.fromJson(jsonDecoder, jsonPath + ".kind", json["k ind"]); 6500 kind = new FoldingKind.fromJson(
6501 jsonDecoder, jsonPath + ".kind", json["kind"]);
6005 } else { 6502 } else {
6006 throw jsonDecoder.mismatch(jsonPath, "kind"); 6503 throw jsonDecoder.mismatch(jsonPath, "kind");
6007 } 6504 }
6008 int offset; 6505 int offset;
6009 if (json.containsKey("offset")) { 6506 if (json.containsKey("offset")) {
6010 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); 6507 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
6011 } else { 6508 } else {
6012 throw jsonDecoder.mismatch(jsonPath, "offset"); 6509 throw jsonDecoder.mismatch(jsonPath, "offset");
6013 } 6510 }
6014 int length; 6511 int length;
(...skipping 14 matching lines...) Expand all
6029 result["kind"] = kind.toJson(); 6526 result["kind"] = kind.toJson();
6030 result["offset"] = offset; 6527 result["offset"] = offset;
6031 result["length"] = length; 6528 result["length"] = length;
6032 return result; 6529 return result;
6033 } 6530 }
6034 6531
6035 @override 6532 @override
6036 String toString() => JSON.encode(toJson()); 6533 String toString() => JSON.encode(toJson());
6037 6534
6038 @override 6535 @override
6039 bool operator==(other) { 6536 bool operator ==(other) {
6040 if (other is FoldingRegion) { 6537 if (other is FoldingRegion) {
6041 return kind == other.kind && 6538 return kind == other.kind &&
6042 offset == other.offset && 6539 offset == other.offset &&
6043 length == other.length; 6540 length == other.length;
6044 } 6541 }
6045 return false; 6542 return false;
6046 } 6543 }
6047 6544
6048 @override 6545 @override
6049 int get hashCode { 6546 int get hashCode {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
6111 assert(value != null); 6608 assert(value != null);
6112 this._length = value; 6609 this._length = value;
6113 } 6610 }
6114 6611
6115 HighlightRegion(HighlightRegionType type, int offset, int length) { 6612 HighlightRegion(HighlightRegionType type, int offset, int length) {
6116 this.type = type; 6613 this.type = type;
6117 this.offset = offset; 6614 this.offset = offset;
6118 this.length = length; 6615 this.length = length;
6119 } 6616 }
6120 6617
6121 factory HighlightRegion.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obj ect json) { 6618 factory HighlightRegion.fromJson(
6619 JsonDecoder jsonDecoder, String jsonPath, Object json) {
6122 if (json == null) { 6620 if (json == null) {
6123 json = {}; 6621 json = {};
6124 } 6622 }
6125 if (json is Map) { 6623 if (json is Map) {
6126 HighlightRegionType type; 6624 HighlightRegionType type;
6127 if (json.containsKey("type")) { 6625 if (json.containsKey("type")) {
6128 type = new HighlightRegionType.fromJson(jsonDecoder, jsonPath + ".type", json["type"]); 6626 type = new HighlightRegionType.fromJson(
6627 jsonDecoder, jsonPath + ".type", json["type"]);
6129 } else { 6628 } else {
6130 throw jsonDecoder.mismatch(jsonPath, "type"); 6629 throw jsonDecoder.mismatch(jsonPath, "type");
6131 } 6630 }
6132 int offset; 6631 int offset;
6133 if (json.containsKey("offset")) { 6632 if (json.containsKey("offset")) {
6134 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); 6633 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
6135 } else { 6634 } else {
6136 throw jsonDecoder.mismatch(jsonPath, "offset"); 6635 throw jsonDecoder.mismatch(jsonPath, "offset");
6137 } 6636 }
6138 int length; 6637 int length;
(...skipping 14 matching lines...) Expand all
6153 result["type"] = type.toJson(); 6652 result["type"] = type.toJson();
6154 result["offset"] = offset; 6653 result["offset"] = offset;
6155 result["length"] = length; 6654 result["length"] = length;
6156 return result; 6655 return result;
6157 } 6656 }
6158 6657
6159 @override 6658 @override
6160 String toString() => JSON.encode(toJson()); 6659 String toString() => JSON.encode(toJson());
6161 6660
6162 @override 6661 @override
6163 bool operator==(other) { 6662 bool operator ==(other) {
6164 if (other is HighlightRegion) { 6663 if (other is HighlightRegion) {
6165 return type == other.type && 6664 return type == other.type &&
6166 offset == other.offset && 6665 offset == other.offset &&
6167 length == other.length; 6666 length == other.length;
6168 } 6667 }
6169 return false; 6668 return false;
6170 } 6669 }
6171 6670
6172 @override 6671 @override
6173 int get hashCode { 6672 int get hashCode {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
6254 * TOP_LEVEL_VARIABLE_DECLARATION 6753 * TOP_LEVEL_VARIABLE_DECLARATION
6255 * TYPE_NAME_DYNAMIC 6754 * TYPE_NAME_DYNAMIC
6256 * TYPE_PARAMETER 6755 * TYPE_PARAMETER
6257 * UNRESOLVED_INSTANCE_MEMBER_REFERENCE 6756 * UNRESOLVED_INSTANCE_MEMBER_REFERENCE
6258 * VALID_STRING_ESCAPE 6757 * VALID_STRING_ESCAPE
6259 * } 6758 * }
6260 * 6759 *
6261 * Clients may not extend, implement or mix-in this class. 6760 * Clients may not extend, implement or mix-in this class.
6262 */ 6761 */
6263 class HighlightRegionType implements Enum { 6762 class HighlightRegionType implements Enum {
6264 static const HighlightRegionType ANNOTATION = const HighlightRegionType._("ANN OTATION"); 6763 static const HighlightRegionType ANNOTATION =
6764 const HighlightRegionType._("ANNOTATION");
6265 6765
6266 static const HighlightRegionType BUILT_IN = const HighlightRegionType._("BUILT _IN"); 6766 static const HighlightRegionType BUILT_IN =
6767 const HighlightRegionType._("BUILT_IN");
6267 6768
6268 static const HighlightRegionType CLASS = const HighlightRegionType._("CLASS"); 6769 static const HighlightRegionType CLASS = const HighlightRegionType._("CLASS");
6269 6770
6270 static const HighlightRegionType COMMENT_BLOCK = const HighlightRegionType._(" COMMENT_BLOCK"); 6771 static const HighlightRegionType COMMENT_BLOCK =
6772 const HighlightRegionType._("COMMENT_BLOCK");
6271 6773
6272 static const HighlightRegionType COMMENT_DOCUMENTATION = const HighlightRegion Type._("COMMENT_DOCUMENTATION"); 6774 static const HighlightRegionType COMMENT_DOCUMENTATION =
6775 const HighlightRegionType._("COMMENT_DOCUMENTATION");
6273 6776
6274 static const HighlightRegionType COMMENT_END_OF_LINE = const HighlightRegionTy pe._("COMMENT_END_OF_LINE"); 6777 static const HighlightRegionType COMMENT_END_OF_LINE =
6778 const HighlightRegionType._("COMMENT_END_OF_LINE");
6275 6779
6276 static const HighlightRegionType CONSTRUCTOR = const HighlightRegionType._("CO NSTRUCTOR"); 6780 static const HighlightRegionType CONSTRUCTOR =
6781 const HighlightRegionType._("CONSTRUCTOR");
6277 6782
6278 static const HighlightRegionType DIRECTIVE = const HighlightRegionType._("DIRE CTIVE"); 6783 static const HighlightRegionType DIRECTIVE =
6784 const HighlightRegionType._("DIRECTIVE");
6279 6785
6280 /** 6786 /**
6281 * Only for version 1 of highlight. 6787 * Only for version 1 of highlight.
6282 */ 6788 */
6283 static const HighlightRegionType DYNAMIC_TYPE = const HighlightRegionType._("D YNAMIC_TYPE"); 6789 static const HighlightRegionType DYNAMIC_TYPE =
6790 const HighlightRegionType._("DYNAMIC_TYPE");
6284 6791
6285 /** 6792 /**
6286 * Only for version 2 of highlight. 6793 * Only for version 2 of highlight.
6287 */ 6794 */
6288 static const HighlightRegionType DYNAMIC_LOCAL_VARIABLE_DECLARATION = const Hi ghlightRegionType._("DYNAMIC_LOCAL_VARIABLE_DECLARATION"); 6795 static const HighlightRegionType DYNAMIC_LOCAL_VARIABLE_DECLARATION =
6796 const HighlightRegionType._("DYNAMIC_LOCAL_VARIABLE_DECLARATION");
6289 6797
6290 /** 6798 /**
6291 * Only for version 2 of highlight. 6799 * Only for version 2 of highlight.
6292 */ 6800 */
6293 static const HighlightRegionType DYNAMIC_LOCAL_VARIABLE_REFERENCE = const High lightRegionType._("DYNAMIC_LOCAL_VARIABLE_REFERENCE"); 6801 static const HighlightRegionType DYNAMIC_LOCAL_VARIABLE_REFERENCE =
6802 const HighlightRegionType._("DYNAMIC_LOCAL_VARIABLE_REFERENCE");
6294 6803
6295 /** 6804 /**
6296 * Only for version 2 of highlight. 6805 * Only for version 2 of highlight.
6297 */ 6806 */
6298 static const HighlightRegionType DYNAMIC_PARAMETER_DECLARATION = const Highlig htRegionType._("DYNAMIC_PARAMETER_DECLARATION"); 6807 static const HighlightRegionType DYNAMIC_PARAMETER_DECLARATION =
6808 const HighlightRegionType._("DYNAMIC_PARAMETER_DECLARATION");
6299 6809
6300 /** 6810 /**
6301 * Only for version 2 of highlight. 6811 * Only for version 2 of highlight.
6302 */ 6812 */
6303 static const HighlightRegionType DYNAMIC_PARAMETER_REFERENCE = const Highlight RegionType._("DYNAMIC_PARAMETER_REFERENCE"); 6813 static const HighlightRegionType DYNAMIC_PARAMETER_REFERENCE =
6814 const HighlightRegionType._("DYNAMIC_PARAMETER_REFERENCE");
6304 6815
6305 static const HighlightRegionType ENUM = const HighlightRegionType._("ENUM"); 6816 static const HighlightRegionType ENUM = const HighlightRegionType._("ENUM");
6306 6817
6307 static const HighlightRegionType ENUM_CONSTANT = const HighlightRegionType._(" ENUM_CONSTANT"); 6818 static const HighlightRegionType ENUM_CONSTANT =
6819 const HighlightRegionType._("ENUM_CONSTANT");
6308 6820
6309 /** 6821 /**
6310 * Only for version 1 of highlight. 6822 * Only for version 1 of highlight.
6311 */ 6823 */
6312 static const HighlightRegionType FIELD = const HighlightRegionType._("FIELD"); 6824 static const HighlightRegionType FIELD = const HighlightRegionType._("FIELD");
6313 6825
6314 /** 6826 /**
6315 * Only for version 1 of highlight. 6827 * Only for version 1 of highlight.
6316 */ 6828 */
6317 static const HighlightRegionType FIELD_STATIC = const HighlightRegionType._("F IELD_STATIC"); 6829 static const HighlightRegionType FIELD_STATIC =
6318 6830 const HighlightRegionType._("FIELD_STATIC");
6319 /** 6831
6320 * Only for version 1 of highlight. 6832 /**
6321 */ 6833 * Only for version 1 of highlight.
6322 static const HighlightRegionType FUNCTION = const HighlightRegionType._("FUNCT ION"); 6834 */
6323 6835 static const HighlightRegionType FUNCTION =
6324 /** 6836 const HighlightRegionType._("FUNCTION");
6325 * Only for version 1 of highlight. 6837
6326 */ 6838 /**
6327 static const HighlightRegionType FUNCTION_DECLARATION = const HighlightRegionT ype._("FUNCTION_DECLARATION"); 6839 * Only for version 1 of highlight.
6328 6840 */
6329 static const HighlightRegionType FUNCTION_TYPE_ALIAS = const HighlightRegionTy pe._("FUNCTION_TYPE_ALIAS"); 6841 static const HighlightRegionType FUNCTION_DECLARATION =
6330 6842 const HighlightRegionType._("FUNCTION_DECLARATION");
6331 /** 6843
6332 * Only for version 1 of highlight. 6844 static const HighlightRegionType FUNCTION_TYPE_ALIAS =
6333 */ 6845 const HighlightRegionType._("FUNCTION_TYPE_ALIAS");
6334 static const HighlightRegionType GETTER_DECLARATION = const HighlightRegionTyp e._("GETTER_DECLARATION"); 6846
6335 6847 /**
6336 static const HighlightRegionType IDENTIFIER_DEFAULT = const HighlightRegionTyp e._("IDENTIFIER_DEFAULT"); 6848 * Only for version 1 of highlight.
6337 6849 */
6338 static const HighlightRegionType IMPORT_PREFIX = const HighlightRegionType._(" IMPORT_PREFIX"); 6850 static const HighlightRegionType GETTER_DECLARATION =
6339 6851 const HighlightRegionType._("GETTER_DECLARATION");
6340 /** 6852
6341 * Only for version 2 of highlight. 6853 static const HighlightRegionType IDENTIFIER_DEFAULT =
6342 */ 6854 const HighlightRegionType._("IDENTIFIER_DEFAULT");
6343 static const HighlightRegionType INSTANCE_FIELD_DECLARATION = const HighlightR egionType._("INSTANCE_FIELD_DECLARATION"); 6855
6344 6856 static const HighlightRegionType IMPORT_PREFIX =
6345 /** 6857 const HighlightRegionType._("IMPORT_PREFIX");
6346 * Only for version 2 of highlight. 6858
6347 */ 6859 /**
6348 static const HighlightRegionType INSTANCE_FIELD_REFERENCE = const HighlightReg ionType._("INSTANCE_FIELD_REFERENCE"); 6860 * Only for version 2 of highlight.
6349 6861 */
6350 /** 6862 static const HighlightRegionType INSTANCE_FIELD_DECLARATION =
6351 * Only for version 2 of highlight. 6863 const HighlightRegionType._("INSTANCE_FIELD_DECLARATION");
6352 */ 6864
6353 static const HighlightRegionType INSTANCE_GETTER_DECLARATION = const Highlight RegionType._("INSTANCE_GETTER_DECLARATION"); 6865 /**
6354 6866 * Only for version 2 of highlight.
6355 /** 6867 */
6356 * Only for version 2 of highlight. 6868 static const HighlightRegionType INSTANCE_FIELD_REFERENCE =
6357 */ 6869 const HighlightRegionType._("INSTANCE_FIELD_REFERENCE");
6358 static const HighlightRegionType INSTANCE_GETTER_REFERENCE = const HighlightRe gionType._("INSTANCE_GETTER_REFERENCE"); 6870
6359 6871 /**
6360 /** 6872 * Only for version 2 of highlight.
6361 * Only for version 2 of highlight. 6873 */
6362 */ 6874 static const HighlightRegionType INSTANCE_GETTER_DECLARATION =
6363 static const HighlightRegionType INSTANCE_METHOD_DECLARATION = const Highlight RegionType._("INSTANCE_METHOD_DECLARATION"); 6875 const HighlightRegionType._("INSTANCE_GETTER_DECLARATION");
6364 6876
6365 /** 6877 /**
6366 * Only for version 2 of highlight. 6878 * Only for version 2 of highlight.
6367 */ 6879 */
6368 static const HighlightRegionType INSTANCE_METHOD_REFERENCE = const HighlightRe gionType._("INSTANCE_METHOD_REFERENCE"); 6880 static const HighlightRegionType INSTANCE_GETTER_REFERENCE =
6369 6881 const HighlightRegionType._("INSTANCE_GETTER_REFERENCE");
6370 /** 6882
6371 * Only for version 2 of highlight. 6883 /**
6372 */ 6884 * Only for version 2 of highlight.
6373 static const HighlightRegionType INSTANCE_SETTER_DECLARATION = const Highlight RegionType._("INSTANCE_SETTER_DECLARATION"); 6885 */
6374 6886 static const HighlightRegionType INSTANCE_METHOD_DECLARATION =
6375 /** 6887 const HighlightRegionType._("INSTANCE_METHOD_DECLARATION");
6376 * Only for version 2 of highlight. 6888
6377 */ 6889 /**
6378 static const HighlightRegionType INSTANCE_SETTER_REFERENCE = const HighlightRe gionType._("INSTANCE_SETTER_REFERENCE"); 6890 * Only for version 2 of highlight.
6379 6891 */
6380 /** 6892 static const HighlightRegionType INSTANCE_METHOD_REFERENCE =
6381 * Only for version 2 of highlight. 6893 const HighlightRegionType._("INSTANCE_METHOD_REFERENCE");
6382 */ 6894
6383 static const HighlightRegionType INVALID_STRING_ESCAPE = const HighlightRegion Type._("INVALID_STRING_ESCAPE"); 6895 /**
6384 6896 * Only for version 2 of highlight.
6385 static const HighlightRegionType KEYWORD = const HighlightRegionType._("KEYWOR D"); 6897 */
6898 static const HighlightRegionType INSTANCE_SETTER_DECLARATION =
6899 const HighlightRegionType._("INSTANCE_SETTER_DECLARATION");
6900
6901 /**
6902 * Only for version 2 of highlight.
6903 */
6904 static const HighlightRegionType INSTANCE_SETTER_REFERENCE =
6905 const HighlightRegionType._("INSTANCE_SETTER_REFERENCE");
6906
6907 /**
6908 * Only for version 2 of highlight.
6909 */
6910 static const HighlightRegionType INVALID_STRING_ESCAPE =
6911 const HighlightRegionType._("INVALID_STRING_ESCAPE");
6912
6913 static const HighlightRegionType KEYWORD =
6914 const HighlightRegionType._("KEYWORD");
6386 6915
6387 static const HighlightRegionType LABEL = const HighlightRegionType._("LABEL"); 6916 static const HighlightRegionType LABEL = const HighlightRegionType._("LABEL");
6388 6917
6389 /** 6918 /**
6390 * Only for version 2 of highlight. 6919 * Only for version 2 of highlight.
6391 */ 6920 */
6392 static const HighlightRegionType LIBRARY_NAME = const HighlightRegionType._("L IBRARY_NAME"); 6921 static const HighlightRegionType LIBRARY_NAME =
6393 6922 const HighlightRegionType._("LIBRARY_NAME");
6394 static const HighlightRegionType LITERAL_BOOLEAN = const HighlightRegionType._ ("LITERAL_BOOLEAN"); 6923
6395 6924 static const HighlightRegionType LITERAL_BOOLEAN =
6396 static const HighlightRegionType LITERAL_DOUBLE = const HighlightRegionType._( "LITERAL_DOUBLE"); 6925 const HighlightRegionType._("LITERAL_BOOLEAN");
6397 6926
6398 static const HighlightRegionType LITERAL_INTEGER = const HighlightRegionType._ ("LITERAL_INTEGER"); 6927 static const HighlightRegionType LITERAL_DOUBLE =
6399 6928 const HighlightRegionType._("LITERAL_DOUBLE");
6400 static const HighlightRegionType LITERAL_LIST = const HighlightRegionType._("L ITERAL_LIST"); 6929
6401 6930 static const HighlightRegionType LITERAL_INTEGER =
6402 static const HighlightRegionType LITERAL_MAP = const HighlightRegionType._("LI TERAL_MAP"); 6931 const HighlightRegionType._("LITERAL_INTEGER");
6403 6932
6404 static const HighlightRegionType LITERAL_STRING = const HighlightRegionType._( "LITERAL_STRING"); 6933 static const HighlightRegionType LITERAL_LIST =
6405 6934 const HighlightRegionType._("LITERAL_LIST");
6406 /** 6935
6407 * Only for version 2 of highlight. 6936 static const HighlightRegionType LITERAL_MAP =
6408 */ 6937 const HighlightRegionType._("LITERAL_MAP");
6409 static const HighlightRegionType LOCAL_FUNCTION_DECLARATION = const HighlightR egionType._("LOCAL_FUNCTION_DECLARATION"); 6938
6410 6939 static const HighlightRegionType LITERAL_STRING =
6411 /** 6940 const HighlightRegionType._("LITERAL_STRING");
6412 * Only for version 2 of highlight. 6941
6413 */ 6942 /**
6414 static const HighlightRegionType LOCAL_FUNCTION_REFERENCE = const HighlightReg ionType._("LOCAL_FUNCTION_REFERENCE"); 6943 * Only for version 2 of highlight.
6415 6944 */
6416 /** 6945 static const HighlightRegionType LOCAL_FUNCTION_DECLARATION =
6417 * Only for version 1 of highlight. 6946 const HighlightRegionType._("LOCAL_FUNCTION_DECLARATION");
6418 */ 6947
6419 static const HighlightRegionType LOCAL_VARIABLE = const HighlightRegionType._( "LOCAL_VARIABLE"); 6948 /**
6420 6949 * Only for version 2 of highlight.
6421 static const HighlightRegionType LOCAL_VARIABLE_DECLARATION = const HighlightR egionType._("LOCAL_VARIABLE_DECLARATION"); 6950 */
6422 6951 static const HighlightRegionType LOCAL_FUNCTION_REFERENCE =
6423 /** 6952 const HighlightRegionType._("LOCAL_FUNCTION_REFERENCE");
6424 * Only for version 2 of highlight. 6953
6425 */ 6954 /**
6426 static const HighlightRegionType LOCAL_VARIABLE_REFERENCE = const HighlightReg ionType._("LOCAL_VARIABLE_REFERENCE"); 6955 * Only for version 1 of highlight.
6427 6956 */
6428 /** 6957 static const HighlightRegionType LOCAL_VARIABLE =
6429 * Only for version 1 of highlight. 6958 const HighlightRegionType._("LOCAL_VARIABLE");
6430 */ 6959
6431 static const HighlightRegionType METHOD = const HighlightRegionType._("METHOD" ); 6960 static const HighlightRegionType LOCAL_VARIABLE_DECLARATION =
6432 6961 const HighlightRegionType._("LOCAL_VARIABLE_DECLARATION");
6433 /** 6962
6434 * Only for version 1 of highlight. 6963 /**
6435 */ 6964 * Only for version 2 of highlight.
6436 static const HighlightRegionType METHOD_DECLARATION = const HighlightRegionTyp e._("METHOD_DECLARATION"); 6965 */
6437 6966 static const HighlightRegionType LOCAL_VARIABLE_REFERENCE =
6438 /** 6967 const HighlightRegionType._("LOCAL_VARIABLE_REFERENCE");
6439 * Only for version 1 of highlight. 6968
6440 */ 6969 /**
6441 static const HighlightRegionType METHOD_DECLARATION_STATIC = const HighlightRe gionType._("METHOD_DECLARATION_STATIC"); 6970 * Only for version 1 of highlight.
6442 6971 */
6443 /** 6972 static const HighlightRegionType METHOD =
6444 * Only for version 1 of highlight. 6973 const HighlightRegionType._("METHOD");
6445 */ 6974
6446 static const HighlightRegionType METHOD_STATIC = const HighlightRegionType._(" METHOD_STATIC"); 6975 /**
6447 6976 * Only for version 1 of highlight.
6448 /** 6977 */
6449 * Only for version 1 of highlight. 6978 static const HighlightRegionType METHOD_DECLARATION =
6450 */ 6979 const HighlightRegionType._("METHOD_DECLARATION");
6451 static const HighlightRegionType PARAMETER = const HighlightRegionType._("PARA METER"); 6980
6452 6981 /**
6453 /** 6982 * Only for version 1 of highlight.
6454 * Only for version 1 of highlight. 6983 */
6455 */ 6984 static const HighlightRegionType METHOD_DECLARATION_STATIC =
6456 static const HighlightRegionType SETTER_DECLARATION = const HighlightRegionTyp e._("SETTER_DECLARATION"); 6985 const HighlightRegionType._("METHOD_DECLARATION_STATIC");
6457 6986
6458 /** 6987 /**
6459 * Only for version 1 of highlight. 6988 * Only for version 1 of highlight.
6460 */ 6989 */
6461 static const HighlightRegionType TOP_LEVEL_VARIABLE = const HighlightRegionTyp e._("TOP_LEVEL_VARIABLE"); 6990 static const HighlightRegionType METHOD_STATIC =
6462 6991 const HighlightRegionType._("METHOD_STATIC");
6463 /** 6992
6464 * Only for version 2 of highlight. 6993 /**
6465 */ 6994 * Only for version 1 of highlight.
6466 static const HighlightRegionType PARAMETER_DECLARATION = const HighlightRegion Type._("PARAMETER_DECLARATION"); 6995 */
6467 6996 static const HighlightRegionType PARAMETER =
6468 /** 6997 const HighlightRegionType._("PARAMETER");
6469 * Only for version 2 of highlight. 6998
6470 */ 6999 /**
6471 static const HighlightRegionType PARAMETER_REFERENCE = const HighlightRegionTy pe._("PARAMETER_REFERENCE"); 7000 * Only for version 1 of highlight.
6472 7001 */
6473 /** 7002 static const HighlightRegionType SETTER_DECLARATION =
6474 * Only for version 2 of highlight. 7003 const HighlightRegionType._("SETTER_DECLARATION");
6475 */ 7004
6476 static const HighlightRegionType STATIC_FIELD_DECLARATION = const HighlightReg ionType._("STATIC_FIELD_DECLARATION"); 7005 /**
6477 7006 * Only for version 1 of highlight.
6478 /** 7007 */
6479 * Only for version 2 of highlight. 7008 static const HighlightRegionType TOP_LEVEL_VARIABLE =
6480 */ 7009 const HighlightRegionType._("TOP_LEVEL_VARIABLE");
6481 static const HighlightRegionType STATIC_GETTER_DECLARATION = const HighlightRe gionType._("STATIC_GETTER_DECLARATION"); 7010
6482 7011 /**
6483 /** 7012 * Only for version 2 of highlight.
6484 * Only for version 2 of highlight. 7013 */
6485 */ 7014 static const HighlightRegionType PARAMETER_DECLARATION =
6486 static const HighlightRegionType STATIC_GETTER_REFERENCE = const HighlightRegi onType._("STATIC_GETTER_REFERENCE"); 7015 const HighlightRegionType._("PARAMETER_DECLARATION");
6487 7016
6488 /** 7017 /**
6489 * Only for version 2 of highlight. 7018 * Only for version 2 of highlight.
6490 */ 7019 */
6491 static const HighlightRegionType STATIC_METHOD_DECLARATION = const HighlightRe gionType._("STATIC_METHOD_DECLARATION"); 7020 static const HighlightRegionType PARAMETER_REFERENCE =
6492 7021 const HighlightRegionType._("PARAMETER_REFERENCE");
6493 /** 7022
6494 * Only for version 2 of highlight. 7023 /**
6495 */ 7024 * Only for version 2 of highlight.
6496 static const HighlightRegionType STATIC_METHOD_REFERENCE = const HighlightRegi onType._("STATIC_METHOD_REFERENCE"); 7025 */
6497 7026 static const HighlightRegionType STATIC_FIELD_DECLARATION =
6498 /** 7027 const HighlightRegionType._("STATIC_FIELD_DECLARATION");
6499 * Only for version 2 of highlight. 7028
6500 */ 7029 /**
6501 static const HighlightRegionType STATIC_SETTER_DECLARATION = const HighlightRe gionType._("STATIC_SETTER_DECLARATION"); 7030 * Only for version 2 of highlight.
6502 7031 */
6503 /** 7032 static const HighlightRegionType STATIC_GETTER_DECLARATION =
6504 * Only for version 2 of highlight. 7033 const HighlightRegionType._("STATIC_GETTER_DECLARATION");
6505 */ 7034
6506 static const HighlightRegionType STATIC_SETTER_REFERENCE = const HighlightRegi onType._("STATIC_SETTER_REFERENCE"); 7035 /**
6507 7036 * Only for version 2 of highlight.
6508 /** 7037 */
6509 * Only for version 2 of highlight. 7038 static const HighlightRegionType STATIC_GETTER_REFERENCE =
6510 */ 7039 const HighlightRegionType._("STATIC_GETTER_REFERENCE");
6511 static const HighlightRegionType TOP_LEVEL_FUNCTION_DECLARATION = const Highli ghtRegionType._("TOP_LEVEL_FUNCTION_DECLARATION"); 7040
6512 7041 /**
6513 /** 7042 * Only for version 2 of highlight.
6514 * Only for version 2 of highlight. 7043 */
6515 */ 7044 static const HighlightRegionType STATIC_METHOD_DECLARATION =
6516 static const HighlightRegionType TOP_LEVEL_FUNCTION_REFERENCE = const Highligh tRegionType._("TOP_LEVEL_FUNCTION_REFERENCE"); 7045 const HighlightRegionType._("STATIC_METHOD_DECLARATION");
6517 7046
6518 /** 7047 /**
6519 * Only for version 2 of highlight. 7048 * Only for version 2 of highlight.
6520 */ 7049 */
6521 static const HighlightRegionType TOP_LEVEL_GETTER_DECLARATION = const Highligh tRegionType._("TOP_LEVEL_GETTER_DECLARATION"); 7050 static const HighlightRegionType STATIC_METHOD_REFERENCE =
6522 7051 const HighlightRegionType._("STATIC_METHOD_REFERENCE");
6523 /** 7052
6524 * Only for version 2 of highlight. 7053 /**
6525 */ 7054 * Only for version 2 of highlight.
6526 static const HighlightRegionType TOP_LEVEL_GETTER_REFERENCE = const HighlightR egionType._("TOP_LEVEL_GETTER_REFERENCE"); 7055 */
6527 7056 static const HighlightRegionType STATIC_SETTER_DECLARATION =
6528 /** 7057 const HighlightRegionType._("STATIC_SETTER_DECLARATION");
6529 * Only for version 2 of highlight. 7058
6530 */ 7059 /**
6531 static const HighlightRegionType TOP_LEVEL_SETTER_DECLARATION = const Highligh tRegionType._("TOP_LEVEL_SETTER_DECLARATION"); 7060 * Only for version 2 of highlight.
6532 7061 */
6533 /** 7062 static const HighlightRegionType STATIC_SETTER_REFERENCE =
6534 * Only for version 2 of highlight. 7063 const HighlightRegionType._("STATIC_SETTER_REFERENCE");
6535 */ 7064
6536 static const HighlightRegionType TOP_LEVEL_SETTER_REFERENCE = const HighlightR egionType._("TOP_LEVEL_SETTER_REFERENCE"); 7065 /**
6537 7066 * Only for version 2 of highlight.
6538 /** 7067 */
6539 * Only for version 2 of highlight. 7068 static const HighlightRegionType TOP_LEVEL_FUNCTION_DECLARATION =
6540 */ 7069 const HighlightRegionType._("TOP_LEVEL_FUNCTION_DECLARATION");
6541 static const HighlightRegionType TOP_LEVEL_VARIABLE_DECLARATION = const Highli ghtRegionType._("TOP_LEVEL_VARIABLE_DECLARATION"); 7070
6542 7071 /**
6543 static const HighlightRegionType TYPE_NAME_DYNAMIC = const HighlightRegionType ._("TYPE_NAME_DYNAMIC"); 7072 * Only for version 2 of highlight.
6544 7073 */
6545 static const HighlightRegionType TYPE_PARAMETER = const HighlightRegionType._( "TYPE_PARAMETER"); 7074 static const HighlightRegionType TOP_LEVEL_FUNCTION_REFERENCE =
6546 7075 const HighlightRegionType._("TOP_LEVEL_FUNCTION_REFERENCE");
6547 /** 7076
6548 * Only for version 2 of highlight. 7077 /**
6549 */ 7078 * Only for version 2 of highlight.
6550 static const HighlightRegionType UNRESOLVED_INSTANCE_MEMBER_REFERENCE = const HighlightRegionType._("UNRESOLVED_INSTANCE_MEMBER_REFERENCE"); 7079 */
6551 7080 static const HighlightRegionType TOP_LEVEL_GETTER_DECLARATION =
6552 /** 7081 const HighlightRegionType._("TOP_LEVEL_GETTER_DECLARATION");
6553 * Only for version 2 of highlight. 7082
6554 */ 7083 /**
6555 static const HighlightRegionType VALID_STRING_ESCAPE = const HighlightRegionTy pe._("VALID_STRING_ESCAPE"); 7084 * Only for version 2 of highlight.
7085 */
7086 static const HighlightRegionType TOP_LEVEL_GETTER_REFERENCE =
7087 const HighlightRegionType._("TOP_LEVEL_GETTER_REFERENCE");
7088
7089 /**
7090 * Only for version 2 of highlight.
7091 */
7092 static const HighlightRegionType TOP_LEVEL_SETTER_DECLARATION =
7093 const HighlightRegionType._("TOP_LEVEL_SETTER_DECLARATION");
7094
7095 /**
7096 * Only for version 2 of highlight.
7097 */
7098 static const HighlightRegionType TOP_LEVEL_SETTER_REFERENCE =
7099 const HighlightRegionType._("TOP_LEVEL_SETTER_REFERENCE");
7100
7101 /**
7102 * Only for version 2 of highlight.
7103 */
7104 static const HighlightRegionType TOP_LEVEL_VARIABLE_DECLARATION =
7105 const HighlightRegionType._("TOP_LEVEL_VARIABLE_DECLARATION");
7106
7107 static const HighlightRegionType TYPE_NAME_DYNAMIC =
7108 const HighlightRegionType._("TYPE_NAME_DYNAMIC");
7109
7110 static const HighlightRegionType TYPE_PARAMETER =
7111 const HighlightRegionType._("TYPE_PARAMETER");
7112
7113 /**
7114 * Only for version 2 of highlight.
7115 */
7116 static const HighlightRegionType UNRESOLVED_INSTANCE_MEMBER_REFERENCE =
7117 const HighlightRegionType._("UNRESOLVED_INSTANCE_MEMBER_REFERENCE");
7118
7119 /**
7120 * Only for version 2 of highlight.
7121 */
7122 static const HighlightRegionType VALID_STRING_ESCAPE =
7123 const HighlightRegionType._("VALID_STRING_ESCAPE");
6556 7124
6557 /** 7125 /**
6558 * A list containing all of the enum values that are defined. 7126 * A list containing all of the enum values that are defined.
6559 */ 7127 */
6560 static const List<HighlightRegionType> VALUES = const <HighlightRegionType>[AN NOTATION, BUILT_IN, CLASS, COMMENT_BLOCK, COMMENT_DOCUMENTATION, COMMENT_END_OF_ LINE, CONSTRUCTOR, DIRECTIVE, DYNAMIC_TYPE, DYNAMIC_LOCAL_VARIABLE_DECLARATION, DYNAMIC_LOCAL_VARIABLE_REFERENCE, DYNAMIC_PARAMETER_DECLARATION, DYNAMIC_PARAMET ER_REFERENCE, ENUM, ENUM_CONSTANT, FIELD, FIELD_STATIC, FUNCTION, FUNCTION_DECLA RATION, FUNCTION_TYPE_ALIAS, GETTER_DECLARATION, IDENTIFIER_DEFAULT, IMPORT_PREF IX, INSTANCE_FIELD_DECLARATION, INSTANCE_FIELD_REFERENCE, INSTANCE_GETTER_DECLAR ATION, INSTANCE_GETTER_REFERENCE, INSTANCE_METHOD_DECLARATION, INSTANCE_METHOD_R EFERENCE, INSTANCE_SETTER_DECLARATION, INSTANCE_SETTER_REFERENCE, INVALID_STRING _ESCAPE, KEYWORD, LABEL, LIBRARY_NAME, LITERAL_BOOLEAN, LITERAL_DOUBLE, LITERAL_ INTEGER, LITERAL_LIST, LITERAL_MAP, LITERAL_STRING, LOCAL_FUNCTION_DECLARATION, LOCAL_FUNCTION_REFERENCE, LOCAL_VARIABLE, LOCAL_VARIABLE_DECLARATION, LOCAL_VARI ABLE_REFERENCE, METHOD, METHOD_DECLARATION, METHOD_DECLARATION_STATIC, METHOD_ST ATIC, PARAMETER, SETTER_DECLARATION, TOP_LEVEL_VARIABLE, PARAMETER_DECLARATION, PARAMETER_REFERENCE, STATIC_FIELD_DECLARATION, STATIC_GETTER_DECLARATION, STATIC _GETTER_REFERENCE, STATIC_METHOD_DECLARATION, STATIC_METHOD_REFERENCE, STATIC_SE TTER_DECLARATION, STATIC_SETTER_REFERENCE, TOP_LEVEL_FUNCTION_DECLARATION, TOP_L EVEL_FUNCTION_REFERENCE, TOP_LEVEL_GETTER_DECLARATION, TOP_LEVEL_GETTER_REFERENC E, TOP_LEVEL_SETTER_DECLARATION, TOP_LEVEL_SETTER_REFERENCE, TOP_LEVEL_VARIABLE_ DECLARATION, TYPE_NAME_DYNAMIC, TYPE_PARAMETER, UNRESOLVED_INSTANCE_MEMBER_REFER ENCE, VALID_STRING_ESCAPE]; 7128 static const List<HighlightRegionType> VALUES = const <HighlightRegionType>[
7129 ANNOTATION,
7130 BUILT_IN,
7131 CLASS,
7132 COMMENT_BLOCK,
7133 COMMENT_DOCUMENTATION,
7134 COMMENT_END_OF_LINE,
7135 CONSTRUCTOR,
7136 DIRECTIVE,
7137 DYNAMIC_TYPE,
7138 DYNAMIC_LOCAL_VARIABLE_DECLARATION,
7139 DYNAMIC_LOCAL_VARIABLE_REFERENCE,
7140 DYNAMIC_PARAMETER_DECLARATION,
7141 DYNAMIC_PARAMETER_REFERENCE,
7142 ENUM,
7143 ENUM_CONSTANT,
7144 FIELD,
7145 FIELD_STATIC,
7146 FUNCTION,
7147 FUNCTION_DECLARATION,
7148 FUNCTION_TYPE_ALIAS,
7149 GETTER_DECLARATION,
7150 IDENTIFIER_DEFAULT,
7151 IMPORT_PREFIX,
7152 INSTANCE_FIELD_DECLARATION,
7153 INSTANCE_FIELD_REFERENCE,
7154 INSTANCE_GETTER_DECLARATION,
7155 INSTANCE_GETTER_REFERENCE,
7156 INSTANCE_METHOD_DECLARATION,
7157 INSTANCE_METHOD_REFERENCE,
7158 INSTANCE_SETTER_DECLARATION,
7159 INSTANCE_SETTER_REFERENCE,
7160 INVALID_STRING_ESCAPE,
7161 KEYWORD,
7162 LABEL,
7163 LIBRARY_NAME,
7164 LITERAL_BOOLEAN,
7165 LITERAL_DOUBLE,
7166 LITERAL_INTEGER,
7167 LITERAL_LIST,
7168 LITERAL_MAP,
7169 LITERAL_STRING,
7170 LOCAL_FUNCTION_DECLARATION,
7171 LOCAL_FUNCTION_REFERENCE,
7172 LOCAL_VARIABLE,
7173 LOCAL_VARIABLE_DECLARATION,
7174 LOCAL_VARIABLE_REFERENCE,
7175 METHOD,
7176 METHOD_DECLARATION,
7177 METHOD_DECLARATION_STATIC,
7178 METHOD_STATIC,
7179 PARAMETER,
7180 SETTER_DECLARATION,
7181 TOP_LEVEL_VARIABLE,
7182 PARAMETER_DECLARATION,
7183 PARAMETER_REFERENCE,
7184 STATIC_FIELD_DECLARATION,
7185 STATIC_GETTER_DECLARATION,
7186 STATIC_GETTER_REFERENCE,
7187 STATIC_METHOD_DECLARATION,
7188 STATIC_METHOD_REFERENCE,
7189 STATIC_SETTER_DECLARATION,
7190 STATIC_SETTER_REFERENCE,
7191 TOP_LEVEL_FUNCTION_DECLARATION,
7192 TOP_LEVEL_FUNCTION_REFERENCE,
7193 TOP_LEVEL_GETTER_DECLARATION,
7194 TOP_LEVEL_GETTER_REFERENCE,
7195 TOP_LEVEL_SETTER_DECLARATION,
7196 TOP_LEVEL_SETTER_REFERENCE,
7197 TOP_LEVEL_VARIABLE_DECLARATION,
7198 TYPE_NAME_DYNAMIC,
7199 TYPE_PARAMETER,
7200 UNRESOLVED_INSTANCE_MEMBER_REFERENCE,
7201 VALID_STRING_ESCAPE
7202 ];
6561 7203
6562 @override 7204 @override
6563 final String name; 7205 final String name;
6564 7206
6565 const HighlightRegionType._(this.name); 7207 const HighlightRegionType._(this.name);
6566 7208
6567 factory HighlightRegionType(String name) { 7209 factory HighlightRegionType(String name) {
6568 switch (name) { 7210 switch (name) {
6569 case "ANNOTATION": 7211 case "ANNOTATION":
6570 return ANNOTATION; 7212 return ANNOTATION;
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
6709 case "TYPE_PARAMETER": 7351 case "TYPE_PARAMETER":
6710 return TYPE_PARAMETER; 7352 return TYPE_PARAMETER;
6711 case "UNRESOLVED_INSTANCE_MEMBER_REFERENCE": 7353 case "UNRESOLVED_INSTANCE_MEMBER_REFERENCE":
6712 return UNRESOLVED_INSTANCE_MEMBER_REFERENCE; 7354 return UNRESOLVED_INSTANCE_MEMBER_REFERENCE;
6713 case "VALID_STRING_ESCAPE": 7355 case "VALID_STRING_ESCAPE":
6714 return VALID_STRING_ESCAPE; 7356 return VALID_STRING_ESCAPE;
6715 } 7357 }
6716 throw new Exception('Illegal enum value: $name'); 7358 throw new Exception('Illegal enum value: $name');
6717 } 7359 }
6718 7360
6719 factory HighlightRegionType.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 7361 factory HighlightRegionType.fromJson(
7362 JsonDecoder jsonDecoder, String jsonPath, Object json) {
6720 if (json is String) { 7363 if (json is String) {
6721 try { 7364 try {
6722 return new HighlightRegionType(json); 7365 return new HighlightRegionType(json);
6723 } catch(_) { 7366 } catch (_) {
6724 // Fall through 7367 // Fall through
6725 } 7368 }
6726 } 7369 }
6727 throw jsonDecoder.mismatch(jsonPath, "HighlightRegionType", json); 7370 throw jsonDecoder.mismatch(jsonPath, "HighlightRegionType", json);
6728 } 7371 }
6729 7372
6730 @override 7373 @override
6731 String toString() => "HighlightRegionType.$name"; 7374 String toString() => "HighlightRegionType.$name";
6732 7375
6733 String toJson() => name; 7376 String toJson() => name;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
6772 void set occurrences(int value) { 7415 void set occurrences(int value) {
6773 assert(value != null); 7416 assert(value != null);
6774 this._occurrences = value; 7417 this._occurrences = value;
6775 } 7418 }
6776 7419
6777 InlineLocalVariableFeedback(String name, int occurrences) { 7420 InlineLocalVariableFeedback(String name, int occurrences) {
6778 this.name = name; 7421 this.name = name;
6779 this.occurrences = occurrences; 7422 this.occurrences = occurrences;
6780 } 7423 }
6781 7424
6782 factory InlineLocalVariableFeedback.fromJson(JsonDecoder jsonDecoder, String j sonPath, Object json) { 7425 factory InlineLocalVariableFeedback.fromJson(
7426 JsonDecoder jsonDecoder, String jsonPath, Object json) {
6783 if (json == null) { 7427 if (json == null) {
6784 json = {}; 7428 json = {};
6785 } 7429 }
6786 if (json is Map) { 7430 if (json is Map) {
6787 String name; 7431 String name;
6788 if (json.containsKey("name")) { 7432 if (json.containsKey("name")) {
6789 name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]); 7433 name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
6790 } else { 7434 } else {
6791 throw jsonDecoder.mismatch(jsonPath, "name"); 7435 throw jsonDecoder.mismatch(jsonPath, "name");
6792 } 7436 }
6793 int occurrences; 7437 int occurrences;
6794 if (json.containsKey("occurrences")) { 7438 if (json.containsKey("occurrences")) {
6795 occurrences = jsonDecoder.decodeInt(jsonPath + ".occurrences", json["occ urrences"]); 7439 occurrences = jsonDecoder.decodeInt(
7440 jsonPath + ".occurrences", json["occurrences"]);
6796 } else { 7441 } else {
6797 throw jsonDecoder.mismatch(jsonPath, "occurrences"); 7442 throw jsonDecoder.mismatch(jsonPath, "occurrences");
6798 } 7443 }
6799 return new InlineLocalVariableFeedback(name, occurrences); 7444 return new InlineLocalVariableFeedback(name, occurrences);
6800 } else { 7445 } else {
6801 throw jsonDecoder.mismatch(jsonPath, "inlineLocalVariable feedback", json) ; 7446 throw jsonDecoder.mismatch(
7447 jsonPath, "inlineLocalVariable feedback", json);
6802 } 7448 }
6803 } 7449 }
6804 7450
6805 @override 7451 @override
6806 Map<String, dynamic> toJson() { 7452 Map<String, dynamic> toJson() {
6807 Map<String, dynamic> result = {}; 7453 Map<String, dynamic> result = {};
6808 result["name"] = name; 7454 result["name"] = name;
6809 result["occurrences"] = occurrences; 7455 result["occurrences"] = occurrences;
6810 return result; 7456 return result;
6811 } 7457 }
6812 7458
6813 @override 7459 @override
6814 String toString() => JSON.encode(toJson()); 7460 String toString() => JSON.encode(toJson());
6815 7461
6816 @override 7462 @override
6817 bool operator==(other) { 7463 bool operator ==(other) {
6818 if (other is InlineLocalVariableFeedback) { 7464 if (other is InlineLocalVariableFeedback) {
6819 return name == other.name && 7465 return name == other.name && occurrences == other.occurrences;
6820 occurrences == other.occurrences;
6821 } 7466 }
6822 return false; 7467 return false;
6823 } 7468 }
6824 7469
6825 @override 7470 @override
6826 int get hashCode { 7471 int get hashCode {
6827 int hash = 0; 7472 int hash = 0;
6828 hash = JenkinsSmiHash.combine(hash, name.hashCode); 7473 hash = JenkinsSmiHash.combine(hash, name.hashCode);
6829 hash = JenkinsSmiHash.combine(hash, occurrences.hashCode); 7474 hash = JenkinsSmiHash.combine(hash, occurrences.hashCode);
6830 return JenkinsSmiHash.finish(hash); 7475 return JenkinsSmiHash.finish(hash);
6831 } 7476 }
6832 } 7477 }
6833 7478
6834 /** 7479 /**
6835 * inlineLocalVariable options 7480 * inlineLocalVariable options
6836 * 7481 *
6837 * Clients may not extend, implement or mix-in this class. 7482 * Clients may not extend, implement or mix-in this class.
6838 */ 7483 */
6839 class InlineLocalVariableOptions extends RefactoringOptions implements HasToJson { 7484 class InlineLocalVariableOptions extends RefactoringOptions
7485 implements HasToJson {
6840 @override 7486 @override
6841 bool operator==(other) { 7487 bool operator ==(other) {
6842 if (other is InlineLocalVariableOptions) { 7488 if (other is InlineLocalVariableOptions) {
6843 return true; 7489 return true;
6844 } 7490 }
6845 return false; 7491 return false;
6846 } 7492 }
6847 7493
6848 @override 7494 @override
6849 int get hashCode { 7495 int get hashCode {
6850 return 540364977; 7496 return 540364977;
6851 } 7497 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
6904 7550
6905 /** 7551 /**
6906 * True if the declaration of the method is selected and all references 7552 * True if the declaration of the method is selected and all references
6907 * should be inlined. 7553 * should be inlined.
6908 */ 7554 */
6909 void set isDeclaration(bool value) { 7555 void set isDeclaration(bool value) {
6910 assert(value != null); 7556 assert(value != null);
6911 this._isDeclaration = value; 7557 this._isDeclaration = value;
6912 } 7558 }
6913 7559
6914 InlineMethodFeedback(String methodName, bool isDeclaration, {String className} ) { 7560 InlineMethodFeedback(String methodName, bool isDeclaration,
7561 {String className}) {
6915 this.className = className; 7562 this.className = className;
6916 this.methodName = methodName; 7563 this.methodName = methodName;
6917 this.isDeclaration = isDeclaration; 7564 this.isDeclaration = isDeclaration;
6918 } 7565 }
6919 7566
6920 factory InlineMethodFeedback.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) { 7567 factory InlineMethodFeedback.fromJson(
7568 JsonDecoder jsonDecoder, String jsonPath, Object json) {
6921 if (json == null) { 7569 if (json == null) {
6922 json = {}; 7570 json = {};
6923 } 7571 }
6924 if (json is Map) { 7572 if (json is Map) {
6925 String className; 7573 String className;
6926 if (json.containsKey("className")) { 7574 if (json.containsKey("className")) {
6927 className = jsonDecoder.decodeString(jsonPath + ".className", json["clas sName"]); 7575 className = jsonDecoder.decodeString(
7576 jsonPath + ".className", json["className"]);
6928 } 7577 }
6929 String methodName; 7578 String methodName;
6930 if (json.containsKey("methodName")) { 7579 if (json.containsKey("methodName")) {
6931 methodName = jsonDecoder.decodeString(jsonPath + ".methodName", json["me thodName"]); 7580 methodName = jsonDecoder.decodeString(
7581 jsonPath + ".methodName", json["methodName"]);
6932 } else { 7582 } else {
6933 throw jsonDecoder.mismatch(jsonPath, "methodName"); 7583 throw jsonDecoder.mismatch(jsonPath, "methodName");
6934 } 7584 }
6935 bool isDeclaration; 7585 bool isDeclaration;
6936 if (json.containsKey("isDeclaration")) { 7586 if (json.containsKey("isDeclaration")) {
6937 isDeclaration = jsonDecoder.decodeBool(jsonPath + ".isDeclaration", json ["isDeclaration"]); 7587 isDeclaration = jsonDecoder.decodeBool(
7588 jsonPath + ".isDeclaration", json["isDeclaration"]);
6938 } else { 7589 } else {
6939 throw jsonDecoder.mismatch(jsonPath, "isDeclaration"); 7590 throw jsonDecoder.mismatch(jsonPath, "isDeclaration");
6940 } 7591 }
6941 return new InlineMethodFeedback(methodName, isDeclaration, className: clas sName); 7592 return new InlineMethodFeedback(methodName, isDeclaration,
7593 className: className);
6942 } else { 7594 } else {
6943 throw jsonDecoder.mismatch(jsonPath, "inlineMethod feedback", json); 7595 throw jsonDecoder.mismatch(jsonPath, "inlineMethod feedback", json);
6944 } 7596 }
6945 } 7597 }
6946 7598
6947 @override 7599 @override
6948 Map<String, dynamic> toJson() { 7600 Map<String, dynamic> toJson() {
6949 Map<String, dynamic> result = {}; 7601 Map<String, dynamic> result = {};
6950 if (className != null) { 7602 if (className != null) {
6951 result["className"] = className; 7603 result["className"] = className;
6952 } 7604 }
6953 result["methodName"] = methodName; 7605 result["methodName"] = methodName;
6954 result["isDeclaration"] = isDeclaration; 7606 result["isDeclaration"] = isDeclaration;
6955 return result; 7607 return result;
6956 } 7608 }
6957 7609
6958 @override 7610 @override
6959 String toString() => JSON.encode(toJson()); 7611 String toString() => JSON.encode(toJson());
6960 7612
6961 @override 7613 @override
6962 bool operator==(other) { 7614 bool operator ==(other) {
6963 if (other is InlineMethodFeedback) { 7615 if (other is InlineMethodFeedback) {
6964 return className == other.className && 7616 return className == other.className &&
6965 methodName == other.methodName && 7617 methodName == other.methodName &&
6966 isDeclaration == other.isDeclaration; 7618 isDeclaration == other.isDeclaration;
6967 } 7619 }
6968 return false; 7620 return false;
6969 } 7621 }
6970 7622
6971 @override 7623 @override
6972 int get hashCode { 7624 int get hashCode {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
7021 void set inlineAll(bool value) { 7673 void set inlineAll(bool value) {
7022 assert(value != null); 7674 assert(value != null);
7023 this._inlineAll = value; 7675 this._inlineAll = value;
7024 } 7676 }
7025 7677
7026 InlineMethodOptions(bool deleteSource, bool inlineAll) { 7678 InlineMethodOptions(bool deleteSource, bool inlineAll) {
7027 this.deleteSource = deleteSource; 7679 this.deleteSource = deleteSource;
7028 this.inlineAll = inlineAll; 7680 this.inlineAll = inlineAll;
7029 } 7681 }
7030 7682
7031 factory InlineMethodOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 7683 factory InlineMethodOptions.fromJson(
7684 JsonDecoder jsonDecoder, String jsonPath, Object json) {
7032 if (json == null) { 7685 if (json == null) {
7033 json = {}; 7686 json = {};
7034 } 7687 }
7035 if (json is Map) { 7688 if (json is Map) {
7036 bool deleteSource; 7689 bool deleteSource;
7037 if (json.containsKey("deleteSource")) { 7690 if (json.containsKey("deleteSource")) {
7038 deleteSource = jsonDecoder.decodeBool(jsonPath + ".deleteSource", json[" deleteSource"]); 7691 deleteSource = jsonDecoder.decodeBool(
7692 jsonPath + ".deleteSource", json["deleteSource"]);
7039 } else { 7693 } else {
7040 throw jsonDecoder.mismatch(jsonPath, "deleteSource"); 7694 throw jsonDecoder.mismatch(jsonPath, "deleteSource");
7041 } 7695 }
7042 bool inlineAll; 7696 bool inlineAll;
7043 if (json.containsKey("inlineAll")) { 7697 if (json.containsKey("inlineAll")) {
7044 inlineAll = jsonDecoder.decodeBool(jsonPath + ".inlineAll", json["inline All"]); 7698 inlineAll =
7699 jsonDecoder.decodeBool(jsonPath + ".inlineAll", json["inlineAll"]);
7045 } else { 7700 } else {
7046 throw jsonDecoder.mismatch(jsonPath, "inlineAll"); 7701 throw jsonDecoder.mismatch(jsonPath, "inlineAll");
7047 } 7702 }
7048 return new InlineMethodOptions(deleteSource, inlineAll); 7703 return new InlineMethodOptions(deleteSource, inlineAll);
7049 } else { 7704 } else {
7050 throw jsonDecoder.mismatch(jsonPath, "inlineMethod options", json); 7705 throw jsonDecoder.mismatch(jsonPath, "inlineMethod options", json);
7051 } 7706 }
7052 } 7707 }
7053 7708
7054 factory InlineMethodOptions.fromRefactoringParams(EditGetRefactoringParams ref actoringParams, Request request) { 7709 factory InlineMethodOptions.fromRefactoringParams(
7710 EditGetRefactoringParams refactoringParams, Request request) {
7055 return new InlineMethodOptions.fromJson( 7711 return new InlineMethodOptions.fromJson(
7056 new RequestDecoder(request), "options", refactoringParams.options); 7712 new RequestDecoder(request), "options", refactoringParams.options);
7057 } 7713 }
7058 7714
7059 @override 7715 @override
7060 Map<String, dynamic> toJson() { 7716 Map<String, dynamic> toJson() {
7061 Map<String, dynamic> result = {}; 7717 Map<String, dynamic> result = {};
7062 result["deleteSource"] = deleteSource; 7718 result["deleteSource"] = deleteSource;
7063 result["inlineAll"] = inlineAll; 7719 result["inlineAll"] = inlineAll;
7064 return result; 7720 return result;
7065 } 7721 }
7066 7722
7067 @override 7723 @override
7068 String toString() => JSON.encode(toJson()); 7724 String toString() => JSON.encode(toJson());
7069 7725
7070 @override 7726 @override
7071 bool operator==(other) { 7727 bool operator ==(other) {
7072 if (other is InlineMethodOptions) { 7728 if (other is InlineMethodOptions) {
7073 return deleteSource == other.deleteSource && 7729 return deleteSource == other.deleteSource && inlineAll == other.inlineAll;
7074 inlineAll == other.inlineAll;
7075 } 7730 }
7076 return false; 7731 return false;
7077 } 7732 }
7078 7733
7079 @override 7734 @override
7080 int get hashCode { 7735 int get hashCode {
7081 int hash = 0; 7736 int hash = 0;
7082 hash = JenkinsSmiHash.combine(hash, deleteSource.hashCode); 7737 hash = JenkinsSmiHash.combine(hash, deleteSource.hashCode);
7083 hash = JenkinsSmiHash.combine(hash, inlineAll.hashCode); 7738 hash = JenkinsSmiHash.combine(hash, inlineAll.hashCode);
7084 return JenkinsSmiHash.finish(hash); 7739 return JenkinsSmiHash.finish(hash);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
7137 7792
7138 /** 7793 /**
7139 * Pre-computed suggestions for what every region might want to be changed 7794 * Pre-computed suggestions for what every region might want to be changed
7140 * to. 7795 * to.
7141 */ 7796 */
7142 void set suggestions(List<LinkedEditSuggestion> value) { 7797 void set suggestions(List<LinkedEditSuggestion> value) {
7143 assert(value != null); 7798 assert(value != null);
7144 this._suggestions = value; 7799 this._suggestions = value;
7145 } 7800 }
7146 7801
7147 LinkedEditGroup(List<Position> positions, int length, List<LinkedEditSuggestio n> suggestions) { 7802 LinkedEditGroup(List<Position> positions, int length,
7803 List<LinkedEditSuggestion> suggestions) {
7148 this.positions = positions; 7804 this.positions = positions;
7149 this.length = length; 7805 this.length = length;
7150 this.suggestions = suggestions; 7806 this.suggestions = suggestions;
7151 } 7807 }
7152 7808
7153 factory LinkedEditGroup.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obj ect json) { 7809 factory LinkedEditGroup.fromJson(
7810 JsonDecoder jsonDecoder, String jsonPath, Object json) {
7154 if (json == null) { 7811 if (json == null) {
7155 json = {}; 7812 json = {};
7156 } 7813 }
7157 if (json is Map) { 7814 if (json is Map) {
7158 List<Position> positions; 7815 List<Position> positions;
7159 if (json.containsKey("positions")) { 7816 if (json.containsKey("positions")) {
7160 positions = jsonDecoder.decodeList(jsonPath + ".positions", json["positi ons"], (String jsonPath, Object json) => new Position.fromJson(jsonDecoder, json Path, json)); 7817 positions = jsonDecoder.decodeList(
7818 jsonPath + ".positions",
7819 json["positions"],
7820 (String jsonPath, Object json) =>
7821 new Position.fromJson(jsonDecoder, jsonPath, json));
7161 } else { 7822 } else {
7162 throw jsonDecoder.mismatch(jsonPath, "positions"); 7823 throw jsonDecoder.mismatch(jsonPath, "positions");
7163 } 7824 }
7164 int length; 7825 int length;
7165 if (json.containsKey("length")) { 7826 if (json.containsKey("length")) {
7166 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]); 7827 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
7167 } else { 7828 } else {
7168 throw jsonDecoder.mismatch(jsonPath, "length"); 7829 throw jsonDecoder.mismatch(jsonPath, "length");
7169 } 7830 }
7170 List<LinkedEditSuggestion> suggestions; 7831 List<LinkedEditSuggestion> suggestions;
7171 if (json.containsKey("suggestions")) { 7832 if (json.containsKey("suggestions")) {
7172 suggestions = jsonDecoder.decodeList(jsonPath + ".suggestions", json["su ggestions"], (String jsonPath, Object json) => new LinkedEditSuggestion.fromJson (jsonDecoder, jsonPath, json)); 7833 suggestions = jsonDecoder.decodeList(
7834 jsonPath + ".suggestions",
7835 json["suggestions"],
7836 (String jsonPath, Object json) =>
7837 new LinkedEditSuggestion.fromJson(jsonDecoder, jsonPath, json));
7173 } else { 7838 } else {
7174 throw jsonDecoder.mismatch(jsonPath, "suggestions"); 7839 throw jsonDecoder.mismatch(jsonPath, "suggestions");
7175 } 7840 }
7176 return new LinkedEditGroup(positions, length, suggestions); 7841 return new LinkedEditGroup(positions, length, suggestions);
7177 } else { 7842 } else {
7178 throw jsonDecoder.mismatch(jsonPath, "LinkedEditGroup", json); 7843 throw jsonDecoder.mismatch(jsonPath, "LinkedEditGroup", json);
7179 } 7844 }
7180 } 7845 }
7181 7846
7182 /** 7847 /**
7183 * Construct an empty LinkedEditGroup. 7848 * Construct an empty LinkedEditGroup.
7184 */ 7849 */
7185 LinkedEditGroup.empty() : this(<Position>[], 0, <LinkedEditSuggestion>[]); 7850 LinkedEditGroup.empty() : this(<Position>[], 0, <LinkedEditSuggestion>[]);
7186 7851
7187 @override 7852 @override
7188 Map<String, dynamic> toJson() { 7853 Map<String, dynamic> toJson() {
7189 Map<String, dynamic> result = {}; 7854 Map<String, dynamic> result = {};
7190 result["positions"] = positions.map((Position value) => value.toJson()).toLi st(); 7855 result["positions"] =
7856 positions.map((Position value) => value.toJson()).toList();
7191 result["length"] = length; 7857 result["length"] = length;
7192 result["suggestions"] = suggestions.map((LinkedEditSuggestion value) => valu e.toJson()).toList(); 7858 result["suggestions"] = suggestions
7859 .map((LinkedEditSuggestion value) => value.toJson())
7860 .toList();
7193 return result; 7861 return result;
7194 } 7862 }
7195 7863
7196 /** 7864 /**
7197 * Add a new position and change the length. 7865 * Add a new position and change the length.
7198 */ 7866 */
7199 void addPosition(Position position, int length) { 7867 void addPosition(Position position, int length) {
7200 positions.add(position); 7868 positions.add(position);
7201 this.length = length; 7869 this.length = length;
7202 } 7870 }
7203 7871
7204 /** 7872 /**
7205 * Add a new suggestion. 7873 * Add a new suggestion.
7206 */ 7874 */
7207 void addSuggestion(LinkedEditSuggestion suggestion) { 7875 void addSuggestion(LinkedEditSuggestion suggestion) {
7208 suggestions.add(suggestion); 7876 suggestions.add(suggestion);
7209 } 7877 }
7210 7878
7211 @override 7879 @override
7212 String toString() => JSON.encode(toJson()); 7880 String toString() => JSON.encode(toJson());
7213 7881
7214 @override 7882 @override
7215 bool operator==(other) { 7883 bool operator ==(other) {
7216 if (other is LinkedEditGroup) { 7884 if (other is LinkedEditGroup) {
7217 return listEqual(positions, other.positions, (Position a, Position b) => a == b) && 7885 return listEqual(
7886 positions, other.positions, (Position a, Position b) => a == b) &&
7218 length == other.length && 7887 length == other.length &&
7219 listEqual(suggestions, other.suggestions, (LinkedEditSuggestion a, Lin kedEditSuggestion b) => a == b); 7888 listEqual(suggestions, other.suggestions,
7889 (LinkedEditSuggestion a, LinkedEditSuggestion b) => a == b);
7220 } 7890 }
7221 return false; 7891 return false;
7222 } 7892 }
7223 7893
7224 @override 7894 @override
7225 int get hashCode { 7895 int get hashCode {
7226 int hash = 0; 7896 int hash = 0;
7227 hash = JenkinsSmiHash.combine(hash, positions.hashCode); 7897 hash = JenkinsSmiHash.combine(hash, positions.hashCode);
7228 hash = JenkinsSmiHash.combine(hash, length.hashCode); 7898 hash = JenkinsSmiHash.combine(hash, length.hashCode);
7229 hash = JenkinsSmiHash.combine(hash, suggestions.hashCode); 7899 hash = JenkinsSmiHash.combine(hash, suggestions.hashCode);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
7270 void set kind(LinkedEditSuggestionKind value) { 7940 void set kind(LinkedEditSuggestionKind value) {
7271 assert(value != null); 7941 assert(value != null);
7272 this._kind = value; 7942 this._kind = value;
7273 } 7943 }
7274 7944
7275 LinkedEditSuggestion(String value, LinkedEditSuggestionKind kind) { 7945 LinkedEditSuggestion(String value, LinkedEditSuggestionKind kind) {
7276 this.value = value; 7946 this.value = value;
7277 this.kind = kind; 7947 this.kind = kind;
7278 } 7948 }
7279 7949
7280 factory LinkedEditSuggestion.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) { 7950 factory LinkedEditSuggestion.fromJson(
7951 JsonDecoder jsonDecoder, String jsonPath, Object json) {
7281 if (json == null) { 7952 if (json == null) {
7282 json = {}; 7953 json = {};
7283 } 7954 }
7284 if (json is Map) { 7955 if (json is Map) {
7285 String value; 7956 String value;
7286 if (json.containsKey("value")) { 7957 if (json.containsKey("value")) {
7287 value = jsonDecoder.decodeString(jsonPath + ".value", json["value"]); 7958 value = jsonDecoder.decodeString(jsonPath + ".value", json["value"]);
7288 } else { 7959 } else {
7289 throw jsonDecoder.mismatch(jsonPath, "value"); 7960 throw jsonDecoder.mismatch(jsonPath, "value");
7290 } 7961 }
7291 LinkedEditSuggestionKind kind; 7962 LinkedEditSuggestionKind kind;
7292 if (json.containsKey("kind")) { 7963 if (json.containsKey("kind")) {
7293 kind = new LinkedEditSuggestionKind.fromJson(jsonDecoder, jsonPath + ".k ind", json["kind"]); 7964 kind = new LinkedEditSuggestionKind.fromJson(
7965 jsonDecoder, jsonPath + ".kind", json["kind"]);
7294 } else { 7966 } else {
7295 throw jsonDecoder.mismatch(jsonPath, "kind"); 7967 throw jsonDecoder.mismatch(jsonPath, "kind");
7296 } 7968 }
7297 return new LinkedEditSuggestion(value, kind); 7969 return new LinkedEditSuggestion(value, kind);
7298 } else { 7970 } else {
7299 throw jsonDecoder.mismatch(jsonPath, "LinkedEditSuggestion", json); 7971 throw jsonDecoder.mismatch(jsonPath, "LinkedEditSuggestion", json);
7300 } 7972 }
7301 } 7973 }
7302 7974
7303 @override 7975 @override
7304 Map<String, dynamic> toJson() { 7976 Map<String, dynamic> toJson() {
7305 Map<String, dynamic> result = {}; 7977 Map<String, dynamic> result = {};
7306 result["value"] = value; 7978 result["value"] = value;
7307 result["kind"] = kind.toJson(); 7979 result["kind"] = kind.toJson();
7308 return result; 7980 return result;
7309 } 7981 }
7310 7982
7311 @override 7983 @override
7312 String toString() => JSON.encode(toJson()); 7984 String toString() => JSON.encode(toJson());
7313 7985
7314 @override 7986 @override
7315 bool operator==(other) { 7987 bool operator ==(other) {
7316 if (other is LinkedEditSuggestion) { 7988 if (other is LinkedEditSuggestion) {
7317 return value == other.value && 7989 return value == other.value && kind == other.kind;
7318 kind == other.kind;
7319 } 7990 }
7320 return false; 7991 return false;
7321 } 7992 }
7322 7993
7323 @override 7994 @override
7324 int get hashCode { 7995 int get hashCode {
7325 int hash = 0; 7996 int hash = 0;
7326 hash = JenkinsSmiHash.combine(hash, value.hashCode); 7997 hash = JenkinsSmiHash.combine(hash, value.hashCode);
7327 hash = JenkinsSmiHash.combine(hash, kind.hashCode); 7998 hash = JenkinsSmiHash.combine(hash, kind.hashCode);
7328 return JenkinsSmiHash.finish(hash); 7999 return JenkinsSmiHash.finish(hash);
7329 } 8000 }
7330 } 8001 }
7331 8002
7332 /** 8003 /**
7333 * LinkedEditSuggestionKind 8004 * LinkedEditSuggestionKind
7334 * 8005 *
7335 * enum { 8006 * enum {
7336 * METHOD 8007 * METHOD
7337 * PARAMETER 8008 * PARAMETER
7338 * TYPE 8009 * TYPE
7339 * VARIABLE 8010 * VARIABLE
7340 * } 8011 * }
7341 * 8012 *
7342 * Clients may not extend, implement or mix-in this class. 8013 * Clients may not extend, implement or mix-in this class.
7343 */ 8014 */
7344 class LinkedEditSuggestionKind implements Enum { 8015 class LinkedEditSuggestionKind implements Enum {
7345 static const LinkedEditSuggestionKind METHOD = const LinkedEditSuggestionKind. _("METHOD"); 8016 static const LinkedEditSuggestionKind METHOD =
8017 const LinkedEditSuggestionKind._("METHOD");
7346 8018
7347 static const LinkedEditSuggestionKind PARAMETER = const LinkedEditSuggestionKi nd._("PARAMETER"); 8019 static const LinkedEditSuggestionKind PARAMETER =
8020 const LinkedEditSuggestionKind._("PARAMETER");
7348 8021
7349 static const LinkedEditSuggestionKind TYPE = const LinkedEditSuggestionKind._( "TYPE"); 8022 static const LinkedEditSuggestionKind TYPE =
8023 const LinkedEditSuggestionKind._("TYPE");
7350 8024
7351 static const LinkedEditSuggestionKind VARIABLE = const LinkedEditSuggestionKin d._("VARIABLE"); 8025 static const LinkedEditSuggestionKind VARIABLE =
8026 const LinkedEditSuggestionKind._("VARIABLE");
7352 8027
7353 /** 8028 /**
7354 * A list containing all of the enum values that are defined. 8029 * A list containing all of the enum values that are defined.
7355 */ 8030 */
7356 static const List<LinkedEditSuggestionKind> VALUES = const <LinkedEditSuggesti onKind>[METHOD, PARAMETER, TYPE, VARIABLE]; 8031 static const List<LinkedEditSuggestionKind> VALUES =
8032 const <LinkedEditSuggestionKind>[METHOD, PARAMETER, TYPE, VARIABLE];
7357 8033
7358 @override 8034 @override
7359 final String name; 8035 final String name;
7360 8036
7361 const LinkedEditSuggestionKind._(this.name); 8037 const LinkedEditSuggestionKind._(this.name);
7362 8038
7363 factory LinkedEditSuggestionKind(String name) { 8039 factory LinkedEditSuggestionKind(String name) {
7364 switch (name) { 8040 switch (name) {
7365 case "METHOD": 8041 case "METHOD":
7366 return METHOD; 8042 return METHOD;
7367 case "PARAMETER": 8043 case "PARAMETER":
7368 return PARAMETER; 8044 return PARAMETER;
7369 case "TYPE": 8045 case "TYPE":
7370 return TYPE; 8046 return TYPE;
7371 case "VARIABLE": 8047 case "VARIABLE":
7372 return VARIABLE; 8048 return VARIABLE;
7373 } 8049 }
7374 throw new Exception('Illegal enum value: $name'); 8050 throw new Exception('Illegal enum value: $name');
7375 } 8051 }
7376 8052
7377 factory LinkedEditSuggestionKind.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) { 8053 factory LinkedEditSuggestionKind.fromJson(
8054 JsonDecoder jsonDecoder, String jsonPath, Object json) {
7378 if (json is String) { 8055 if (json is String) {
7379 try { 8056 try {
7380 return new LinkedEditSuggestionKind(json); 8057 return new LinkedEditSuggestionKind(json);
7381 } catch(_) { 8058 } catch (_) {
7382 // Fall through 8059 // Fall through
7383 } 8060 }
7384 } 8061 }
7385 throw jsonDecoder.mismatch(jsonPath, "LinkedEditSuggestionKind", json); 8062 throw jsonDecoder.mismatch(jsonPath, "LinkedEditSuggestionKind", json);
7386 } 8063 }
7387 8064
7388 @override 8065 @override
7389 String toString() => "LinkedEditSuggestionKind.$name"; 8066 String toString() => "LinkedEditSuggestionKind.$name";
7390 8067
7391 String toJson() => name; 8068 String toJson() => name;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
7477 8154
7478 /** 8155 /**
7479 * The one-based index of the column containing the first character of the 8156 * The one-based index of the column containing the first character of the
7480 * range. 8157 * range.
7481 */ 8158 */
7482 void set startColumn(int value) { 8159 void set startColumn(int value) {
7483 assert(value != null); 8160 assert(value != null);
7484 this._startColumn = value; 8161 this._startColumn = value;
7485 } 8162 }
7486 8163
7487 Location(String file, int offset, int length, int startLine, int startColumn) { 8164 Location(
8165 String file, int offset, int length, int startLine, int startColumn) {
7488 this.file = file; 8166 this.file = file;
7489 this.offset = offset; 8167 this.offset = offset;
7490 this.length = length; 8168 this.length = length;
7491 this.startLine = startLine; 8169 this.startLine = startLine;
7492 this.startColumn = startColumn; 8170 this.startColumn = startColumn;
7493 } 8171 }
7494 8172
7495 factory Location.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object jso n) { 8173 factory Location.fromJson(
8174 JsonDecoder jsonDecoder, String jsonPath, Object json) {
7496 if (json == null) { 8175 if (json == null) {
7497 json = {}; 8176 json = {};
7498 } 8177 }
7499 if (json is Map) { 8178 if (json is Map) {
7500 String file; 8179 String file;
7501 if (json.containsKey("file")) { 8180 if (json.containsKey("file")) {
7502 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); 8181 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
7503 } else { 8182 } else {
7504 throw jsonDecoder.mismatch(jsonPath, "file"); 8183 throw jsonDecoder.mismatch(jsonPath, "file");
7505 } 8184 }
7506 int offset; 8185 int offset;
7507 if (json.containsKey("offset")) { 8186 if (json.containsKey("offset")) {
7508 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); 8187 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
7509 } else { 8188 } else {
7510 throw jsonDecoder.mismatch(jsonPath, "offset"); 8189 throw jsonDecoder.mismatch(jsonPath, "offset");
7511 } 8190 }
7512 int length; 8191 int length;
7513 if (json.containsKey("length")) { 8192 if (json.containsKey("length")) {
7514 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]); 8193 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
7515 } else { 8194 } else {
7516 throw jsonDecoder.mismatch(jsonPath, "length"); 8195 throw jsonDecoder.mismatch(jsonPath, "length");
7517 } 8196 }
7518 int startLine; 8197 int startLine;
7519 if (json.containsKey("startLine")) { 8198 if (json.containsKey("startLine")) {
7520 startLine = jsonDecoder.decodeInt(jsonPath + ".startLine", json["startLi ne"]); 8199 startLine =
8200 jsonDecoder.decodeInt(jsonPath + ".startLine", json["startLine"]);
7521 } else { 8201 } else {
7522 throw jsonDecoder.mismatch(jsonPath, "startLine"); 8202 throw jsonDecoder.mismatch(jsonPath, "startLine");
7523 } 8203 }
7524 int startColumn; 8204 int startColumn;
7525 if (json.containsKey("startColumn")) { 8205 if (json.containsKey("startColumn")) {
7526 startColumn = jsonDecoder.decodeInt(jsonPath + ".startColumn", json["sta rtColumn"]); 8206 startColumn = jsonDecoder.decodeInt(
8207 jsonPath + ".startColumn", json["startColumn"]);
7527 } else { 8208 } else {
7528 throw jsonDecoder.mismatch(jsonPath, "startColumn"); 8209 throw jsonDecoder.mismatch(jsonPath, "startColumn");
7529 } 8210 }
7530 return new Location(file, offset, length, startLine, startColumn); 8211 return new Location(file, offset, length, startLine, startColumn);
7531 } else { 8212 } else {
7532 throw jsonDecoder.mismatch(jsonPath, "Location", json); 8213 throw jsonDecoder.mismatch(jsonPath, "Location", json);
7533 } 8214 }
7534 } 8215 }
7535 8216
7536 @override 8217 @override
7537 Map<String, dynamic> toJson() { 8218 Map<String, dynamic> toJson() {
7538 Map<String, dynamic> result = {}; 8219 Map<String, dynamic> result = {};
7539 result["file"] = file; 8220 result["file"] = file;
7540 result["offset"] = offset; 8221 result["offset"] = offset;
7541 result["length"] = length; 8222 result["length"] = length;
7542 result["startLine"] = startLine; 8223 result["startLine"] = startLine;
7543 result["startColumn"] = startColumn; 8224 result["startColumn"] = startColumn;
7544 return result; 8225 return result;
7545 } 8226 }
7546 8227
7547 @override 8228 @override
7548 String toString() => JSON.encode(toJson()); 8229 String toString() => JSON.encode(toJson());
7549 8230
7550 @override 8231 @override
7551 bool operator==(other) { 8232 bool operator ==(other) {
7552 if (other is Location) { 8233 if (other is Location) {
7553 return file == other.file && 8234 return file == other.file &&
7554 offset == other.offset && 8235 offset == other.offset &&
7555 length == other.length && 8236 length == other.length &&
7556 startLine == other.startLine && 8237 startLine == other.startLine &&
7557 startColumn == other.startColumn; 8238 startColumn == other.startColumn;
7558 } 8239 }
7559 return false; 8240 return false;
7560 } 8241 }
7561 8242
7562 @override 8243 @override
7563 int get hashCode { 8244 int get hashCode {
7564 int hash = 0; 8245 int hash = 0;
7565 hash = JenkinsSmiHash.combine(hash, file.hashCode); 8246 hash = JenkinsSmiHash.combine(hash, file.hashCode);
7566 hash = JenkinsSmiHash.combine(hash, offset.hashCode); 8247 hash = JenkinsSmiHash.combine(hash, offset.hashCode);
7567 hash = JenkinsSmiHash.combine(hash, length.hashCode); 8248 hash = JenkinsSmiHash.combine(hash, length.hashCode);
7568 hash = JenkinsSmiHash.combine(hash, startLine.hashCode); 8249 hash = JenkinsSmiHash.combine(hash, startLine.hashCode);
7569 hash = JenkinsSmiHash.combine(hash, startColumn.hashCode); 8250 hash = JenkinsSmiHash.combine(hash, startColumn.hashCode);
7570 return JenkinsSmiHash.finish(hash); 8251 return JenkinsSmiHash.finish(hash);
7571 } 8252 }
7572 } 8253 }
7573 8254
7574 /** 8255 /**
7575 * moveFile feedback 8256 * moveFile feedback
7576 * 8257 *
7577 * Clients may not extend, implement or mix-in this class. 8258 * Clients may not extend, implement or mix-in this class.
7578 */ 8259 */
7579 class MoveFileFeedback extends RefactoringFeedback implements HasToJson { 8260 class MoveFileFeedback extends RefactoringFeedback implements HasToJson {
7580 @override 8261 @override
7581 bool operator==(other) { 8262 bool operator ==(other) {
7582 if (other is MoveFileFeedback) { 8263 if (other is MoveFileFeedback) {
7583 return true; 8264 return true;
7584 } 8265 }
7585 return false; 8266 return false;
7586 } 8267 }
7587 8268
7588 @override 8269 @override
7589 int get hashCode { 8270 int get hashCode {
7590 return 438975893; 8271 return 438975893;
7591 } 8272 }
(...skipping 21 matching lines...) Expand all
7613 */ 8294 */
7614 void set newFile(String value) { 8295 void set newFile(String value) {
7615 assert(value != null); 8296 assert(value != null);
7616 this._newFile = value; 8297 this._newFile = value;
7617 } 8298 }
7618 8299
7619 MoveFileOptions(String newFile) { 8300 MoveFileOptions(String newFile) {
7620 this.newFile = newFile; 8301 this.newFile = newFile;
7621 } 8302 }
7622 8303
7623 factory MoveFileOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obj ect json) { 8304 factory MoveFileOptions.fromJson(
8305 JsonDecoder jsonDecoder, String jsonPath, Object json) {
7624 if (json == null) { 8306 if (json == null) {
7625 json = {}; 8307 json = {};
7626 } 8308 }
7627 if (json is Map) { 8309 if (json is Map) {
7628 String newFile; 8310 String newFile;
7629 if (json.containsKey("newFile")) { 8311 if (json.containsKey("newFile")) {
7630 newFile = jsonDecoder.decodeString(jsonPath + ".newFile", json["newFile" ]); 8312 newFile =
8313 jsonDecoder.decodeString(jsonPath + ".newFile", json["newFile"]);
7631 } else { 8314 } else {
7632 throw jsonDecoder.mismatch(jsonPath, "newFile"); 8315 throw jsonDecoder.mismatch(jsonPath, "newFile");
7633 } 8316 }
7634 return new MoveFileOptions(newFile); 8317 return new MoveFileOptions(newFile);
7635 } else { 8318 } else {
7636 throw jsonDecoder.mismatch(jsonPath, "moveFile options", json); 8319 throw jsonDecoder.mismatch(jsonPath, "moveFile options", json);
7637 } 8320 }
7638 } 8321 }
7639 8322
7640 factory MoveFileOptions.fromRefactoringParams(EditGetRefactoringParams refacto ringParams, Request request) { 8323 factory MoveFileOptions.fromRefactoringParams(
8324 EditGetRefactoringParams refactoringParams, Request request) {
7641 return new MoveFileOptions.fromJson( 8325 return new MoveFileOptions.fromJson(
7642 new RequestDecoder(request), "options", refactoringParams.options); 8326 new RequestDecoder(request), "options", refactoringParams.options);
7643 } 8327 }
7644 8328
7645 @override 8329 @override
7646 Map<String, dynamic> toJson() { 8330 Map<String, dynamic> toJson() {
7647 Map<String, dynamic> result = {}; 8331 Map<String, dynamic> result = {};
7648 result["newFile"] = newFile; 8332 result["newFile"] = newFile;
7649 return result; 8333 return result;
7650 } 8334 }
7651 8335
7652 @override 8336 @override
7653 String toString() => JSON.encode(toJson()); 8337 String toString() => JSON.encode(toJson());
7654 8338
7655 @override 8339 @override
7656 bool operator==(other) { 8340 bool operator ==(other) {
7657 if (other is MoveFileOptions) { 8341 if (other is MoveFileOptions) {
7658 return newFile == other.newFile; 8342 return newFile == other.newFile;
7659 } 8343 }
7660 return false; 8344 return false;
7661 } 8345 }
7662 8346
7663 @override 8347 @override
7664 int get hashCode { 8348 int get hashCode {
7665 int hash = 0; 8349 int hash = 0;
7666 hash = JenkinsSmiHash.combine(hash, newFile.hashCode); 8350 hash = JenkinsSmiHash.combine(hash, newFile.hashCode);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
7728 assert(value != null); 8412 assert(value != null);
7729 this._targets = value; 8413 this._targets = value;
7730 } 8414 }
7731 8415
7732 NavigationRegion(int offset, int length, List<int> targets) { 8416 NavigationRegion(int offset, int length, List<int> targets) {
7733 this.offset = offset; 8417 this.offset = offset;
7734 this.length = length; 8418 this.length = length;
7735 this.targets = targets; 8419 this.targets = targets;
7736 } 8420 }
7737 8421
7738 factory NavigationRegion.fromJson(JsonDecoder jsonDecoder, String jsonPath, Ob ject json) { 8422 factory NavigationRegion.fromJson(
8423 JsonDecoder jsonDecoder, String jsonPath, Object json) {
7739 if (json == null) { 8424 if (json == null) {
7740 json = {}; 8425 json = {};
7741 } 8426 }
7742 if (json is Map) { 8427 if (json is Map) {
7743 int offset; 8428 int offset;
7744 if (json.containsKey("offset")) { 8429 if (json.containsKey("offset")) {
7745 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); 8430 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
7746 } else { 8431 } else {
7747 throw jsonDecoder.mismatch(jsonPath, "offset"); 8432 throw jsonDecoder.mismatch(jsonPath, "offset");
7748 } 8433 }
7749 int length; 8434 int length;
7750 if (json.containsKey("length")) { 8435 if (json.containsKey("length")) {
7751 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]); 8436 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
7752 } else { 8437 } else {
7753 throw jsonDecoder.mismatch(jsonPath, "length"); 8438 throw jsonDecoder.mismatch(jsonPath, "length");
7754 } 8439 }
7755 List<int> targets; 8440 List<int> targets;
7756 if (json.containsKey("targets")) { 8441 if (json.containsKey("targets")) {
7757 targets = jsonDecoder.decodeList(jsonPath + ".targets", json["targets"], jsonDecoder.decodeInt); 8442 targets = jsonDecoder.decodeList(
8443 jsonPath + ".targets", json["targets"], jsonDecoder.decodeInt);
7758 } else { 8444 } else {
7759 throw jsonDecoder.mismatch(jsonPath, "targets"); 8445 throw jsonDecoder.mismatch(jsonPath, "targets");
7760 } 8446 }
7761 return new NavigationRegion(offset, length, targets); 8447 return new NavigationRegion(offset, length, targets);
7762 } else { 8448 } else {
7763 throw jsonDecoder.mismatch(jsonPath, "NavigationRegion", json); 8449 throw jsonDecoder.mismatch(jsonPath, "NavigationRegion", json);
7764 } 8450 }
7765 } 8451 }
7766 8452
7767 @override 8453 @override
7768 Map<String, dynamic> toJson() { 8454 Map<String, dynamic> toJson() {
7769 Map<String, dynamic> result = {}; 8455 Map<String, dynamic> result = {};
7770 result["offset"] = offset; 8456 result["offset"] = offset;
7771 result["length"] = length; 8457 result["length"] = length;
7772 result["targets"] = targets; 8458 result["targets"] = targets;
7773 return result; 8459 return result;
7774 } 8460 }
7775 8461
7776 @override 8462 @override
7777 String toString() => JSON.encode(toJson()); 8463 String toString() => JSON.encode(toJson());
7778 8464
7779 @override 8465 @override
7780 bool operator==(other) { 8466 bool operator ==(other) {
7781 if (other is NavigationRegion) { 8467 if (other is NavigationRegion) {
7782 return offset == other.offset && 8468 return offset == other.offset &&
7783 length == other.length && 8469 length == other.length &&
7784 listEqual(targets, other.targets, (int a, int b) => a == b); 8470 listEqual(targets, other.targets, (int a, int b) => a == b);
7785 } 8471 }
7786 return false; 8472 return false;
7787 } 8473 }
7788 8474
7789 @override 8475 @override
7790 int get hashCode { 8476 int get hashCode {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
7900 8586
7901 /** 8587 /**
7902 * The one-based index of the column containing the first character of the 8588 * The one-based index of the column containing the first character of the
7903 * region. 8589 * region.
7904 */ 8590 */
7905 void set startColumn(int value) { 8591 void set startColumn(int value) {
7906 assert(value != null); 8592 assert(value != null);
7907 this._startColumn = value; 8593 this._startColumn = value;
7908 } 8594 }
7909 8595
7910 NavigationTarget(ElementKind kind, int fileIndex, int offset, int length, int startLine, int startColumn) { 8596 NavigationTarget(ElementKind kind, int fileIndex, int offset, int length,
8597 int startLine, int startColumn) {
7911 this.kind = kind; 8598 this.kind = kind;
7912 this.fileIndex = fileIndex; 8599 this.fileIndex = fileIndex;
7913 this.offset = offset; 8600 this.offset = offset;
7914 this.length = length; 8601 this.length = length;
7915 this.startLine = startLine; 8602 this.startLine = startLine;
7916 this.startColumn = startColumn; 8603 this.startColumn = startColumn;
7917 } 8604 }
7918 8605
7919 factory NavigationTarget.fromJson(JsonDecoder jsonDecoder, String jsonPath, Ob ject json) { 8606 factory NavigationTarget.fromJson(
8607 JsonDecoder jsonDecoder, String jsonPath, Object json) {
7920 if (json == null) { 8608 if (json == null) {
7921 json = {}; 8609 json = {};
7922 } 8610 }
7923 if (json is Map) { 8611 if (json is Map) {
7924 ElementKind kind; 8612 ElementKind kind;
7925 if (json.containsKey("kind")) { 8613 if (json.containsKey("kind")) {
7926 kind = new ElementKind.fromJson(jsonDecoder, jsonPath + ".kind", json["k ind"]); 8614 kind = new ElementKind.fromJson(
8615 jsonDecoder, jsonPath + ".kind", json["kind"]);
7927 } else { 8616 } else {
7928 throw jsonDecoder.mismatch(jsonPath, "kind"); 8617 throw jsonDecoder.mismatch(jsonPath, "kind");
7929 } 8618 }
7930 int fileIndex; 8619 int fileIndex;
7931 if (json.containsKey("fileIndex")) { 8620 if (json.containsKey("fileIndex")) {
7932 fileIndex = jsonDecoder.decodeInt(jsonPath + ".fileIndex", json["fileInd ex"]); 8621 fileIndex =
8622 jsonDecoder.decodeInt(jsonPath + ".fileIndex", json["fileIndex"]);
7933 } else { 8623 } else {
7934 throw jsonDecoder.mismatch(jsonPath, "fileIndex"); 8624 throw jsonDecoder.mismatch(jsonPath, "fileIndex");
7935 } 8625 }
7936 int offset; 8626 int offset;
7937 if (json.containsKey("offset")) { 8627 if (json.containsKey("offset")) {
7938 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); 8628 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
7939 } else { 8629 } else {
7940 throw jsonDecoder.mismatch(jsonPath, "offset"); 8630 throw jsonDecoder.mismatch(jsonPath, "offset");
7941 } 8631 }
7942 int length; 8632 int length;
7943 if (json.containsKey("length")) { 8633 if (json.containsKey("length")) {
7944 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]); 8634 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
7945 } else { 8635 } else {
7946 throw jsonDecoder.mismatch(jsonPath, "length"); 8636 throw jsonDecoder.mismatch(jsonPath, "length");
7947 } 8637 }
7948 int startLine; 8638 int startLine;
7949 if (json.containsKey("startLine")) { 8639 if (json.containsKey("startLine")) {
7950 startLine = jsonDecoder.decodeInt(jsonPath + ".startLine", json["startLi ne"]); 8640 startLine =
8641 jsonDecoder.decodeInt(jsonPath + ".startLine", json["startLine"]);
7951 } else { 8642 } else {
7952 throw jsonDecoder.mismatch(jsonPath, "startLine"); 8643 throw jsonDecoder.mismatch(jsonPath, "startLine");
7953 } 8644 }
7954 int startColumn; 8645 int startColumn;
7955 if (json.containsKey("startColumn")) { 8646 if (json.containsKey("startColumn")) {
7956 startColumn = jsonDecoder.decodeInt(jsonPath + ".startColumn", json["sta rtColumn"]); 8647 startColumn = jsonDecoder.decodeInt(
8648 jsonPath + ".startColumn", json["startColumn"]);
7957 } else { 8649 } else {
7958 throw jsonDecoder.mismatch(jsonPath, "startColumn"); 8650 throw jsonDecoder.mismatch(jsonPath, "startColumn");
7959 } 8651 }
7960 return new NavigationTarget(kind, fileIndex, offset, length, startLine, st artColumn); 8652 return new NavigationTarget(
8653 kind, fileIndex, offset, length, startLine, startColumn);
7961 } else { 8654 } else {
7962 throw jsonDecoder.mismatch(jsonPath, "NavigationTarget", json); 8655 throw jsonDecoder.mismatch(jsonPath, "NavigationTarget", json);
7963 } 8656 }
7964 } 8657 }
7965 8658
7966 @override 8659 @override
7967 Map<String, dynamic> toJson() { 8660 Map<String, dynamic> toJson() {
7968 Map<String, dynamic> result = {}; 8661 Map<String, dynamic> result = {};
7969 result["kind"] = kind.toJson(); 8662 result["kind"] = kind.toJson();
7970 result["fileIndex"] = fileIndex; 8663 result["fileIndex"] = fileIndex;
7971 result["offset"] = offset; 8664 result["offset"] = offset;
7972 result["length"] = length; 8665 result["length"] = length;
7973 result["startLine"] = startLine; 8666 result["startLine"] = startLine;
7974 result["startColumn"] = startColumn; 8667 result["startColumn"] = startColumn;
7975 return result; 8668 return result;
7976 } 8669 }
7977 8670
7978 @override 8671 @override
7979 String toString() => JSON.encode(toJson()); 8672 String toString() => JSON.encode(toJson());
7980 8673
7981 @override 8674 @override
7982 bool operator==(other) { 8675 bool operator ==(other) {
7983 if (other is NavigationTarget) { 8676 if (other is NavigationTarget) {
7984 return kind == other.kind && 8677 return kind == other.kind &&
7985 fileIndex == other.fileIndex && 8678 fileIndex == other.fileIndex &&
7986 offset == other.offset && 8679 offset == other.offset &&
7987 length == other.length && 8680 length == other.length &&
7988 startLine == other.startLine && 8681 startLine == other.startLine &&
7989 startColumn == other.startColumn; 8682 startColumn == other.startColumn;
7990 } 8683 }
7991 return false; 8684 return false;
7992 } 8685 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
8060 assert(value != null); 8753 assert(value != null);
8061 this._length = value; 8754 this._length = value;
8062 } 8755 }
8063 8756
8064 Occurrences(Element element, List<int> offsets, int length) { 8757 Occurrences(Element element, List<int> offsets, int length) {
8065 this.element = element; 8758 this.element = element;
8066 this.offsets = offsets; 8759 this.offsets = offsets;
8067 this.length = length; 8760 this.length = length;
8068 } 8761 }
8069 8762
8070 factory Occurrences.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 8763 factory Occurrences.fromJson(
8764 JsonDecoder jsonDecoder, String jsonPath, Object json) {
8071 if (json == null) { 8765 if (json == null) {
8072 json = {}; 8766 json = {};
8073 } 8767 }
8074 if (json is Map) { 8768 if (json is Map) {
8075 Element element; 8769 Element element;
8076 if (json.containsKey("element")) { 8770 if (json.containsKey("element")) {
8077 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[ "element"]); 8771 element = new Element.fromJson(
8772 jsonDecoder, jsonPath + ".element", json["element"]);
8078 } else { 8773 } else {
8079 throw jsonDecoder.mismatch(jsonPath, "element"); 8774 throw jsonDecoder.mismatch(jsonPath, "element");
8080 } 8775 }
8081 List<int> offsets; 8776 List<int> offsets;
8082 if (json.containsKey("offsets")) { 8777 if (json.containsKey("offsets")) {
8083 offsets = jsonDecoder.decodeList(jsonPath + ".offsets", json["offsets"], jsonDecoder.decodeInt); 8778 offsets = jsonDecoder.decodeList(
8779 jsonPath + ".offsets", json["offsets"], jsonDecoder.decodeInt);
8084 } else { 8780 } else {
8085 throw jsonDecoder.mismatch(jsonPath, "offsets"); 8781 throw jsonDecoder.mismatch(jsonPath, "offsets");
8086 } 8782 }
8087 int length; 8783 int length;
8088 if (json.containsKey("length")) { 8784 if (json.containsKey("length")) {
8089 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]); 8785 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
8090 } else { 8786 } else {
8091 throw jsonDecoder.mismatch(jsonPath, "length"); 8787 throw jsonDecoder.mismatch(jsonPath, "length");
8092 } 8788 }
8093 return new Occurrences(element, offsets, length); 8789 return new Occurrences(element, offsets, length);
8094 } else { 8790 } else {
8095 throw jsonDecoder.mismatch(jsonPath, "Occurrences", json); 8791 throw jsonDecoder.mismatch(jsonPath, "Occurrences", json);
8096 } 8792 }
8097 } 8793 }
8098 8794
8099 @override 8795 @override
8100 Map<String, dynamic> toJson() { 8796 Map<String, dynamic> toJson() {
8101 Map<String, dynamic> result = {}; 8797 Map<String, dynamic> result = {};
8102 result["element"] = element.toJson(); 8798 result["element"] = element.toJson();
8103 result["offsets"] = offsets; 8799 result["offsets"] = offsets;
8104 result["length"] = length; 8800 result["length"] = length;
8105 return result; 8801 return result;
8106 } 8802 }
8107 8803
8108 @override 8804 @override
8109 String toString() => JSON.encode(toJson()); 8805 String toString() => JSON.encode(toJson());
8110 8806
8111 @override 8807 @override
8112 bool operator==(other) { 8808 bool operator ==(other) {
8113 if (other is Occurrences) { 8809 if (other is Occurrences) {
8114 return element == other.element && 8810 return element == other.element &&
8115 listEqual(offsets, other.offsets, (int a, int b) => a == b) && 8811 listEqual(offsets, other.offsets, (int a, int b) => a == b) &&
8116 length == other.length; 8812 length == other.length;
8117 } 8813 }
8118 return false; 8814 return false;
8119 } 8815 }
8120 8816
8121 @override 8817 @override
8122 int get hashCode { 8818 int get hashCode {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
8208 this._children = value; 8904 this._children = value;
8209 } 8905 }
8210 8906
8211 Outline(Element element, int offset, int length, {List<Outline> children}) { 8907 Outline(Element element, int offset, int length, {List<Outline> children}) {
8212 this.element = element; 8908 this.element = element;
8213 this.offset = offset; 8909 this.offset = offset;
8214 this.length = length; 8910 this.length = length;
8215 this.children = children; 8911 this.children = children;
8216 } 8912 }
8217 8913
8218 factory Outline.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json ) { 8914 factory Outline.fromJson(
8915 JsonDecoder jsonDecoder, String jsonPath, Object json) {
8219 if (json == null) { 8916 if (json == null) {
8220 json = {}; 8917 json = {};
8221 } 8918 }
8222 if (json is Map) { 8919 if (json is Map) {
8223 Element element; 8920 Element element;
8224 if (json.containsKey("element")) { 8921 if (json.containsKey("element")) {
8225 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[ "element"]); 8922 element = new Element.fromJson(
8923 jsonDecoder, jsonPath + ".element", json["element"]);
8226 } else { 8924 } else {
8227 throw jsonDecoder.mismatch(jsonPath, "element"); 8925 throw jsonDecoder.mismatch(jsonPath, "element");
8228 } 8926 }
8229 int offset; 8927 int offset;
8230 if (json.containsKey("offset")) { 8928 if (json.containsKey("offset")) {
8231 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); 8929 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
8232 } else { 8930 } else {
8233 throw jsonDecoder.mismatch(jsonPath, "offset"); 8931 throw jsonDecoder.mismatch(jsonPath, "offset");
8234 } 8932 }
8235 int length; 8933 int length;
8236 if (json.containsKey("length")) { 8934 if (json.containsKey("length")) {
8237 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]); 8935 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
8238 } else { 8936 } else {
8239 throw jsonDecoder.mismatch(jsonPath, "length"); 8937 throw jsonDecoder.mismatch(jsonPath, "length");
8240 } 8938 }
8241 List<Outline> children; 8939 List<Outline> children;
8242 if (json.containsKey("children")) { 8940 if (json.containsKey("children")) {
8243 children = jsonDecoder.decodeList(jsonPath + ".children", json["children "], (String jsonPath, Object json) => new Outline.fromJson(jsonDecoder, jsonPath , json)); 8941 children = jsonDecoder.decodeList(
8942 jsonPath + ".children",
8943 json["children"],
8944 (String jsonPath, Object json) =>
8945 new Outline.fromJson(jsonDecoder, jsonPath, json));
8244 } 8946 }
8245 return new Outline(element, offset, length, children: children); 8947 return new Outline(element, offset, length, children: children);
8246 } else { 8948 } else {
8247 throw jsonDecoder.mismatch(jsonPath, "Outline", json); 8949 throw jsonDecoder.mismatch(jsonPath, "Outline", json);
8248 } 8950 }
8249 } 8951 }
8250 8952
8251 @override 8953 @override
8252 Map<String, dynamic> toJson() { 8954 Map<String, dynamic> toJson() {
8253 Map<String, dynamic> result = {}; 8955 Map<String, dynamic> result = {};
8254 result["element"] = element.toJson(); 8956 result["element"] = element.toJson();
8255 result["offset"] = offset; 8957 result["offset"] = offset;
8256 result["length"] = length; 8958 result["length"] = length;
8257 if (children != null) { 8959 if (children != null) {
8258 result["children"] = children.map((Outline value) => value.toJson()).toLis t(); 8960 result["children"] =
8961 children.map((Outline value) => value.toJson()).toList();
8259 } 8962 }
8260 return result; 8963 return result;
8261 } 8964 }
8262 8965
8263 @override 8966 @override
8264 String toString() => JSON.encode(toJson()); 8967 String toString() => JSON.encode(toJson());
8265 8968
8266 @override 8969 @override
8267 bool operator==(other) { 8970 bool operator ==(other) {
8268 if (other is Outline) { 8971 if (other is Outline) {
8269 return element == other.element && 8972 return element == other.element &&
8270 offset == other.offset && 8973 offset == other.offset &&
8271 length == other.length && 8974 length == other.length &&
8272 listEqual(children, other.children, (Outline a, Outline b) => a == b); 8975 listEqual(children, other.children, (Outline a, Outline b) => a == b);
8273 } 8976 }
8274 return false; 8977 return false;
8275 } 8978 }
8276 8979
8277 @override 8980 @override
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
8349 assert(value != null); 9052 assert(value != null);
8350 this._stackTrace = value; 9053 this._stackTrace = value;
8351 } 9054 }
8352 9055
8353 PluginErrorParams(bool isFatal, String message, String stackTrace) { 9056 PluginErrorParams(bool isFatal, String message, String stackTrace) {
8354 this.isFatal = isFatal; 9057 this.isFatal = isFatal;
8355 this.message = message; 9058 this.message = message;
8356 this.stackTrace = stackTrace; 9059 this.stackTrace = stackTrace;
8357 } 9060 }
8358 9061
8359 factory PluginErrorParams.fromJson(JsonDecoder jsonDecoder, String jsonPath, O bject json) { 9062 factory PluginErrorParams.fromJson(
9063 JsonDecoder jsonDecoder, String jsonPath, Object json) {
8360 if (json == null) { 9064 if (json == null) {
8361 json = {}; 9065 json = {};
8362 } 9066 }
8363 if (json is Map) { 9067 if (json is Map) {
8364 bool isFatal; 9068 bool isFatal;
8365 if (json.containsKey("isFatal")) { 9069 if (json.containsKey("isFatal")) {
8366 isFatal = jsonDecoder.decodeBool(jsonPath + ".isFatal", json["isFatal"]) ; 9070 isFatal =
9071 jsonDecoder.decodeBool(jsonPath + ".isFatal", json["isFatal"]);
8367 } else { 9072 } else {
8368 throw jsonDecoder.mismatch(jsonPath, "isFatal"); 9073 throw jsonDecoder.mismatch(jsonPath, "isFatal");
8369 } 9074 }
8370 String message; 9075 String message;
8371 if (json.containsKey("message")) { 9076 if (json.containsKey("message")) {
8372 message = jsonDecoder.decodeString(jsonPath + ".message", json["message" ]); 9077 message =
9078 jsonDecoder.decodeString(jsonPath + ".message", json["message"]);
8373 } else { 9079 } else {
8374 throw jsonDecoder.mismatch(jsonPath, "message"); 9080 throw jsonDecoder.mismatch(jsonPath, "message");
8375 } 9081 }
8376 String stackTrace; 9082 String stackTrace;
8377 if (json.containsKey("stackTrace")) { 9083 if (json.containsKey("stackTrace")) {
8378 stackTrace = jsonDecoder.decodeString(jsonPath + ".stackTrace", json["st ackTrace"]); 9084 stackTrace = jsonDecoder.decodeString(
9085 jsonPath + ".stackTrace", json["stackTrace"]);
8379 } else { 9086 } else {
8380 throw jsonDecoder.mismatch(jsonPath, "stackTrace"); 9087 throw jsonDecoder.mismatch(jsonPath, "stackTrace");
8381 } 9088 }
8382 return new PluginErrorParams(isFatal, message, stackTrace); 9089 return new PluginErrorParams(isFatal, message, stackTrace);
8383 } else { 9090 } else {
8384 throw jsonDecoder.mismatch(jsonPath, "plugin.error params", json); 9091 throw jsonDecoder.mismatch(jsonPath, "plugin.error params", json);
8385 } 9092 }
8386 } 9093 }
8387 9094
8388 factory PluginErrorParams.fromNotification(Notification notification) { 9095 factory PluginErrorParams.fromNotification(Notification notification) {
(...skipping 11 matching lines...) Expand all
8400 } 9107 }
8401 9108
8402 Notification toNotification() { 9109 Notification toNotification() {
8403 return new Notification("plugin.error", toJson()); 9110 return new Notification("plugin.error", toJson());
8404 } 9111 }
8405 9112
8406 @override 9113 @override
8407 String toString() => JSON.encode(toJson()); 9114 String toString() => JSON.encode(toJson());
8408 9115
8409 @override 9116 @override
8410 bool operator==(other) { 9117 bool operator ==(other) {
8411 if (other is PluginErrorParams) { 9118 if (other is PluginErrorParams) {
8412 return isFatal == other.isFatal && 9119 return isFatal == other.isFatal &&
8413 message == other.message && 9120 message == other.message &&
8414 stackTrace == other.stackTrace; 9121 stackTrace == other.stackTrace;
8415 } 9122 }
8416 return false; 9123 return false;
8417 } 9124 }
8418 9125
8419 @override 9126 @override
8420 int get hashCode { 9127 int get hashCode {
(...skipping 13 matching lines...) Expand all
8434 class PluginShutdownParams implements RequestParams { 9141 class PluginShutdownParams implements RequestParams {
8435 @override 9142 @override
8436 Map<String, dynamic> toJson() => <String, dynamic>{}; 9143 Map<String, dynamic> toJson() => <String, dynamic>{};
8437 9144
8438 @override 9145 @override
8439 Request toRequest(String id) { 9146 Request toRequest(String id) {
8440 return new Request(id, "plugin.shutdown", null); 9147 return new Request(id, "plugin.shutdown", null);
8441 } 9148 }
8442 9149
8443 @override 9150 @override
8444 bool operator==(other) { 9151 bool operator ==(other) {
8445 if (other is PluginShutdownParams) { 9152 if (other is PluginShutdownParams) {
8446 return true; 9153 return true;
8447 } 9154 }
8448 return false; 9155 return false;
8449 } 9156 }
8450 9157
8451 @override 9158 @override
8452 int get hashCode { 9159 int get hashCode {
8453 return 478064585; 9160 return 478064585;
8454 } 9161 }
8455 } 9162 }
8456 9163
8457 /** 9164 /**
8458 * plugin.shutdown result 9165 * plugin.shutdown result
8459 * 9166 *
8460 * Clients may not extend, implement or mix-in this class. 9167 * Clients may not extend, implement or mix-in this class.
8461 */ 9168 */
8462 class PluginShutdownResult implements ResponseResult { 9169 class PluginShutdownResult implements ResponseResult {
8463 @override 9170 @override
8464 Map<String, dynamic> toJson() => <String, dynamic>{}; 9171 Map<String, dynamic> toJson() => <String, dynamic>{};
8465 9172
8466 @override 9173 @override
8467 Response toResponse(String id) { 9174 Response toResponse(String id) {
8468 return new Response(id, result: null); 9175 return new Response(id, result: null);
8469 } 9176 }
8470 9177
8471 @override 9178 @override
8472 bool operator==(other) { 9179 bool operator ==(other) {
8473 if (other is PluginShutdownResult) { 9180 if (other is PluginShutdownResult) {
8474 return true; 9181 return true;
8475 } 9182 }
8476 return false; 9183 return false;
8477 } 9184 }
8478 9185
8479 @override 9186 @override
8480 int get hashCode { 9187 int get hashCode {
8481 return 9389109; 9188 return 9389109;
8482 } 9189 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
8525 void set version(String value) { 9232 void set version(String value) {
8526 assert(value != null); 9233 assert(value != null);
8527 this._version = value; 9234 this._version = value;
8528 } 9235 }
8529 9236
8530 PluginVersionCheckParams(String byteStorePath, String version) { 9237 PluginVersionCheckParams(String byteStorePath, String version) {
8531 this.byteStorePath = byteStorePath; 9238 this.byteStorePath = byteStorePath;
8532 this.version = version; 9239 this.version = version;
8533 } 9240 }
8534 9241
8535 factory PluginVersionCheckParams.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) { 9242 factory PluginVersionCheckParams.fromJson(
9243 JsonDecoder jsonDecoder, String jsonPath, Object json) {
8536 if (json == null) { 9244 if (json == null) {
8537 json = {}; 9245 json = {};
8538 } 9246 }
8539 if (json is Map) { 9247 if (json is Map) {
8540 String byteStorePath; 9248 String byteStorePath;
8541 if (json.containsKey("byteStorePath")) { 9249 if (json.containsKey("byteStorePath")) {
8542 byteStorePath = jsonDecoder.decodeString(jsonPath + ".byteStorePath", js on["byteStorePath"]); 9250 byteStorePath = jsonDecoder.decodeString(
9251 jsonPath + ".byteStorePath", json["byteStorePath"]);
8543 } else { 9252 } else {
8544 throw jsonDecoder.mismatch(jsonPath, "byteStorePath"); 9253 throw jsonDecoder.mismatch(jsonPath, "byteStorePath");
8545 } 9254 }
8546 String version; 9255 String version;
8547 if (json.containsKey("version")) { 9256 if (json.containsKey("version")) {
8548 version = jsonDecoder.decodeString(jsonPath + ".version", json["version" ]); 9257 version =
9258 jsonDecoder.decodeString(jsonPath + ".version", json["version"]);
8549 } else { 9259 } else {
8550 throw jsonDecoder.mismatch(jsonPath, "version"); 9260 throw jsonDecoder.mismatch(jsonPath, "version");
8551 } 9261 }
8552 return new PluginVersionCheckParams(byteStorePath, version); 9262 return new PluginVersionCheckParams(byteStorePath, version);
8553 } else { 9263 } else {
8554 throw jsonDecoder.mismatch(jsonPath, "plugin.versionCheck params", json); 9264 throw jsonDecoder.mismatch(jsonPath, "plugin.versionCheck params", json);
8555 } 9265 }
8556 } 9266 }
8557 9267
8558 factory PluginVersionCheckParams.fromRequest(Request request) { 9268 factory PluginVersionCheckParams.fromRequest(Request request) {
(...skipping 11 matching lines...) Expand all
8570 9280
8571 @override 9281 @override
8572 Request toRequest(String id) { 9282 Request toRequest(String id) {
8573 return new Request(id, "plugin.versionCheck", toJson()); 9283 return new Request(id, "plugin.versionCheck", toJson());
8574 } 9284 }
8575 9285
8576 @override 9286 @override
8577 String toString() => JSON.encode(toJson()); 9287 String toString() => JSON.encode(toJson());
8578 9288
8579 @override 9289 @override
8580 bool operator==(other) { 9290 bool operator ==(other) {
8581 if (other is PluginVersionCheckParams) { 9291 if (other is PluginVersionCheckParams) {
8582 return byteStorePath == other.byteStorePath && 9292 return byteStorePath == other.byteStorePath && version == other.version;
8583 version == other.version;
8584 } 9293 }
8585 return false; 9294 return false;
8586 } 9295 }
8587 9296
8588 @override 9297 @override
8589 int get hashCode { 9298 int get hashCode {
8590 int hash = 0; 9299 int hash = 0;
8591 hash = JenkinsSmiHash.combine(hash, byteStorePath.hashCode); 9300 hash = JenkinsSmiHash.combine(hash, byteStorePath.hashCode);
8592 hash = JenkinsSmiHash.combine(hash, version.hashCode); 9301 hash = JenkinsSmiHash.combine(hash, version.hashCode);
8593 return JenkinsSmiHash.finish(hash); 9302 return JenkinsSmiHash.finish(hash);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
8691 * The glob patterns of the files for which the plugin will provide 9400 * The glob patterns of the files for which the plugin will provide
8692 * information. This value is ignored if the isCompatible field is false. 9401 * information. This value is ignored if the isCompatible field is false.
8693 * Otherwise, it will be used to identify the files for which the plugin 9402 * Otherwise, it will be used to identify the files for which the plugin
8694 * should be notified of changes. 9403 * should be notified of changes.
8695 */ 9404 */
8696 void set interestingFiles(List<String> value) { 9405 void set interestingFiles(List<String> value) {
8697 assert(value != null); 9406 assert(value != null);
8698 this._interestingFiles = value; 9407 this._interestingFiles = value;
8699 } 9408 }
8700 9409
8701 PluginVersionCheckResult(bool isCompatible, String name, String version, List< String> interestingFiles, {String contactInfo}) { 9410 PluginVersionCheckResult(bool isCompatible, String name, String version,
9411 List<String> interestingFiles,
9412 {String contactInfo}) {
8702 this.isCompatible = isCompatible; 9413 this.isCompatible = isCompatible;
8703 this.name = name; 9414 this.name = name;
8704 this.version = version; 9415 this.version = version;
8705 this.contactInfo = contactInfo; 9416 this.contactInfo = contactInfo;
8706 this.interestingFiles = interestingFiles; 9417 this.interestingFiles = interestingFiles;
8707 } 9418 }
8708 9419
8709 factory PluginVersionCheckResult.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) { 9420 factory PluginVersionCheckResult.fromJson(
9421 JsonDecoder jsonDecoder, String jsonPath, Object json) {
8710 if (json == null) { 9422 if (json == null) {
8711 json = {}; 9423 json = {};
8712 } 9424 }
8713 if (json is Map) { 9425 if (json is Map) {
8714 bool isCompatible; 9426 bool isCompatible;
8715 if (json.containsKey("isCompatible")) { 9427 if (json.containsKey("isCompatible")) {
8716 isCompatible = jsonDecoder.decodeBool(jsonPath + ".isCompatible", json[" isCompatible"]); 9428 isCompatible = jsonDecoder.decodeBool(
9429 jsonPath + ".isCompatible", json["isCompatible"]);
8717 } else { 9430 } else {
8718 throw jsonDecoder.mismatch(jsonPath, "isCompatible"); 9431 throw jsonDecoder.mismatch(jsonPath, "isCompatible");
8719 } 9432 }
8720 String name; 9433 String name;
8721 if (json.containsKey("name")) { 9434 if (json.containsKey("name")) {
8722 name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]); 9435 name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
8723 } else { 9436 } else {
8724 throw jsonDecoder.mismatch(jsonPath, "name"); 9437 throw jsonDecoder.mismatch(jsonPath, "name");
8725 } 9438 }
8726 String version; 9439 String version;
8727 if (json.containsKey("version")) { 9440 if (json.containsKey("version")) {
8728 version = jsonDecoder.decodeString(jsonPath + ".version", json["version" ]); 9441 version =
9442 jsonDecoder.decodeString(jsonPath + ".version", json["version"]);
8729 } else { 9443 } else {
8730 throw jsonDecoder.mismatch(jsonPath, "version"); 9444 throw jsonDecoder.mismatch(jsonPath, "version");
8731 } 9445 }
8732 String contactInfo; 9446 String contactInfo;
8733 if (json.containsKey("contactInfo")) { 9447 if (json.containsKey("contactInfo")) {
8734 contactInfo = jsonDecoder.decodeString(jsonPath + ".contactInfo", json[" contactInfo"]); 9448 contactInfo = jsonDecoder.decodeString(
9449 jsonPath + ".contactInfo", json["contactInfo"]);
8735 } 9450 }
8736 List<String> interestingFiles; 9451 List<String> interestingFiles;
8737 if (json.containsKey("interestingFiles")) { 9452 if (json.containsKey("interestingFiles")) {
8738 interestingFiles = jsonDecoder.decodeList(jsonPath + ".interestingFiles" , json["interestingFiles"], jsonDecoder.decodeString); 9453 interestingFiles = jsonDecoder.decodeList(
9454 jsonPath + ".interestingFiles",
9455 json["interestingFiles"],
9456 jsonDecoder.decodeString);
8739 } else { 9457 } else {
8740 throw jsonDecoder.mismatch(jsonPath, "interestingFiles"); 9458 throw jsonDecoder.mismatch(jsonPath, "interestingFiles");
8741 } 9459 }
8742 return new PluginVersionCheckResult(isCompatible, name, version, interesti ngFiles, contactInfo: contactInfo); 9460 return new PluginVersionCheckResult(
9461 isCompatible, name, version, interestingFiles,
9462 contactInfo: contactInfo);
8743 } else { 9463 } else {
8744 throw jsonDecoder.mismatch(jsonPath, "plugin.versionCheck result", json); 9464 throw jsonDecoder.mismatch(jsonPath, "plugin.versionCheck result", json);
8745 } 9465 }
8746 } 9466 }
8747 9467
8748 factory PluginVersionCheckResult.fromResponse(Response response) { 9468 factory PluginVersionCheckResult.fromResponse(Response response) {
8749 return new PluginVersionCheckResult.fromJson( 9469 return new PluginVersionCheckResult.fromJson(
8750 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), " result", response.result); 9470 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
9471 "result",
9472 response.result);
8751 } 9473 }
8752 9474
8753 @override 9475 @override
8754 Map<String, dynamic> toJson() { 9476 Map<String, dynamic> toJson() {
8755 Map<String, dynamic> result = {}; 9477 Map<String, dynamic> result = {};
8756 result["isCompatible"] = isCompatible; 9478 result["isCompatible"] = isCompatible;
8757 result["name"] = name; 9479 result["name"] = name;
8758 result["version"] = version; 9480 result["version"] = version;
8759 if (contactInfo != null) { 9481 if (contactInfo != null) {
8760 result["contactInfo"] = contactInfo; 9482 result["contactInfo"] = contactInfo;
8761 } 9483 }
8762 result["interestingFiles"] = interestingFiles; 9484 result["interestingFiles"] = interestingFiles;
8763 return result; 9485 return result;
8764 } 9486 }
8765 9487
8766 @override 9488 @override
8767 Response toResponse(String id) { 9489 Response toResponse(String id) {
8768 return new Response(id, result: toJson()); 9490 return new Response(id, result: toJson());
8769 } 9491 }
8770 9492
8771 @override 9493 @override
8772 String toString() => JSON.encode(toJson()); 9494 String toString() => JSON.encode(toJson());
8773 9495
8774 @override 9496 @override
8775 bool operator==(other) { 9497 bool operator ==(other) {
8776 if (other is PluginVersionCheckResult) { 9498 if (other is PluginVersionCheckResult) {
8777 return isCompatible == other.isCompatible && 9499 return isCompatible == other.isCompatible &&
8778 name == other.name && 9500 name == other.name &&
8779 version == other.version && 9501 version == other.version &&
8780 contactInfo == other.contactInfo && 9502 contactInfo == other.contactInfo &&
8781 listEqual(interestingFiles, other.interestingFiles, (String a, String b) => a == b); 9503 listEqual(interestingFiles, other.interestingFiles,
9504 (String a, String b) => a == b);
8782 } 9505 }
8783 return false; 9506 return false;
8784 } 9507 }
8785 9508
8786 @override 9509 @override
8787 int get hashCode { 9510 int get hashCode {
8788 int hash = 0; 9511 int hash = 0;
8789 hash = JenkinsSmiHash.combine(hash, isCompatible.hashCode); 9512 hash = JenkinsSmiHash.combine(hash, isCompatible.hashCode);
8790 hash = JenkinsSmiHash.combine(hash, name.hashCode); 9513 hash = JenkinsSmiHash.combine(hash, name.hashCode);
8791 hash = JenkinsSmiHash.combine(hash, version.hashCode); 9514 hash = JenkinsSmiHash.combine(hash, version.hashCode);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
8834 void set offset(int value) { 9557 void set offset(int value) {
8835 assert(value != null); 9558 assert(value != null);
8836 this._offset = value; 9559 this._offset = value;
8837 } 9560 }
8838 9561
8839 Position(String file, int offset) { 9562 Position(String file, int offset) {
8840 this.file = file; 9563 this.file = file;
8841 this.offset = offset; 9564 this.offset = offset;
8842 } 9565 }
8843 9566
8844 factory Position.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object jso n) { 9567 factory Position.fromJson(
9568 JsonDecoder jsonDecoder, String jsonPath, Object json) {
8845 if (json == null) { 9569 if (json == null) {
8846 json = {}; 9570 json = {};
8847 } 9571 }
8848 if (json is Map) { 9572 if (json is Map) {
8849 String file; 9573 String file;
8850 if (json.containsKey("file")) { 9574 if (json.containsKey("file")) {
8851 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); 9575 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
8852 } else { 9576 } else {
8853 throw jsonDecoder.mismatch(jsonPath, "file"); 9577 throw jsonDecoder.mismatch(jsonPath, "file");
8854 } 9578 }
(...skipping 14 matching lines...) Expand all
8869 Map<String, dynamic> result = {}; 9593 Map<String, dynamic> result = {};
8870 result["file"] = file; 9594 result["file"] = file;
8871 result["offset"] = offset; 9595 result["offset"] = offset;
8872 return result; 9596 return result;
8873 } 9597 }
8874 9598
8875 @override 9599 @override
8876 String toString() => JSON.encode(toJson()); 9600 String toString() => JSON.encode(toJson());
8877 9601
8878 @override 9602 @override
8879 bool operator==(other) { 9603 bool operator ==(other) {
8880 if (other is Position) { 9604 if (other is Position) {
8881 return file == other.file && 9605 return file == other.file && offset == other.offset;
8882 offset == other.offset;
8883 } 9606 }
8884 return false; 9607 return false;
8885 } 9608 }
8886 9609
8887 @override 9610 @override
8888 int get hashCode { 9611 int get hashCode {
8889 int hash = 0; 9612 int hash = 0;
8890 hash = JenkinsSmiHash.combine(hash, file.hashCode); 9613 hash = JenkinsSmiHash.combine(hash, file.hashCode);
8891 hash = JenkinsSmiHash.combine(hash, offset.hashCode); 9614 hash = JenkinsSmiHash.combine(hash, offset.hashCode);
8892 return JenkinsSmiHash.finish(hash); 9615 return JenkinsSmiHash.finish(hash);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
8934 void set change(SourceChange value) { 9657 void set change(SourceChange value) {
8935 assert(value != null); 9658 assert(value != null);
8936 this._change = value; 9659 this._change = value;
8937 } 9660 }
8938 9661
8939 PrioritizedSourceChange(int priority, SourceChange change) { 9662 PrioritizedSourceChange(int priority, SourceChange change) {
8940 this.priority = priority; 9663 this.priority = priority;
8941 this.change = change; 9664 this.change = change;
8942 } 9665 }
8943 9666
8944 factory PrioritizedSourceChange.fromJson(JsonDecoder jsonDecoder, String jsonP ath, Object json) { 9667 factory PrioritizedSourceChange.fromJson(
9668 JsonDecoder jsonDecoder, String jsonPath, Object json) {
8945 if (json == null) { 9669 if (json == null) {
8946 json = {}; 9670 json = {};
8947 } 9671 }
8948 if (json is Map) { 9672 if (json is Map) {
8949 int priority; 9673 int priority;
8950 if (json.containsKey("priority")) { 9674 if (json.containsKey("priority")) {
8951 priority = jsonDecoder.decodeInt(jsonPath + ".priority", json["priority" ]); 9675 priority =
9676 jsonDecoder.decodeInt(jsonPath + ".priority", json["priority"]);
8952 } else { 9677 } else {
8953 throw jsonDecoder.mismatch(jsonPath, "priority"); 9678 throw jsonDecoder.mismatch(jsonPath, "priority");
8954 } 9679 }
8955 SourceChange change; 9680 SourceChange change;
8956 if (json.containsKey("change")) { 9681 if (json.containsKey("change")) {
8957 change = new SourceChange.fromJson(jsonDecoder, jsonPath + ".change", js on["change"]); 9682 change = new SourceChange.fromJson(
9683 jsonDecoder, jsonPath + ".change", json["change"]);
8958 } else { 9684 } else {
8959 throw jsonDecoder.mismatch(jsonPath, "change"); 9685 throw jsonDecoder.mismatch(jsonPath, "change");
8960 } 9686 }
8961 return new PrioritizedSourceChange(priority, change); 9687 return new PrioritizedSourceChange(priority, change);
8962 } else { 9688 } else {
8963 throw jsonDecoder.mismatch(jsonPath, "PrioritizedSourceChange", json); 9689 throw jsonDecoder.mismatch(jsonPath, "PrioritizedSourceChange", json);
8964 } 9690 }
8965 } 9691 }
8966 9692
8967 @override 9693 @override
8968 Map<String, dynamic> toJson() { 9694 Map<String, dynamic> toJson() {
8969 Map<String, dynamic> result = {}; 9695 Map<String, dynamic> result = {};
8970 result["priority"] = priority; 9696 result["priority"] = priority;
8971 result["change"] = change.toJson(); 9697 result["change"] = change.toJson();
8972 return result; 9698 return result;
8973 } 9699 }
8974 9700
8975 @override 9701 @override
8976 String toString() => JSON.encode(toJson()); 9702 String toString() => JSON.encode(toJson());
8977 9703
8978 @override 9704 @override
8979 bool operator==(other) { 9705 bool operator ==(other) {
8980 if (other is PrioritizedSourceChange) { 9706 if (other is PrioritizedSourceChange) {
8981 return priority == other.priority && 9707 return priority == other.priority && change == other.change;
8982 change == other.change;
8983 } 9708 }
8984 return false; 9709 return false;
8985 } 9710 }
8986 9711
8987 @override 9712 @override
8988 int get hashCode { 9713 int get hashCode {
8989 int hash = 0; 9714 int hash = 0;
8990 hash = JenkinsSmiHash.combine(hash, priority.hashCode); 9715 hash = JenkinsSmiHash.combine(hash, priority.hashCode);
8991 hash = JenkinsSmiHash.combine(hash, change.hashCode); 9716 hash = JenkinsSmiHash.combine(hash, change.hashCode);
8992 return JenkinsSmiHash.finish(hash); 9717 return JenkinsSmiHash.finish(hash);
8993 } 9718 }
8994 } 9719 }
8995 9720
8996 /** 9721 /**
8997 * RefactoringFeedback 9722 * RefactoringFeedback
8998 * 9723 *
8999 * { 9724 * {
9000 * } 9725 * }
9001 * 9726 *
9002 * Clients may not extend, implement or mix-in this class. 9727 * Clients may not extend, implement or mix-in this class.
9003 */ 9728 */
9004 class RefactoringFeedback implements HasToJson { 9729 class RefactoringFeedback implements HasToJson {
9005 RefactoringFeedback(); 9730 RefactoringFeedback();
9006 9731
9007 factory RefactoringFeedback.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json, Map responseJson) { 9732 factory RefactoringFeedback.fromJson(
9008 return refactoringFeedbackFromJson(jsonDecoder, jsonPath, json, responseJson ); 9733 JsonDecoder jsonDecoder, String jsonPath, Object json, Map responseJson) {
9734 return refactoringFeedbackFromJson(
9735 jsonDecoder, jsonPath, json, responseJson);
9009 } 9736 }
9010 9737
9011 @override 9738 @override
9012 Map<String, dynamic> toJson() { 9739 Map<String, dynamic> toJson() {
9013 Map<String, dynamic> result = {}; 9740 Map<String, dynamic> result = {};
9014 return result; 9741 return result;
9015 } 9742 }
9016 9743
9017 @override 9744 @override
9018 String toString() => JSON.encode(toJson()); 9745 String toString() => JSON.encode(toJson());
9019 9746
9020 @override 9747 @override
9021 bool operator==(other) { 9748 bool operator ==(other) {
9022 if (other is RefactoringFeedback) { 9749 if (other is RefactoringFeedback) {
9023 return true; 9750 return true;
9024 } 9751 }
9025 return false; 9752 return false;
9026 } 9753 }
9027 9754
9028 @override 9755 @override
9029 int get hashCode { 9756 int get hashCode {
9030 int hash = 0; 9757 int hash = 0;
9031 return JenkinsSmiHash.finish(hash); 9758 return JenkinsSmiHash.finish(hash);
(...skipping 11 matching lines...) Expand all
9043 * INLINE_LOCAL_VARIABLE 9770 * INLINE_LOCAL_VARIABLE
9044 * INLINE_METHOD 9771 * INLINE_METHOD
9045 * MOVE_FILE 9772 * MOVE_FILE
9046 * RENAME 9773 * RENAME
9047 * SORT_MEMBERS 9774 * SORT_MEMBERS
9048 * } 9775 * }
9049 * 9776 *
9050 * Clients may not extend, implement or mix-in this class. 9777 * Clients may not extend, implement or mix-in this class.
9051 */ 9778 */
9052 class RefactoringKind implements Enum { 9779 class RefactoringKind implements Enum {
9053 static const RefactoringKind CONVERT_GETTER_TO_METHOD = const RefactoringKind. _("CONVERT_GETTER_TO_METHOD"); 9780 static const RefactoringKind CONVERT_GETTER_TO_METHOD =
9781 const RefactoringKind._("CONVERT_GETTER_TO_METHOD");
9054 9782
9055 static const RefactoringKind CONVERT_METHOD_TO_GETTER = const RefactoringKind. _("CONVERT_METHOD_TO_GETTER"); 9783 static const RefactoringKind CONVERT_METHOD_TO_GETTER =
9784 const RefactoringKind._("CONVERT_METHOD_TO_GETTER");
9056 9785
9057 static const RefactoringKind EXTRACT_LOCAL_VARIABLE = const RefactoringKind._( "EXTRACT_LOCAL_VARIABLE"); 9786 static const RefactoringKind EXTRACT_LOCAL_VARIABLE =
9787 const RefactoringKind._("EXTRACT_LOCAL_VARIABLE");
9058 9788
9059 static const RefactoringKind EXTRACT_METHOD = const RefactoringKind._("EXTRACT _METHOD"); 9789 static const RefactoringKind EXTRACT_METHOD =
9790 const RefactoringKind._("EXTRACT_METHOD");
9060 9791
9061 static const RefactoringKind INLINE_LOCAL_VARIABLE = const RefactoringKind._(" INLINE_LOCAL_VARIABLE"); 9792 static const RefactoringKind INLINE_LOCAL_VARIABLE =
9793 const RefactoringKind._("INLINE_LOCAL_VARIABLE");
9062 9794
9063 static const RefactoringKind INLINE_METHOD = const RefactoringKind._("INLINE_M ETHOD"); 9795 static const RefactoringKind INLINE_METHOD =
9796 const RefactoringKind._("INLINE_METHOD");
9064 9797
9065 static const RefactoringKind MOVE_FILE = const RefactoringKind._("MOVE_FILE"); 9798 static const RefactoringKind MOVE_FILE = const RefactoringKind._("MOVE_FILE");
9066 9799
9067 static const RefactoringKind RENAME = const RefactoringKind._("RENAME"); 9800 static const RefactoringKind RENAME = const RefactoringKind._("RENAME");
9068 9801
9069 static const RefactoringKind SORT_MEMBERS = const RefactoringKind._("SORT_MEMB ERS"); 9802 static const RefactoringKind SORT_MEMBERS =
9803 const RefactoringKind._("SORT_MEMBERS");
9070 9804
9071 /** 9805 /**
9072 * A list containing all of the enum values that are defined. 9806 * A list containing all of the enum values that are defined.
9073 */ 9807 */
9074 static const List<RefactoringKind> VALUES = const <RefactoringKind>[CONVERT_GE TTER_TO_METHOD, CONVERT_METHOD_TO_GETTER, EXTRACT_LOCAL_VARIABLE, EXTRACT_METHOD , INLINE_LOCAL_VARIABLE, INLINE_METHOD, MOVE_FILE, RENAME, SORT_MEMBERS]; 9808 static const List<RefactoringKind> VALUES = const <RefactoringKind>[
9809 CONVERT_GETTER_TO_METHOD,
9810 CONVERT_METHOD_TO_GETTER,
9811 EXTRACT_LOCAL_VARIABLE,
9812 EXTRACT_METHOD,
9813 INLINE_LOCAL_VARIABLE,
9814 INLINE_METHOD,
9815 MOVE_FILE,
9816 RENAME,
9817 SORT_MEMBERS
9818 ];
9075 9819
9076 @override 9820 @override
9077 final String name; 9821 final String name;
9078 9822
9079 const RefactoringKind._(this.name); 9823 const RefactoringKind._(this.name);
9080 9824
9081 factory RefactoringKind(String name) { 9825 factory RefactoringKind(String name) {
9082 switch (name) { 9826 switch (name) {
9083 case "CONVERT_GETTER_TO_METHOD": 9827 case "CONVERT_GETTER_TO_METHOD":
9084 return CONVERT_GETTER_TO_METHOD; 9828 return CONVERT_GETTER_TO_METHOD;
(...skipping 10 matching lines...) Expand all
9095 case "MOVE_FILE": 9839 case "MOVE_FILE":
9096 return MOVE_FILE; 9840 return MOVE_FILE;
9097 case "RENAME": 9841 case "RENAME":
9098 return RENAME; 9842 return RENAME;
9099 case "SORT_MEMBERS": 9843 case "SORT_MEMBERS":
9100 return SORT_MEMBERS; 9844 return SORT_MEMBERS;
9101 } 9845 }
9102 throw new Exception('Illegal enum value: $name'); 9846 throw new Exception('Illegal enum value: $name');
9103 } 9847 }
9104 9848
9105 factory RefactoringKind.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obj ect json) { 9849 factory RefactoringKind.fromJson(
9850 JsonDecoder jsonDecoder, String jsonPath, Object json) {
9106 if (json is String) { 9851 if (json is String) {
9107 try { 9852 try {
9108 return new RefactoringKind(json); 9853 return new RefactoringKind(json);
9109 } catch(_) { 9854 } catch (_) {
9110 // Fall through 9855 // Fall through
9111 } 9856 }
9112 } 9857 }
9113 throw jsonDecoder.mismatch(jsonPath, "RefactoringKind", json); 9858 throw jsonDecoder.mismatch(jsonPath, "RefactoringKind", json);
9114 } 9859 }
9115 9860
9116 @override 9861 @override
9117 String toString() => "RefactoringKind.$name"; 9862 String toString() => "RefactoringKind.$name";
9118 9863
9119 String toJson() => name; 9864 String toJson() => name;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
9207 9952
9208 /** 9953 /**
9209 * The parameter list of the parameter's function type. If the parameter is 9954 * The parameter list of the parameter's function type. If the parameter is
9210 * not of a function type, this field will not be defined. If the function 9955 * not of a function type, this field will not be defined. If the function
9211 * type has zero parameters, this field will have a value of '()'. 9956 * type has zero parameters, this field will have a value of '()'.
9212 */ 9957 */
9213 void set parameters(String value) { 9958 void set parameters(String value) {
9214 this._parameters = value; 9959 this._parameters = value;
9215 } 9960 }
9216 9961
9217 RefactoringMethodParameter(RefactoringMethodParameterKind kind, String type, S tring name, {String id, String parameters}) { 9962 RefactoringMethodParameter(
9963 RefactoringMethodParameterKind kind, String type, String name,
9964 {String id, String parameters}) {
9218 this.id = id; 9965 this.id = id;
9219 this.kind = kind; 9966 this.kind = kind;
9220 this.type = type; 9967 this.type = type;
9221 this.name = name; 9968 this.name = name;
9222 this.parameters = parameters; 9969 this.parameters = parameters;
9223 } 9970 }
9224 9971
9225 factory RefactoringMethodParameter.fromJson(JsonDecoder jsonDecoder, String js onPath, Object json) { 9972 factory RefactoringMethodParameter.fromJson(
9973 JsonDecoder jsonDecoder, String jsonPath, Object json) {
9226 if (json == null) { 9974 if (json == null) {
9227 json = {}; 9975 json = {};
9228 } 9976 }
9229 if (json is Map) { 9977 if (json is Map) {
9230 String id; 9978 String id;
9231 if (json.containsKey("id")) { 9979 if (json.containsKey("id")) {
9232 id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]); 9980 id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]);
9233 } 9981 }
9234 RefactoringMethodParameterKind kind; 9982 RefactoringMethodParameterKind kind;
9235 if (json.containsKey("kind")) { 9983 if (json.containsKey("kind")) {
9236 kind = new RefactoringMethodParameterKind.fromJson(jsonDecoder, jsonPath + ".kind", json["kind"]); 9984 kind = new RefactoringMethodParameterKind.fromJson(
9985 jsonDecoder, jsonPath + ".kind", json["kind"]);
9237 } else { 9986 } else {
9238 throw jsonDecoder.mismatch(jsonPath, "kind"); 9987 throw jsonDecoder.mismatch(jsonPath, "kind");
9239 } 9988 }
9240 String type; 9989 String type;
9241 if (json.containsKey("type")) { 9990 if (json.containsKey("type")) {
9242 type = jsonDecoder.decodeString(jsonPath + ".type", json["type"]); 9991 type = jsonDecoder.decodeString(jsonPath + ".type", json["type"]);
9243 } else { 9992 } else {
9244 throw jsonDecoder.mismatch(jsonPath, "type"); 9993 throw jsonDecoder.mismatch(jsonPath, "type");
9245 } 9994 }
9246 String name; 9995 String name;
9247 if (json.containsKey("name")) { 9996 if (json.containsKey("name")) {
9248 name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]); 9997 name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
9249 } else { 9998 } else {
9250 throw jsonDecoder.mismatch(jsonPath, "name"); 9999 throw jsonDecoder.mismatch(jsonPath, "name");
9251 } 10000 }
9252 String parameters; 10001 String parameters;
9253 if (json.containsKey("parameters")) { 10002 if (json.containsKey("parameters")) {
9254 parameters = jsonDecoder.decodeString(jsonPath + ".parameters", json["pa rameters"]); 10003 parameters = jsonDecoder.decodeString(
10004 jsonPath + ".parameters", json["parameters"]);
9255 } 10005 }
9256 return new RefactoringMethodParameter(kind, type, name, id: id, parameters : parameters); 10006 return new RefactoringMethodParameter(kind, type, name,
10007 id: id, parameters: parameters);
9257 } else { 10008 } else {
9258 throw jsonDecoder.mismatch(jsonPath, "RefactoringMethodParameter", json); 10009 throw jsonDecoder.mismatch(jsonPath, "RefactoringMethodParameter", json);
9259 } 10010 }
9260 } 10011 }
9261 10012
9262 @override 10013 @override
9263 Map<String, dynamic> toJson() { 10014 Map<String, dynamic> toJson() {
9264 Map<String, dynamic> result = {}; 10015 Map<String, dynamic> result = {};
9265 if (id != null) { 10016 if (id != null) {
9266 result["id"] = id; 10017 result["id"] = id;
9267 } 10018 }
9268 result["kind"] = kind.toJson(); 10019 result["kind"] = kind.toJson();
9269 result["type"] = type; 10020 result["type"] = type;
9270 result["name"] = name; 10021 result["name"] = name;
9271 if (parameters != null) { 10022 if (parameters != null) {
9272 result["parameters"] = parameters; 10023 result["parameters"] = parameters;
9273 } 10024 }
9274 return result; 10025 return result;
9275 } 10026 }
9276 10027
9277 @override 10028 @override
9278 String toString() => JSON.encode(toJson()); 10029 String toString() => JSON.encode(toJson());
9279 10030
9280 @override 10031 @override
9281 bool operator==(other) { 10032 bool operator ==(other) {
9282 if (other is RefactoringMethodParameter) { 10033 if (other is RefactoringMethodParameter) {
9283 return id == other.id && 10034 return id == other.id &&
9284 kind == other.kind && 10035 kind == other.kind &&
9285 type == other.type && 10036 type == other.type &&
9286 name == other.name && 10037 name == other.name &&
9287 parameters == other.parameters; 10038 parameters == other.parameters;
9288 } 10039 }
9289 return false; 10040 return false;
9290 } 10041 }
9291 10042
(...skipping 14 matching lines...) Expand all
9306 * 10057 *
9307 * enum { 10058 * enum {
9308 * REQUIRED 10059 * REQUIRED
9309 * POSITIONAL 10060 * POSITIONAL
9310 * NAMED 10061 * NAMED
9311 * } 10062 * }
9312 * 10063 *
9313 * Clients may not extend, implement or mix-in this class. 10064 * Clients may not extend, implement or mix-in this class.
9314 */ 10065 */
9315 class RefactoringMethodParameterKind implements Enum { 10066 class RefactoringMethodParameterKind implements Enum {
9316 static const RefactoringMethodParameterKind REQUIRED = const RefactoringMethod ParameterKind._("REQUIRED"); 10067 static const RefactoringMethodParameterKind REQUIRED =
10068 const RefactoringMethodParameterKind._("REQUIRED");
9317 10069
9318 static const RefactoringMethodParameterKind POSITIONAL = const RefactoringMeth odParameterKind._("POSITIONAL"); 10070 static const RefactoringMethodParameterKind POSITIONAL =
10071 const RefactoringMethodParameterKind._("POSITIONAL");
9319 10072
9320 static const RefactoringMethodParameterKind NAMED = const RefactoringMethodPar ameterKind._("NAMED"); 10073 static const RefactoringMethodParameterKind NAMED =
10074 const RefactoringMethodParameterKind._("NAMED");
9321 10075
9322 /** 10076 /**
9323 * A list containing all of the enum values that are defined. 10077 * A list containing all of the enum values that are defined.
9324 */ 10078 */
9325 static const List<RefactoringMethodParameterKind> VALUES = const <RefactoringM ethodParameterKind>[REQUIRED, POSITIONAL, NAMED]; 10079 static const List<RefactoringMethodParameterKind> VALUES =
10080 const <RefactoringMethodParameterKind>[REQUIRED, POSITIONAL, NAMED];
9326 10081
9327 @override 10082 @override
9328 final String name; 10083 final String name;
9329 10084
9330 const RefactoringMethodParameterKind._(this.name); 10085 const RefactoringMethodParameterKind._(this.name);
9331 10086
9332 factory RefactoringMethodParameterKind(String name) { 10087 factory RefactoringMethodParameterKind(String name) {
9333 switch (name) { 10088 switch (name) {
9334 case "REQUIRED": 10089 case "REQUIRED":
9335 return REQUIRED; 10090 return REQUIRED;
9336 case "POSITIONAL": 10091 case "POSITIONAL":
9337 return POSITIONAL; 10092 return POSITIONAL;
9338 case "NAMED": 10093 case "NAMED":
9339 return NAMED; 10094 return NAMED;
9340 } 10095 }
9341 throw new Exception('Illegal enum value: $name'); 10096 throw new Exception('Illegal enum value: $name');
9342 } 10097 }
9343 10098
9344 factory RefactoringMethodParameterKind.fromJson(JsonDecoder jsonDecoder, Strin g jsonPath, Object json) { 10099 factory RefactoringMethodParameterKind.fromJson(
10100 JsonDecoder jsonDecoder, String jsonPath, Object json) {
9345 if (json is String) { 10101 if (json is String) {
9346 try { 10102 try {
9347 return new RefactoringMethodParameterKind(json); 10103 return new RefactoringMethodParameterKind(json);
9348 } catch(_) { 10104 } catch (_) {
9349 // Fall through 10105 // Fall through
9350 } 10106 }
9351 } 10107 }
9352 throw jsonDecoder.mismatch(jsonPath, "RefactoringMethodParameterKind", json) ; 10108 throw jsonDecoder.mismatch(
10109 jsonPath, "RefactoringMethodParameterKind", json);
9353 } 10110 }
9354 10111
9355 @override 10112 @override
9356 String toString() => "RefactoringMethodParameterKind.$name"; 10113 String toString() => "RefactoringMethodParameterKind.$name";
9357 10114
9358 String toJson() => name; 10115 String toJson() => name;
9359 } 10116 }
9360 10117
9361 /** 10118 /**
9362 * RefactoringOptions 10119 * RefactoringOptions
9363 * 10120 *
9364 * { 10121 * {
9365 * } 10122 * }
9366 * 10123 *
9367 * Clients may not extend, implement or mix-in this class. 10124 * Clients may not extend, implement or mix-in this class.
9368 */ 10125 */
9369 class RefactoringOptions implements HasToJson { 10126 class RefactoringOptions implements HasToJson {
9370 RefactoringOptions(); 10127 RefactoringOptions();
9371 10128
9372 factory RefactoringOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json, RefactoringKind kind) { 10129 factory RefactoringOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath,
10130 Object json, RefactoringKind kind) {
9373 return refactoringOptionsFromJson(jsonDecoder, jsonPath, json, kind); 10131 return refactoringOptionsFromJson(jsonDecoder, jsonPath, json, kind);
9374 } 10132 }
9375 10133
9376 @override 10134 @override
9377 Map<String, dynamic> toJson() { 10135 Map<String, dynamic> toJson() {
9378 Map<String, dynamic> result = {}; 10136 Map<String, dynamic> result = {};
9379 return result; 10137 return result;
9380 } 10138 }
9381 10139
9382 @override 10140 @override
9383 String toString() => JSON.encode(toJson()); 10141 String toString() => JSON.encode(toJson());
9384 10142
9385 @override 10143 @override
9386 bool operator==(other) { 10144 bool operator ==(other) {
9387 if (other is RefactoringOptions) { 10145 if (other is RefactoringOptions) {
9388 return true; 10146 return true;
9389 } 10147 }
9390 return false; 10148 return false;
9391 } 10149 }
9392 10150
9393 @override 10151 @override
9394 int get hashCode { 10152 int get hashCode {
9395 int hash = 0; 10153 int hash = 0;
9396 return JenkinsSmiHash.finish(hash); 10154 return JenkinsSmiHash.finish(hash);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
9450 10208
9451 /** 10209 /**
9452 * The location of the problem being represented. This field is omitted 10210 * The location of the problem being represented. This field is omitted
9453 * unless there is a specific location associated with the problem (such as a 10211 * unless there is a specific location associated with the problem (such as a
9454 * location where an element being renamed will be shadowed). 10212 * location where an element being renamed will be shadowed).
9455 */ 10213 */
9456 void set location(Location value) { 10214 void set location(Location value) {
9457 this._location = value; 10215 this._location = value;
9458 } 10216 }
9459 10217
9460 RefactoringProblem(RefactoringProblemSeverity severity, String message, {Locat ion location}) { 10218 RefactoringProblem(RefactoringProblemSeverity severity, String message,
10219 {Location location}) {
9461 this.severity = severity; 10220 this.severity = severity;
9462 this.message = message; 10221 this.message = message;
9463 this.location = location; 10222 this.location = location;
9464 } 10223 }
9465 10224
9466 factory RefactoringProblem.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 10225 factory RefactoringProblem.fromJson(
10226 JsonDecoder jsonDecoder, String jsonPath, Object json) {
9467 if (json == null) { 10227 if (json == null) {
9468 json = {}; 10228 json = {};
9469 } 10229 }
9470 if (json is Map) { 10230 if (json is Map) {
9471 RefactoringProblemSeverity severity; 10231 RefactoringProblemSeverity severity;
9472 if (json.containsKey("severity")) { 10232 if (json.containsKey("severity")) {
9473 severity = new RefactoringProblemSeverity.fromJson(jsonDecoder, jsonPath + ".severity", json["severity"]); 10233 severity = new RefactoringProblemSeverity.fromJson(
10234 jsonDecoder, jsonPath + ".severity", json["severity"]);
9474 } else { 10235 } else {
9475 throw jsonDecoder.mismatch(jsonPath, "severity"); 10236 throw jsonDecoder.mismatch(jsonPath, "severity");
9476 } 10237 }
9477 String message; 10238 String message;
9478 if (json.containsKey("message")) { 10239 if (json.containsKey("message")) {
9479 message = jsonDecoder.decodeString(jsonPath + ".message", json["message" ]); 10240 message =
10241 jsonDecoder.decodeString(jsonPath + ".message", json["message"]);
9480 } else { 10242 } else {
9481 throw jsonDecoder.mismatch(jsonPath, "message"); 10243 throw jsonDecoder.mismatch(jsonPath, "message");
9482 } 10244 }
9483 Location location; 10245 Location location;
9484 if (json.containsKey("location")) { 10246 if (json.containsKey("location")) {
9485 location = new Location.fromJson(jsonDecoder, jsonPath + ".location", js on["location"]); 10247 location = new Location.fromJson(
10248 jsonDecoder, jsonPath + ".location", json["location"]);
9486 } 10249 }
9487 return new RefactoringProblem(severity, message, location: location); 10250 return new RefactoringProblem(severity, message, location: location);
9488 } else { 10251 } else {
9489 throw jsonDecoder.mismatch(jsonPath, "RefactoringProblem", json); 10252 throw jsonDecoder.mismatch(jsonPath, "RefactoringProblem", json);
9490 } 10253 }
9491 } 10254 }
9492 10255
9493 @override 10256 @override
9494 Map<String, dynamic> toJson() { 10257 Map<String, dynamic> toJson() {
9495 Map<String, dynamic> result = {}; 10258 Map<String, dynamic> result = {};
9496 result["severity"] = severity.toJson(); 10259 result["severity"] = severity.toJson();
9497 result["message"] = message; 10260 result["message"] = message;
9498 if (location != null) { 10261 if (location != null) {
9499 result["location"] = location.toJson(); 10262 result["location"] = location.toJson();
9500 } 10263 }
9501 return result; 10264 return result;
9502 } 10265 }
9503 10266
9504 @override 10267 @override
9505 String toString() => JSON.encode(toJson()); 10268 String toString() => JSON.encode(toJson());
9506 10269
9507 @override 10270 @override
9508 bool operator==(other) { 10271 bool operator ==(other) {
9509 if (other is RefactoringProblem) { 10272 if (other is RefactoringProblem) {
9510 return severity == other.severity && 10273 return severity == other.severity &&
9511 message == other.message && 10274 message == other.message &&
9512 location == other.location; 10275 location == other.location;
9513 } 10276 }
9514 return false; 10277 return false;
9515 } 10278 }
9516 10279
9517 @override 10280 @override
9518 int get hashCode { 10281 int get hashCode {
(...skipping 14 matching lines...) Expand all
9533 * ERROR 10296 * ERROR
9534 * FATAL 10297 * FATAL
9535 * } 10298 * }
9536 * 10299 *
9537 * Clients may not extend, implement or mix-in this class. 10300 * Clients may not extend, implement or mix-in this class.
9538 */ 10301 */
9539 class RefactoringProblemSeverity implements Enum { 10302 class RefactoringProblemSeverity implements Enum {
9540 /** 10303 /**
9541 * A minor code problem. No example, because it is not used yet. 10304 * A minor code problem. No example, because it is not used yet.
9542 */ 10305 */
9543 static const RefactoringProblemSeverity INFO = const RefactoringProblemSeverit y._("INFO"); 10306 static const RefactoringProblemSeverity INFO =
10307 const RefactoringProblemSeverity._("INFO");
9544 10308
9545 /** 10309 /**
9546 * A minor code problem. For example names of local variables should be camel 10310 * A minor code problem. For example names of local variables should be camel
9547 * case and start with a lower case letter. Staring the name of a variable 10311 * case and start with a lower case letter. Staring the name of a variable
9548 * with an upper case is OK from the language point of view, but it is nice 10312 * with an upper case is OK from the language point of view, but it is nice
9549 * to warn the user. 10313 * to warn the user.
9550 */ 10314 */
9551 static const RefactoringProblemSeverity WARNING = const RefactoringProblemSeve rity._("WARNING"); 10315 static const RefactoringProblemSeverity WARNING =
10316 const RefactoringProblemSeverity._("WARNING");
9552 10317
9553 /** 10318 /**
9554 * The refactoring technically can be performed, but there is a logical 10319 * The refactoring technically can be performed, but there is a logical
9555 * problem. For example the name of a local variable being extracted 10320 * problem. For example the name of a local variable being extracted
9556 * conflicts with another name in the scope, or duplicate parameter names in 10321 * conflicts with another name in the scope, or duplicate parameter names in
9557 * the method being extracted, or a conflict between a parameter name and a 10322 * the method being extracted, or a conflict between a parameter name and a
9558 * local variable, etc. In some cases the location of the problem is also 10323 * local variable, etc. In some cases the location of the problem is also
9559 * provided, so the IDE can show user the location and the problem, and let 10324 * provided, so the IDE can show user the location and the problem, and let
9560 * the user decide whether they want to perform the refactoring. For example 10325 * the user decide whether they want to perform the refactoring. For example
9561 * the name conflict might be expected, and the user wants to fix it 10326 * the name conflict might be expected, and the user wants to fix it
9562 * afterwards. 10327 * afterwards.
9563 */ 10328 */
9564 static const RefactoringProblemSeverity ERROR = const RefactoringProblemSeveri ty._("ERROR"); 10329 static const RefactoringProblemSeverity ERROR =
10330 const RefactoringProblemSeverity._("ERROR");
9565 10331
9566 /** 10332 /**
9567 * A fatal error, which prevents performing the refactoring. For example the 10333 * A fatal error, which prevents performing the refactoring. For example the
9568 * name of a local variable being extracted is not a valid identifier, or 10334 * name of a local variable being extracted is not a valid identifier, or
9569 * selection is not a valid expression. 10335 * selection is not a valid expression.
9570 */ 10336 */
9571 static const RefactoringProblemSeverity FATAL = const RefactoringProblemSeveri ty._("FATAL"); 10337 static const RefactoringProblemSeverity FATAL =
10338 const RefactoringProblemSeverity._("FATAL");
9572 10339
9573 /** 10340 /**
9574 * A list containing all of the enum values that are defined. 10341 * A list containing all of the enum values that are defined.
9575 */ 10342 */
9576 static const List<RefactoringProblemSeverity> VALUES = const <RefactoringProbl emSeverity>[INFO, WARNING, ERROR, FATAL]; 10343 static const List<RefactoringProblemSeverity> VALUES =
10344 const <RefactoringProblemSeverity>[INFO, WARNING, ERROR, FATAL];
9577 10345
9578 @override 10346 @override
9579 final String name; 10347 final String name;
9580 10348
9581 const RefactoringProblemSeverity._(this.name); 10349 const RefactoringProblemSeverity._(this.name);
9582 10350
9583 factory RefactoringProblemSeverity(String name) { 10351 factory RefactoringProblemSeverity(String name) {
9584 switch (name) { 10352 switch (name) {
9585 case "INFO": 10353 case "INFO":
9586 return INFO; 10354 return INFO;
9587 case "WARNING": 10355 case "WARNING":
9588 return WARNING; 10356 return WARNING;
9589 case "ERROR": 10357 case "ERROR":
9590 return ERROR; 10358 return ERROR;
9591 case "FATAL": 10359 case "FATAL":
9592 return FATAL; 10360 return FATAL;
9593 } 10361 }
9594 throw new Exception('Illegal enum value: $name'); 10362 throw new Exception('Illegal enum value: $name');
9595 } 10363 }
9596 10364
9597 factory RefactoringProblemSeverity.fromJson(JsonDecoder jsonDecoder, String js onPath, Object json) { 10365 factory RefactoringProblemSeverity.fromJson(
10366 JsonDecoder jsonDecoder, String jsonPath, Object json) {
9598 if (json is String) { 10367 if (json is String) {
9599 try { 10368 try {
9600 return new RefactoringProblemSeverity(json); 10369 return new RefactoringProblemSeverity(json);
9601 } catch(_) { 10370 } catch (_) {
9602 // Fall through 10371 // Fall through
9603 } 10372 }
9604 } 10373 }
9605 throw jsonDecoder.mismatch(jsonPath, "RefactoringProblemSeverity", json); 10374 throw jsonDecoder.mismatch(jsonPath, "RefactoringProblemSeverity", json);
9606 } 10375 }
9607 10376
9608 /** 10377 /**
9609 * Returns the [RefactoringProblemSeverity] with the maximal severity. 10378 * Returns the [RefactoringProblemSeverity] with the maximal severity.
9610 */ 10379 */
9611 static RefactoringProblemSeverity max(RefactoringProblemSeverity a, Refactorin gProblemSeverity b) => 10380 static RefactoringProblemSeverity max(
10381 RefactoringProblemSeverity a, RefactoringProblemSeverity b) =>
9612 maxRefactoringProblemSeverity(a, b); 10382 maxRefactoringProblemSeverity(a, b);
9613 10383
9614 @override 10384 @override
9615 String toString() => "RefactoringProblemSeverity.$name"; 10385 String toString() => "RefactoringProblemSeverity.$name";
9616 10386
9617 String toJson() => name; 10387 String toJson() => name;
9618 } 10388 }
9619 10389
9620 /** 10390 /**
9621 * RemoveContentOverlay 10391 * RemoveContentOverlay
9622 * 10392 *
9623 * { 10393 * {
9624 * "type": "remove" 10394 * "type": "remove"
9625 * } 10395 * }
9626 * 10396 *
9627 * Clients may not extend, implement or mix-in this class. 10397 * Clients may not extend, implement or mix-in this class.
9628 */ 10398 */
9629 class RemoveContentOverlay implements HasToJson { 10399 class RemoveContentOverlay implements HasToJson {
9630 RemoveContentOverlay(); 10400 RemoveContentOverlay();
9631 10401
9632 factory RemoveContentOverlay.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) { 10402 factory RemoveContentOverlay.fromJson(
10403 JsonDecoder jsonDecoder, String jsonPath, Object json) {
9633 if (json == null) { 10404 if (json == null) {
9634 json = {}; 10405 json = {};
9635 } 10406 }
9636 if (json is Map) { 10407 if (json is Map) {
9637 if (json["type"] != "remove") { 10408 if (json["type"] != "remove") {
9638 throw jsonDecoder.mismatch(jsonPath, "equal " + "remove", json); 10409 throw jsonDecoder.mismatch(jsonPath, "equal " + "remove", json);
9639 } 10410 }
9640 return new RemoveContentOverlay(); 10411 return new RemoveContentOverlay();
9641 } else { 10412 } else {
9642 throw jsonDecoder.mismatch(jsonPath, "RemoveContentOverlay", json); 10413 throw jsonDecoder.mismatch(jsonPath, "RemoveContentOverlay", json);
9643 } 10414 }
9644 } 10415 }
9645 10416
9646 @override 10417 @override
9647 Map<String, dynamic> toJson() { 10418 Map<String, dynamic> toJson() {
9648 Map<String, dynamic> result = {}; 10419 Map<String, dynamic> result = {};
9649 result["type"] = "remove"; 10420 result["type"] = "remove";
9650 return result; 10421 return result;
9651 } 10422 }
9652 10423
9653 @override 10424 @override
9654 String toString() => JSON.encode(toJson()); 10425 String toString() => JSON.encode(toJson());
9655 10426
9656 @override 10427 @override
9657 bool operator==(other) { 10428 bool operator ==(other) {
9658 if (other is RemoveContentOverlay) { 10429 if (other is RemoveContentOverlay) {
9659 return true; 10430 return true;
9660 } 10431 }
9661 return false; 10432 return false;
9662 } 10433 }
9663 10434
9664 @override 10435 @override
9665 int get hashCode { 10436 int get hashCode {
9666 int hash = 0; 10437 int hash = 0;
9667 hash = JenkinsSmiHash.combine(hash, 114870849); 10438 hash = JenkinsSmiHash.combine(hash, 114870849);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
9737 String get oldName => _oldName; 10508 String get oldName => _oldName;
9738 10509
9739 /** 10510 /**
9740 * The old name of the element before the refactoring. 10511 * The old name of the element before the refactoring.
9741 */ 10512 */
9742 void set oldName(String value) { 10513 void set oldName(String value) {
9743 assert(value != null); 10514 assert(value != null);
9744 this._oldName = value; 10515 this._oldName = value;
9745 } 10516 }
9746 10517
9747 RenameFeedback(int offset, int length, String elementKindName, String oldName) { 10518 RenameFeedback(
10519 int offset, int length, String elementKindName, String oldName) {
9748 this.offset = offset; 10520 this.offset = offset;
9749 this.length = length; 10521 this.length = length;
9750 this.elementKindName = elementKindName; 10522 this.elementKindName = elementKindName;
9751 this.oldName = oldName; 10523 this.oldName = oldName;
9752 } 10524 }
9753 10525
9754 factory RenameFeedback.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje ct json) { 10526 factory RenameFeedback.fromJson(
10527 JsonDecoder jsonDecoder, String jsonPath, Object json) {
9755 if (json == null) { 10528 if (json == null) {
9756 json = {}; 10529 json = {};
9757 } 10530 }
9758 if (json is Map) { 10531 if (json is Map) {
9759 int offset; 10532 int offset;
9760 if (json.containsKey("offset")) { 10533 if (json.containsKey("offset")) {
9761 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); 10534 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
9762 } else { 10535 } else {
9763 throw jsonDecoder.mismatch(jsonPath, "offset"); 10536 throw jsonDecoder.mismatch(jsonPath, "offset");
9764 } 10537 }
9765 int length; 10538 int length;
9766 if (json.containsKey("length")) { 10539 if (json.containsKey("length")) {
9767 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]); 10540 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
9768 } else { 10541 } else {
9769 throw jsonDecoder.mismatch(jsonPath, "length"); 10542 throw jsonDecoder.mismatch(jsonPath, "length");
9770 } 10543 }
9771 String elementKindName; 10544 String elementKindName;
9772 if (json.containsKey("elementKindName")) { 10545 if (json.containsKey("elementKindName")) {
9773 elementKindName = jsonDecoder.decodeString(jsonPath + ".elementKindName" , json["elementKindName"]); 10546 elementKindName = jsonDecoder.decodeString(
10547 jsonPath + ".elementKindName", json["elementKindName"]);
9774 } else { 10548 } else {
9775 throw jsonDecoder.mismatch(jsonPath, "elementKindName"); 10549 throw jsonDecoder.mismatch(jsonPath, "elementKindName");
9776 } 10550 }
9777 String oldName; 10551 String oldName;
9778 if (json.containsKey("oldName")) { 10552 if (json.containsKey("oldName")) {
9779 oldName = jsonDecoder.decodeString(jsonPath + ".oldName", json["oldName" ]); 10553 oldName =
10554 jsonDecoder.decodeString(jsonPath + ".oldName", json["oldName"]);
9780 } else { 10555 } else {
9781 throw jsonDecoder.mismatch(jsonPath, "oldName"); 10556 throw jsonDecoder.mismatch(jsonPath, "oldName");
9782 } 10557 }
9783 return new RenameFeedback(offset, length, elementKindName, oldName); 10558 return new RenameFeedback(offset, length, elementKindName, oldName);
9784 } else { 10559 } else {
9785 throw jsonDecoder.mismatch(jsonPath, "rename feedback", json); 10560 throw jsonDecoder.mismatch(jsonPath, "rename feedback", json);
9786 } 10561 }
9787 } 10562 }
9788 10563
9789 @override 10564 @override
9790 Map<String, dynamic> toJson() { 10565 Map<String, dynamic> toJson() {
9791 Map<String, dynamic> result = {}; 10566 Map<String, dynamic> result = {};
9792 result["offset"] = offset; 10567 result["offset"] = offset;
9793 result["length"] = length; 10568 result["length"] = length;
9794 result["elementKindName"] = elementKindName; 10569 result["elementKindName"] = elementKindName;
9795 result["oldName"] = oldName; 10570 result["oldName"] = oldName;
9796 return result; 10571 return result;
9797 } 10572 }
9798 10573
9799 @override 10574 @override
9800 String toString() => JSON.encode(toJson()); 10575 String toString() => JSON.encode(toJson());
9801 10576
9802 @override 10577 @override
9803 bool operator==(other) { 10578 bool operator ==(other) {
9804 if (other is RenameFeedback) { 10579 if (other is RenameFeedback) {
9805 return offset == other.offset && 10580 return offset == other.offset &&
9806 length == other.length && 10581 length == other.length &&
9807 elementKindName == other.elementKindName && 10582 elementKindName == other.elementKindName &&
9808 oldName == other.oldName; 10583 oldName == other.oldName;
9809 } 10584 }
9810 return false; 10585 return false;
9811 } 10586 }
9812 10587
9813 @override 10588 @override
(...skipping 29 matching lines...) Expand all
9843 */ 10618 */
9844 void set newName(String value) { 10619 void set newName(String value) {
9845 assert(value != null); 10620 assert(value != null);
9846 this._newName = value; 10621 this._newName = value;
9847 } 10622 }
9848 10623
9849 RenameOptions(String newName) { 10624 RenameOptions(String newName) {
9850 this.newName = newName; 10625 this.newName = newName;
9851 } 10626 }
9852 10627
9853 factory RenameOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath, Objec t json) { 10628 factory RenameOptions.fromJson(
10629 JsonDecoder jsonDecoder, String jsonPath, Object json) {
9854 if (json == null) { 10630 if (json == null) {
9855 json = {}; 10631 json = {};
9856 } 10632 }
9857 if (json is Map) { 10633 if (json is Map) {
9858 String newName; 10634 String newName;
9859 if (json.containsKey("newName")) { 10635 if (json.containsKey("newName")) {
9860 newName = jsonDecoder.decodeString(jsonPath + ".newName", json["newName" ]); 10636 newName =
10637 jsonDecoder.decodeString(jsonPath + ".newName", json["newName"]);
9861 } else { 10638 } else {
9862 throw jsonDecoder.mismatch(jsonPath, "newName"); 10639 throw jsonDecoder.mismatch(jsonPath, "newName");
9863 } 10640 }
9864 return new RenameOptions(newName); 10641 return new RenameOptions(newName);
9865 } else { 10642 } else {
9866 throw jsonDecoder.mismatch(jsonPath, "rename options", json); 10643 throw jsonDecoder.mismatch(jsonPath, "rename options", json);
9867 } 10644 }
9868 } 10645 }
9869 10646
9870 factory RenameOptions.fromRefactoringParams(EditGetRefactoringParams refactori ngParams, Request request) { 10647 factory RenameOptions.fromRefactoringParams(
10648 EditGetRefactoringParams refactoringParams, Request request) {
9871 return new RenameOptions.fromJson( 10649 return new RenameOptions.fromJson(
9872 new RequestDecoder(request), "options", refactoringParams.options); 10650 new RequestDecoder(request), "options", refactoringParams.options);
9873 } 10651 }
9874 10652
9875 @override 10653 @override
9876 Map<String, dynamic> toJson() { 10654 Map<String, dynamic> toJson() {
9877 Map<String, dynamic> result = {}; 10655 Map<String, dynamic> result = {};
9878 result["newName"] = newName; 10656 result["newName"] = newName;
9879 return result; 10657 return result;
9880 } 10658 }
9881 10659
9882 @override 10660 @override
9883 String toString() => JSON.encode(toJson()); 10661 String toString() => JSON.encode(toJson());
9884 10662
9885 @override 10663 @override
9886 bool operator==(other) { 10664 bool operator ==(other) {
9887 if (other is RenameOptions) { 10665 if (other is RenameOptions) {
9888 return newName == other.newName; 10666 return newName == other.newName;
9889 } 10667 }
9890 return false; 10668 return false;
9891 } 10669 }
9892 10670
9893 @override 10671 @override
9894 int get hashCode { 10672 int get hashCode {
9895 int hash = 0; 10673 int hash = 0;
9896 hash = JenkinsSmiHash.combine(hash, newName.hashCode); 10674 hash = JenkinsSmiHash.combine(hash, newName.hashCode);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
9955 void set stackTrace(String value) { 10733 void set stackTrace(String value) {
9956 this._stackTrace = value; 10734 this._stackTrace = value;
9957 } 10735 }
9958 10736
9959 RequestError(RequestErrorCode code, String message, {String stackTrace}) { 10737 RequestError(RequestErrorCode code, String message, {String stackTrace}) {
9960 this.code = code; 10738 this.code = code;
9961 this.message = message; 10739 this.message = message;
9962 this.stackTrace = stackTrace; 10740 this.stackTrace = stackTrace;
9963 } 10741 }
9964 10742
9965 factory RequestError.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 10743 factory RequestError.fromJson(
10744 JsonDecoder jsonDecoder, String jsonPath, Object json) {
9966 if (json == null) { 10745 if (json == null) {
9967 json = {}; 10746 json = {};
9968 } 10747 }
9969 if (json is Map) { 10748 if (json is Map) {
9970 RequestErrorCode code; 10749 RequestErrorCode code;
9971 if (json.containsKey("code")) { 10750 if (json.containsKey("code")) {
9972 code = new RequestErrorCode.fromJson(jsonDecoder, jsonPath + ".code", js on["code"]); 10751 code = new RequestErrorCode.fromJson(
10752 jsonDecoder, jsonPath + ".code", json["code"]);
9973 } else { 10753 } else {
9974 throw jsonDecoder.mismatch(jsonPath, "code"); 10754 throw jsonDecoder.mismatch(jsonPath, "code");
9975 } 10755 }
9976 String message; 10756 String message;
9977 if (json.containsKey("message")) { 10757 if (json.containsKey("message")) {
9978 message = jsonDecoder.decodeString(jsonPath + ".message", json["message" ]); 10758 message =
10759 jsonDecoder.decodeString(jsonPath + ".message", json["message"]);
9979 } else { 10760 } else {
9980 throw jsonDecoder.mismatch(jsonPath, "message"); 10761 throw jsonDecoder.mismatch(jsonPath, "message");
9981 } 10762 }
9982 String stackTrace; 10763 String stackTrace;
9983 if (json.containsKey("stackTrace")) { 10764 if (json.containsKey("stackTrace")) {
9984 stackTrace = jsonDecoder.decodeString(jsonPath + ".stackTrace", json["st ackTrace"]); 10765 stackTrace = jsonDecoder.decodeString(
10766 jsonPath + ".stackTrace", json["stackTrace"]);
9985 } 10767 }
9986 return new RequestError(code, message, stackTrace: stackTrace); 10768 return new RequestError(code, message, stackTrace: stackTrace);
9987 } else { 10769 } else {
9988 throw jsonDecoder.mismatch(jsonPath, "RequestError", json); 10770 throw jsonDecoder.mismatch(jsonPath, "RequestError", json);
9989 } 10771 }
9990 } 10772 }
9991 10773
9992 @override 10774 @override
9993 Map<String, dynamic> toJson() { 10775 Map<String, dynamic> toJson() {
9994 Map<String, dynamic> result = {}; 10776 Map<String, dynamic> result = {};
9995 result["code"] = code.toJson(); 10777 result["code"] = code.toJson();
9996 result["message"] = message; 10778 result["message"] = message;
9997 if (stackTrace != null) { 10779 if (stackTrace != null) {
9998 result["stackTrace"] = stackTrace; 10780 result["stackTrace"] = stackTrace;
9999 } 10781 }
10000 return result; 10782 return result;
10001 } 10783 }
10002 10784
10003 @override 10785 @override
10004 String toString() => JSON.encode(toJson()); 10786 String toString() => JSON.encode(toJson());
10005 10787
10006 @override 10788 @override
10007 bool operator==(other) { 10789 bool operator ==(other) {
10008 if (other is RequestError) { 10790 if (other is RequestError) {
10009 return code == other.code && 10791 return code == other.code &&
10010 message == other.message && 10792 message == other.message &&
10011 stackTrace == other.stackTrace; 10793 stackTrace == other.stackTrace;
10012 } 10794 }
10013 return false; 10795 return false;
10014 } 10796 }
10015 10797
10016 @override 10798 @override
10017 int get hashCode { 10799 int get hashCode {
(...skipping 20 matching lines...) Expand all
10038 class RequestErrorCode implements Enum { 10820 class RequestErrorCode implements Enum {
10039 /** 10821 /**
10040 * An "analysis.updateContent" request contained a ChangeContentOverlay 10822 * An "analysis.updateContent" request contained a ChangeContentOverlay
10041 * object that can't be applied. This can happen for two reasons: 10823 * object that can't be applied. This can happen for two reasons:
10042 * 10824 *
10043 * - there was no preceding AddContentOverlay and hence no content to which 10825 * - there was no preceding AddContentOverlay and hence no content to which
10044 * the edits could be applied, or 10826 * the edits could be applied, or
10045 * - one or more of the specified edits have an offset or length that is out 10827 * - one or more of the specified edits have an offset or length that is out
10046 * of range. 10828 * of range.
10047 */ 10829 */
10048 static const RequestErrorCode INVALID_OVERLAY_CHANGE = const RequestErrorCode. _("INVALID_OVERLAY_CHANGE"); 10830 static const RequestErrorCode INVALID_OVERLAY_CHANGE =
10831 const RequestErrorCode._("INVALID_OVERLAY_CHANGE");
10049 10832
10050 /** 10833 /**
10051 * One of the method parameters was invalid. 10834 * One of the method parameters was invalid.
10052 */ 10835 */
10053 static const RequestErrorCode INVALID_PARAMETER = const RequestErrorCode._("IN VALID_PARAMETER"); 10836 static const RequestErrorCode INVALID_PARAMETER =
10837 const RequestErrorCode._("INVALID_PARAMETER");
10054 10838
10055 /** 10839 /**
10056 * An internal error occurred in the plugin while attempting to respond to a 10840 * An internal error occurred in the plugin while attempting to respond to a
10057 * request. Also see the plugin.error notification for errors that occur 10841 * request. Also see the plugin.error notification for errors that occur
10058 * outside of handling a request. 10842 * outside of handling a request.
10059 */ 10843 */
10060 static const RequestErrorCode PLUGIN_ERROR = const RequestErrorCode._("PLUGIN_ ERROR"); 10844 static const RequestErrorCode PLUGIN_ERROR =
10845 const RequestErrorCode._("PLUGIN_ERROR");
10061 10846
10062 /** 10847 /**
10063 * A request was received that the plugin does not recognize, or cannot 10848 * A request was received that the plugin does not recognize, or cannot
10064 * handle in its current configuration. 10849 * handle in its current configuration.
10065 */ 10850 */
10066 static const RequestErrorCode UNKNOWN_REQUEST = const RequestErrorCode._("UNKN OWN_REQUEST"); 10851 static const RequestErrorCode UNKNOWN_REQUEST =
10852 const RequestErrorCode._("UNKNOWN_REQUEST");
10067 10853
10068 /** 10854 /**
10069 * A list containing all of the enum values that are defined. 10855 * A list containing all of the enum values that are defined.
10070 */ 10856 */
10071 static const List<RequestErrorCode> VALUES = const <RequestErrorCode>[INVALID_ OVERLAY_CHANGE, INVALID_PARAMETER, PLUGIN_ERROR, UNKNOWN_REQUEST]; 10857 static const List<RequestErrorCode> VALUES = const <RequestErrorCode>[
10858 INVALID_OVERLAY_CHANGE,
10859 INVALID_PARAMETER,
10860 PLUGIN_ERROR,
10861 UNKNOWN_REQUEST
10862 ];
10072 10863
10073 @override 10864 @override
10074 final String name; 10865 final String name;
10075 10866
10076 const RequestErrorCode._(this.name); 10867 const RequestErrorCode._(this.name);
10077 10868
10078 factory RequestErrorCode(String name) { 10869 factory RequestErrorCode(String name) {
10079 switch (name) { 10870 switch (name) {
10080 case "INVALID_OVERLAY_CHANGE": 10871 case "INVALID_OVERLAY_CHANGE":
10081 return INVALID_OVERLAY_CHANGE; 10872 return INVALID_OVERLAY_CHANGE;
10082 case "INVALID_PARAMETER": 10873 case "INVALID_PARAMETER":
10083 return INVALID_PARAMETER; 10874 return INVALID_PARAMETER;
10084 case "PLUGIN_ERROR": 10875 case "PLUGIN_ERROR":
10085 return PLUGIN_ERROR; 10876 return PLUGIN_ERROR;
10086 case "UNKNOWN_REQUEST": 10877 case "UNKNOWN_REQUEST":
10087 return UNKNOWN_REQUEST; 10878 return UNKNOWN_REQUEST;
10088 } 10879 }
10089 throw new Exception('Illegal enum value: $name'); 10880 throw new Exception('Illegal enum value: $name');
10090 } 10881 }
10091 10882
10092 factory RequestErrorCode.fromJson(JsonDecoder jsonDecoder, String jsonPath, Ob ject json) { 10883 factory RequestErrorCode.fromJson(
10884 JsonDecoder jsonDecoder, String jsonPath, Object json) {
10093 if (json is String) { 10885 if (json is String) {
10094 try { 10886 try {
10095 return new RequestErrorCode(json); 10887 return new RequestErrorCode(json);
10096 } catch(_) { 10888 } catch (_) {
10097 // Fall through 10889 // Fall through
10098 } 10890 }
10099 } 10891 }
10100 throw jsonDecoder.mismatch(jsonPath, "RequestErrorCode", json); 10892 throw jsonDecoder.mismatch(jsonPath, "RequestErrorCode", json);
10101 } 10893 }
10102 10894
10103 @override 10895 @override
10104 String toString() => "RequestErrorCode.$name"; 10896 String toString() => "RequestErrorCode.$name";
10105 10897
10106 String toJson() => name; 10898 String toJson() => name;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
10173 */ 10965 */
10174 Position get selection => _selection; 10966 Position get selection => _selection;
10175 10967
10176 /** 10968 /**
10177 * The position that should be selected after the edits have been applied. 10969 * The position that should be selected after the edits have been applied.
10178 */ 10970 */
10179 void set selection(Position value) { 10971 void set selection(Position value) {
10180 this._selection = value; 10972 this._selection = value;
10181 } 10973 }
10182 10974
10183 SourceChange(String message, {List<SourceFileEdit> edits, List<LinkedEditGroup > linkedEditGroups, Position selection}) { 10975 SourceChange(String message,
10976 {List<SourceFileEdit> edits,
10977 List<LinkedEditGroup> linkedEditGroups,
10978 Position selection}) {
10184 this.message = message; 10979 this.message = message;
10185 if (edits == null) { 10980 if (edits == null) {
10186 this.edits = <SourceFileEdit>[]; 10981 this.edits = <SourceFileEdit>[];
10187 } else { 10982 } else {
10188 this.edits = edits; 10983 this.edits = edits;
10189 } 10984 }
10190 if (linkedEditGroups == null) { 10985 if (linkedEditGroups == null) {
10191 this.linkedEditGroups = <LinkedEditGroup>[]; 10986 this.linkedEditGroups = <LinkedEditGroup>[];
10192 } else { 10987 } else {
10193 this.linkedEditGroups = linkedEditGroups; 10988 this.linkedEditGroups = linkedEditGroups;
10194 } 10989 }
10195 this.selection = selection; 10990 this.selection = selection;
10196 } 10991 }
10197 10992
10198 factory SourceChange.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 10993 factory SourceChange.fromJson(
10994 JsonDecoder jsonDecoder, String jsonPath, Object json) {
10199 if (json == null) { 10995 if (json == null) {
10200 json = {}; 10996 json = {};
10201 } 10997 }
10202 if (json is Map) { 10998 if (json is Map) {
10203 String message; 10999 String message;
10204 if (json.containsKey("message")) { 11000 if (json.containsKey("message")) {
10205 message = jsonDecoder.decodeString(jsonPath + ".message", json["message" ]); 11001 message =
11002 jsonDecoder.decodeString(jsonPath + ".message", json["message"]);
10206 } else { 11003 } else {
10207 throw jsonDecoder.mismatch(jsonPath, "message"); 11004 throw jsonDecoder.mismatch(jsonPath, "message");
10208 } 11005 }
10209 List<SourceFileEdit> edits; 11006 List<SourceFileEdit> edits;
10210 if (json.containsKey("edits")) { 11007 if (json.containsKey("edits")) {
10211 edits = jsonDecoder.decodeList(jsonPath + ".edits", json["edits"], (Stri ng jsonPath, Object json) => new SourceFileEdit.fromJson(jsonDecoder, jsonPath, json)); 11008 edits = jsonDecoder.decodeList(
11009 jsonPath + ".edits",
11010 json["edits"],
11011 (String jsonPath, Object json) =>
11012 new SourceFileEdit.fromJson(jsonDecoder, jsonPath, json));
10212 } else { 11013 } else {
10213 throw jsonDecoder.mismatch(jsonPath, "edits"); 11014 throw jsonDecoder.mismatch(jsonPath, "edits");
10214 } 11015 }
10215 List<LinkedEditGroup> linkedEditGroups; 11016 List<LinkedEditGroup> linkedEditGroups;
10216 if (json.containsKey("linkedEditGroups")) { 11017 if (json.containsKey("linkedEditGroups")) {
10217 linkedEditGroups = jsonDecoder.decodeList(jsonPath + ".linkedEditGroups" , json["linkedEditGroups"], (String jsonPath, Object json) => new LinkedEditGrou p.fromJson(jsonDecoder, jsonPath, json)); 11018 linkedEditGroups = jsonDecoder.decodeList(
11019 jsonPath + ".linkedEditGroups",
11020 json["linkedEditGroups"],
11021 (String jsonPath, Object json) =>
11022 new LinkedEditGroup.fromJson(jsonDecoder, jsonPath, json));
10218 } else { 11023 } else {
10219 throw jsonDecoder.mismatch(jsonPath, "linkedEditGroups"); 11024 throw jsonDecoder.mismatch(jsonPath, "linkedEditGroups");
10220 } 11025 }
10221 Position selection; 11026 Position selection;
10222 if (json.containsKey("selection")) { 11027 if (json.containsKey("selection")) {
10223 selection = new Position.fromJson(jsonDecoder, jsonPath + ".selection", json["selection"]); 11028 selection = new Position.fromJson(
11029 jsonDecoder, jsonPath + ".selection", json["selection"]);
10224 } 11030 }
10225 return new SourceChange(message, edits: edits, linkedEditGroups: linkedEdi tGroups, selection: selection); 11031 return new SourceChange(message,
11032 edits: edits,
11033 linkedEditGroups: linkedEditGroups,
11034 selection: selection);
10226 } else { 11035 } else {
10227 throw jsonDecoder.mismatch(jsonPath, "SourceChange", json); 11036 throw jsonDecoder.mismatch(jsonPath, "SourceChange", json);
10228 } 11037 }
10229 } 11038 }
10230 11039
10231 @override 11040 @override
10232 Map<String, dynamic> toJson() { 11041 Map<String, dynamic> toJson() {
10233 Map<String, dynamic> result = {}; 11042 Map<String, dynamic> result = {};
10234 result["message"] = message; 11043 result["message"] = message;
10235 result["edits"] = edits.map((SourceFileEdit value) => value.toJson()).toList (); 11044 result["edits"] =
10236 result["linkedEditGroups"] = linkedEditGroups.map((LinkedEditGroup value) => value.toJson()).toList(); 11045 edits.map((SourceFileEdit value) => value.toJson()).toList();
11046 result["linkedEditGroups"] = linkedEditGroups
11047 .map((LinkedEditGroup value) => value.toJson())
11048 .toList();
10237 if (selection != null) { 11049 if (selection != null) {
10238 result["selection"] = selection.toJson(); 11050 result["selection"] = selection.toJson();
10239 } 11051 }
10240 return result; 11052 return result;
10241 } 11053 }
10242 11054
10243 /** 11055 /**
10244 * Adds [edit] to the [FileEdit] for the given [file]. 11056 * Adds [edit] to the [FileEdit] for the given [file].
10245 */ 11057 */
10246 void addEdit(String file, int fileStamp, SourceEdit edit) => 11058 void addEdit(String file, int fileStamp, SourceEdit edit) =>
10247 addEditToSourceChange(this, file, fileStamp, edit); 11059 addEditToSourceChange(this, file, fileStamp, edit);
10248 11060
10249 /** 11061 /**
10250 * Adds the given [FileEdit]. 11062 * Adds the given [FileEdit].
10251 */ 11063 */
10252 void addFileEdit(SourceFileEdit edit) { 11064 void addFileEdit(SourceFileEdit edit) {
10253 edits.add(edit); 11065 edits.add(edit);
10254 } 11066 }
10255 11067
10256 /** 11068 /**
10257 * Adds the given [LinkedEditGroup]. 11069 * Adds the given [LinkedEditGroup].
10258 */ 11070 */
10259 void addLinkedEditGroup(LinkedEditGroup linkedEditGroup) { 11071 void addLinkedEditGroup(LinkedEditGroup linkedEditGroup) {
10260 linkedEditGroups.add(linkedEditGroup); 11072 linkedEditGroups.add(linkedEditGroup);
10261 } 11073 }
10262 11074
10263 /** 11075 /**
10264 * Returns the [FileEdit] for the given [file], maybe `null`. 11076 * Returns the [FileEdit] for the given [file], maybe `null`.
10265 */ 11077 */
10266 SourceFileEdit getFileEdit(String file) => 11078 SourceFileEdit getFileEdit(String file) => getChangeFileEdit(this, file);
10267 getChangeFileEdit(this, file);
10268 11079
10269 @override 11080 @override
10270 String toString() => JSON.encode(toJson()); 11081 String toString() => JSON.encode(toJson());
10271 11082
10272 @override 11083 @override
10273 bool operator==(other) { 11084 bool operator ==(other) {
10274 if (other is SourceChange) { 11085 if (other is SourceChange) {
10275 return message == other.message && 11086 return message == other.message &&
10276 listEqual(edits, other.edits, (SourceFileEdit a, SourceFileEdit b) => a == b) && 11087 listEqual(edits, other.edits,
10277 listEqual(linkedEditGroups, other.linkedEditGroups, (LinkedEditGroup a , LinkedEditGroup b) => a == b) && 11088 (SourceFileEdit a, SourceFileEdit b) => a == b) &&
11089 listEqual(linkedEditGroups, other.linkedEditGroups,
11090 (LinkedEditGroup a, LinkedEditGroup b) => a == b) &&
10278 selection == other.selection; 11091 selection == other.selection;
10279 } 11092 }
10280 return false; 11093 return false;
10281 } 11094 }
10282 11095
10283 @override 11096 @override
10284 int get hashCode { 11097 int get hashCode {
10285 int hash = 0; 11098 int hash = 0;
10286 hash = JenkinsSmiHash.combine(hash, message.hashCode); 11099 hash = JenkinsSmiHash.combine(hash, message.hashCode);
10287 hash = JenkinsSmiHash.combine(hash, edits.hashCode); 11100 hash = JenkinsSmiHash.combine(hash, edits.hashCode);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
10384 this._id = value; 11197 this._id = value;
10385 } 11198 }
10386 11199
10387 SourceEdit(int offset, int length, String replacement, {String id}) { 11200 SourceEdit(int offset, int length, String replacement, {String id}) {
10388 this.offset = offset; 11201 this.offset = offset;
10389 this.length = length; 11202 this.length = length;
10390 this.replacement = replacement; 11203 this.replacement = replacement;
10391 this.id = id; 11204 this.id = id;
10392 } 11205 }
10393 11206
10394 factory SourceEdit.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object j son) { 11207 factory SourceEdit.fromJson(
11208 JsonDecoder jsonDecoder, String jsonPath, Object json) {
10395 if (json == null) { 11209 if (json == null) {
10396 json = {}; 11210 json = {};
10397 } 11211 }
10398 if (json is Map) { 11212 if (json is Map) {
10399 int offset; 11213 int offset;
10400 if (json.containsKey("offset")) { 11214 if (json.containsKey("offset")) {
10401 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]); 11215 offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
10402 } else { 11216 } else {
10403 throw jsonDecoder.mismatch(jsonPath, "offset"); 11217 throw jsonDecoder.mismatch(jsonPath, "offset");
10404 } 11218 }
10405 int length; 11219 int length;
10406 if (json.containsKey("length")) { 11220 if (json.containsKey("length")) {
10407 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]); 11221 length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
10408 } else { 11222 } else {
10409 throw jsonDecoder.mismatch(jsonPath, "length"); 11223 throw jsonDecoder.mismatch(jsonPath, "length");
10410 } 11224 }
10411 String replacement; 11225 String replacement;
10412 if (json.containsKey("replacement")) { 11226 if (json.containsKey("replacement")) {
10413 replacement = jsonDecoder.decodeString(jsonPath + ".replacement", json[" replacement"]); 11227 replacement = jsonDecoder.decodeString(
11228 jsonPath + ".replacement", json["replacement"]);
10414 } else { 11229 } else {
10415 throw jsonDecoder.mismatch(jsonPath, "replacement"); 11230 throw jsonDecoder.mismatch(jsonPath, "replacement");
10416 } 11231 }
10417 String id; 11232 String id;
10418 if (json.containsKey("id")) { 11233 if (json.containsKey("id")) {
10419 id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]); 11234 id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]);
10420 } 11235 }
10421 return new SourceEdit(offset, length, replacement, id: id); 11236 return new SourceEdit(offset, length, replacement, id: id);
10422 } else { 11237 } else {
10423 throw jsonDecoder.mismatch(jsonPath, "SourceEdit", json); 11238 throw jsonDecoder.mismatch(jsonPath, "SourceEdit", json);
(...skipping 19 matching lines...) Expand all
10443 11258
10444 /** 11259 /**
10445 * Get the result of applying the edit to the given [code]. 11260 * Get the result of applying the edit to the given [code].
10446 */ 11261 */
10447 String apply(String code) => applyEdit(code, this); 11262 String apply(String code) => applyEdit(code, this);
10448 11263
10449 @override 11264 @override
10450 String toString() => JSON.encode(toJson()); 11265 String toString() => JSON.encode(toJson());
10451 11266
10452 @override 11267 @override
10453 bool operator==(other) { 11268 bool operator ==(other) {
10454 if (other is SourceEdit) { 11269 if (other is SourceEdit) {
10455 return offset == other.offset && 11270 return offset == other.offset &&
10456 length == other.length && 11271 length == other.length &&
10457 replacement == other.replacement && 11272 replacement == other.replacement &&
10458 id == other.id; 11273 id == other.id;
10459 } 11274 }
10460 return false; 11275 return false;
10461 } 11276 }
10462 11277
10463 @override 11278 @override
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
10539 SourceFileEdit(String file, int fileStamp, {List<SourceEdit> edits}) { 11354 SourceFileEdit(String file, int fileStamp, {List<SourceEdit> edits}) {
10540 this.file = file; 11355 this.file = file;
10541 this.fileStamp = fileStamp; 11356 this.fileStamp = fileStamp;
10542 if (edits == null) { 11357 if (edits == null) {
10543 this.edits = <SourceEdit>[]; 11358 this.edits = <SourceEdit>[];
10544 } else { 11359 } else {
10545 this.edits = edits; 11360 this.edits = edits;
10546 } 11361 }
10547 } 11362 }
10548 11363
10549 factory SourceFileEdit.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje ct json) { 11364 factory SourceFileEdit.fromJson(
11365 JsonDecoder jsonDecoder, String jsonPath, Object json) {
10550 if (json == null) { 11366 if (json == null) {
10551 json = {}; 11367 json = {};
10552 } 11368 }
10553 if (json is Map) { 11369 if (json is Map) {
10554 String file; 11370 String file;
10555 if (json.containsKey("file")) { 11371 if (json.containsKey("file")) {
10556 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); 11372 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
10557 } else { 11373 } else {
10558 throw jsonDecoder.mismatch(jsonPath, "file"); 11374 throw jsonDecoder.mismatch(jsonPath, "file");
10559 } 11375 }
10560 int fileStamp; 11376 int fileStamp;
10561 if (json.containsKey("fileStamp")) { 11377 if (json.containsKey("fileStamp")) {
10562 fileStamp = jsonDecoder.decodeInt(jsonPath + ".fileStamp", json["fileSta mp"]); 11378 fileStamp =
11379 jsonDecoder.decodeInt(jsonPath + ".fileStamp", json["fileStamp"]);
10563 } else { 11380 } else {
10564 throw jsonDecoder.mismatch(jsonPath, "fileStamp"); 11381 throw jsonDecoder.mismatch(jsonPath, "fileStamp");
10565 } 11382 }
10566 List<SourceEdit> edits; 11383 List<SourceEdit> edits;
10567 if (json.containsKey("edits")) { 11384 if (json.containsKey("edits")) {
10568 edits = jsonDecoder.decodeList(jsonPath + ".edits", json["edits"], (Stri ng jsonPath, Object json) => new SourceEdit.fromJson(jsonDecoder, jsonPath, json )); 11385 edits = jsonDecoder.decodeList(
11386 jsonPath + ".edits",
11387 json["edits"],
11388 (String jsonPath, Object json) =>
11389 new SourceEdit.fromJson(jsonDecoder, jsonPath, json));
10569 } else { 11390 } else {
10570 throw jsonDecoder.mismatch(jsonPath, "edits"); 11391 throw jsonDecoder.mismatch(jsonPath, "edits");
10571 } 11392 }
10572 return new SourceFileEdit(file, fileStamp, edits: edits); 11393 return new SourceFileEdit(file, fileStamp, edits: edits);
10573 } else { 11394 } else {
10574 throw jsonDecoder.mismatch(jsonPath, "SourceFileEdit", json); 11395 throw jsonDecoder.mismatch(jsonPath, "SourceFileEdit", json);
10575 } 11396 }
10576 } 11397 }
10577 11398
10578 @override 11399 @override
10579 Map<String, dynamic> toJson() { 11400 Map<String, dynamic> toJson() {
10580 Map<String, dynamic> result = {}; 11401 Map<String, dynamic> result = {};
10581 result["file"] = file; 11402 result["file"] = file;
10582 result["fileStamp"] = fileStamp; 11403 result["fileStamp"] = fileStamp;
10583 result["edits"] = edits.map((SourceEdit value) => value.toJson()).toList(); 11404 result["edits"] = edits.map((SourceEdit value) => value.toJson()).toList();
10584 return result; 11405 return result;
10585 } 11406 }
10586 11407
10587 /** 11408 /**
10588 * Adds the given [Edit] to the list. 11409 * Adds the given [Edit] to the list.
10589 */ 11410 */
10590 void add(SourceEdit edit) => addEditForSource(this, edit); 11411 void add(SourceEdit edit) => addEditForSource(this, edit);
10591 11412
10592 /** 11413 /**
10593 * Adds the given [Edit]s. 11414 * Adds the given [Edit]s.
10594 */ 11415 */
10595 void addAll(Iterable<SourceEdit> edits) => 11416 void addAll(Iterable<SourceEdit> edits) => addAllEditsForSource(this, edits);
10596 addAllEditsForSource(this, edits);
10597 11417
10598 @override 11418 @override
10599 String toString() => JSON.encode(toJson()); 11419 String toString() => JSON.encode(toJson());
10600 11420
10601 @override 11421 @override
10602 bool operator==(other) { 11422 bool operator ==(other) {
10603 if (other is SourceFileEdit) { 11423 if (other is SourceFileEdit) {
10604 return file == other.file && 11424 return file == other.file &&
10605 fileStamp == other.fileStamp && 11425 fileStamp == other.fileStamp &&
10606 listEqual(edits, other.edits, (SourceEdit a, SourceEdit b) => a == b); 11426 listEqual(edits, other.edits, (SourceEdit a, SourceEdit b) => a == b);
10607 } 11427 }
10608 return false; 11428 return false;
10609 } 11429 }
10610 11430
10611 @override 11431 @override
10612 int get hashCode { 11432 int get hashCode {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
10657 void set path(String value) { 11477 void set path(String value) {
10658 assert(value != null); 11478 assert(value != null);
10659 this._path = value; 11479 this._path = value;
10660 } 11480 }
10661 11481
10662 WatchEvent(WatchEventType type, String path) { 11482 WatchEvent(WatchEventType type, String path) {
10663 this.type = type; 11483 this.type = type;
10664 this.path = path; 11484 this.path = path;
10665 } 11485 }
10666 11486
10667 factory WatchEvent.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object j son) { 11487 factory WatchEvent.fromJson(
11488 JsonDecoder jsonDecoder, String jsonPath, Object json) {
10668 if (json == null) { 11489 if (json == null) {
10669 json = {}; 11490 json = {};
10670 } 11491 }
10671 if (json is Map) { 11492 if (json is Map) {
10672 WatchEventType type; 11493 WatchEventType type;
10673 if (json.containsKey("type")) { 11494 if (json.containsKey("type")) {
10674 type = new WatchEventType.fromJson(jsonDecoder, jsonPath + ".type", json ["type"]); 11495 type = new WatchEventType.fromJson(
11496 jsonDecoder, jsonPath + ".type", json["type"]);
10675 } else { 11497 } else {
10676 throw jsonDecoder.mismatch(jsonPath, "type"); 11498 throw jsonDecoder.mismatch(jsonPath, "type");
10677 } 11499 }
10678 String path; 11500 String path;
10679 if (json.containsKey("path")) { 11501 if (json.containsKey("path")) {
10680 path = jsonDecoder.decodeString(jsonPath + ".path", json["path"]); 11502 path = jsonDecoder.decodeString(jsonPath + ".path", json["path"]);
10681 } else { 11503 } else {
10682 throw jsonDecoder.mismatch(jsonPath, "path"); 11504 throw jsonDecoder.mismatch(jsonPath, "path");
10683 } 11505 }
10684 return new WatchEvent(type, path); 11506 return new WatchEvent(type, path);
10685 } else { 11507 } else {
10686 throw jsonDecoder.mismatch(jsonPath, "WatchEvent", json); 11508 throw jsonDecoder.mismatch(jsonPath, "WatchEvent", json);
10687 } 11509 }
10688 } 11510 }
10689 11511
10690 @override 11512 @override
10691 Map<String, dynamic> toJson() { 11513 Map<String, dynamic> toJson() {
10692 Map<String, dynamic> result = {}; 11514 Map<String, dynamic> result = {};
10693 result["type"] = type.toJson(); 11515 result["type"] = type.toJson();
10694 result["path"] = path; 11516 result["path"] = path;
10695 return result; 11517 return result;
10696 } 11518 }
10697 11519
10698 @override 11520 @override
10699 String toString() => JSON.encode(toJson()); 11521 String toString() => JSON.encode(toJson());
10700 11522
10701 @override 11523 @override
10702 bool operator==(other) { 11524 bool operator ==(other) {
10703 if (other is WatchEvent) { 11525 if (other is WatchEvent) {
10704 return type == other.type && 11526 return type == other.type && path == other.path;
10705 path == other.path;
10706 } 11527 }
10707 return false; 11528 return false;
10708 } 11529 }
10709 11530
10710 @override 11531 @override
10711 int get hashCode { 11532 int get hashCode {
10712 int hash = 0; 11533 int hash = 0;
10713 hash = JenkinsSmiHash.combine(hash, type.hashCode); 11534 hash = JenkinsSmiHash.combine(hash, type.hashCode);
10714 hash = JenkinsSmiHash.combine(hash, path.hashCode); 11535 hash = JenkinsSmiHash.combine(hash, path.hashCode);
10715 return JenkinsSmiHash.finish(hash); 11536 return JenkinsSmiHash.finish(hash);
(...skipping 23 matching lines...) Expand all
10739 static const WatchEventType MODIFY = const WatchEventType._("MODIFY"); 11560 static const WatchEventType MODIFY = const WatchEventType._("MODIFY");
10740 11561
10741 /** 11562 /**
10742 * An indication that the file or directory was removed. 11563 * An indication that the file or directory was removed.
10743 */ 11564 */
10744 static const WatchEventType REMOVE = const WatchEventType._("REMOVE"); 11565 static const WatchEventType REMOVE = const WatchEventType._("REMOVE");
10745 11566
10746 /** 11567 /**
10747 * A list containing all of the enum values that are defined. 11568 * A list containing all of the enum values that are defined.
10748 */ 11569 */
10749 static const List<WatchEventType> VALUES = const <WatchEventType>[ADD, MODIFY, REMOVE]; 11570 static const List<WatchEventType> VALUES = const <WatchEventType>[
11571 ADD,
11572 MODIFY,
11573 REMOVE
11574 ];
10750 11575
10751 @override 11576 @override
10752 final String name; 11577 final String name;
10753 11578
10754 const WatchEventType._(this.name); 11579 const WatchEventType._(this.name);
10755 11580
10756 factory WatchEventType(String name) { 11581 factory WatchEventType(String name) {
10757 switch (name) { 11582 switch (name) {
10758 case "ADD": 11583 case "ADD":
10759 return ADD; 11584 return ADD;
10760 case "MODIFY": 11585 case "MODIFY":
10761 return MODIFY; 11586 return MODIFY;
10762 case "REMOVE": 11587 case "REMOVE":
10763 return REMOVE; 11588 return REMOVE;
10764 } 11589 }
10765 throw new Exception('Illegal enum value: $name'); 11590 throw new Exception('Illegal enum value: $name');
10766 } 11591 }
10767 11592
10768 factory WatchEventType.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje ct json) { 11593 factory WatchEventType.fromJson(
11594 JsonDecoder jsonDecoder, String jsonPath, Object json) {
10769 if (json is String) { 11595 if (json is String) {
10770 try { 11596 try {
10771 return new WatchEventType(json); 11597 return new WatchEventType(json);
10772 } catch(_) { 11598 } catch (_) {
10773 // Fall through 11599 // Fall through
10774 } 11600 }
10775 } 11601 }
10776 throw jsonDecoder.mismatch(jsonPath, "WatchEventType", json); 11602 throw jsonDecoder.mismatch(jsonPath, "WatchEventType", json);
10777 } 11603 }
10778 11604
10779 @override 11605 @override
10780 String toString() => "WatchEventType.$name"; 11606 String toString() => "WatchEventType.$name";
10781 11607
10782 String toJson() => name; 11608 String toJson() => name;
10783 } 11609 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698