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

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

Issue 541823004: Decode RefactoringFeedback automatically. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script 6 // To regenerate the file, use the script
7 // "pkg/analysis_server/spec/generate_files". 7 // "pkg/analysis_server/spec/generate_files".
8 8
9 part of protocol; 9 part of protocol;
10 /** 10 /**
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 throw jsonDecoder.missingKey(jsonPath, "version"); 56 throw jsonDecoder.missingKey(jsonPath, "version");
57 } 57 }
58 return new ServerGetVersionResult(version); 58 return new ServerGetVersionResult(version);
59 } else { 59 } else {
60 throw jsonDecoder.mismatch(jsonPath, "server.getVersion result"); 60 throw jsonDecoder.mismatch(jsonPath, "server.getVersion result");
61 } 61 }
62 } 62 }
63 63
64 factory ServerGetVersionResult.fromResponse(Response response) { 64 factory ServerGetVersionResult.fromResponse(Response response) {
65 return new ServerGetVersionResult.fromJson( 65 return new ServerGetVersionResult.fromJson(
66 new ResponseDecoder(), "result", response._result); 66 new ResponseDecoder(response), "result", response._result);
67 } 67 }
68 68
69 Map<String, dynamic> toJson() { 69 Map<String, dynamic> toJson() {
70 Map<String, dynamic> result = {}; 70 Map<String, dynamic> result = {};
71 result["version"] = version; 71 result["version"] = version;
72 return result; 72 return result;
73 } 73 }
74 74
75 Response toResponse(String id) { 75 Response toResponse(String id) {
76 return new Response(id, result: toJson()); 76 return new Response(id, result: toJson());
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 throw jsonDecoder.missingKey(jsonPath, "stackTrace"); 298 throw jsonDecoder.missingKey(jsonPath, "stackTrace");
299 } 299 }
300 return new ServerErrorParams(isFatal, message, stackTrace); 300 return new ServerErrorParams(isFatal, message, stackTrace);
301 } else { 301 } else {
302 throw jsonDecoder.mismatch(jsonPath, "server.error params"); 302 throw jsonDecoder.mismatch(jsonPath, "server.error params");
303 } 303 }
304 } 304 }
305 305
306 factory ServerErrorParams.fromNotification(Notification notification) { 306 factory ServerErrorParams.fromNotification(Notification notification) {
307 return new ServerErrorParams.fromJson( 307 return new ServerErrorParams.fromJson(
308 new ResponseDecoder(), "params", notification._params); 308 new ResponseDecoder(null), "params", notification._params);
309 } 309 }
310 310
311 Map<String, dynamic> toJson() { 311 Map<String, dynamic> toJson() {
312 Map<String, dynamic> result = {}; 312 Map<String, dynamic> result = {};
313 result["isFatal"] = isFatal; 313 result["isFatal"] = isFatal;
314 result["message"] = message; 314 result["message"] = message;
315 result["stackTrace"] = stackTrace; 315 result["stackTrace"] = stackTrace;
316 return result; 316 return result;
317 } 317 }
318 318
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 analysis = new AnalysisStatus.fromJson(jsonDecoder, jsonPath + ".analysi s", json["analysis"]); 369 analysis = new AnalysisStatus.fromJson(jsonDecoder, jsonPath + ".analysi s", json["analysis"]);
370 } 370 }
371 return new ServerStatusParams(analysis: analysis); 371 return new ServerStatusParams(analysis: analysis);
372 } else { 372 } else {
373 throw jsonDecoder.mismatch(jsonPath, "server.status params"); 373 throw jsonDecoder.mismatch(jsonPath, "server.status params");
374 } 374 }
375 } 375 }
376 376
377 factory ServerStatusParams.fromNotification(Notification notification) { 377 factory ServerStatusParams.fromNotification(Notification notification) {
378 return new ServerStatusParams.fromJson( 378 return new ServerStatusParams.fromJson(
379 new ResponseDecoder(), "params", notification._params); 379 new ResponseDecoder(null), "params", notification._params);
380 } 380 }
381 381
382 Map<String, dynamic> toJson() { 382 Map<String, dynamic> toJson() {
383 Map<String, dynamic> result = {}; 383 Map<String, dynamic> result = {};
384 if (analysis != null) { 384 if (analysis != null) {
385 result["analysis"] = analysis.toJson(); 385 result["analysis"] = analysis.toJson();
386 } 386 }
387 return result; 387 return result;
388 } 388 }
389 389
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 throw jsonDecoder.missingKey(jsonPath, "errors"); 503 throw jsonDecoder.missingKey(jsonPath, "errors");
504 } 504 }
505 return new AnalysisGetErrorsResult(errors); 505 return new AnalysisGetErrorsResult(errors);
506 } else { 506 } else {
507 throw jsonDecoder.mismatch(jsonPath, "analysis.getErrors result"); 507 throw jsonDecoder.mismatch(jsonPath, "analysis.getErrors result");
508 } 508 }
509 } 509 }
510 510
511 factory AnalysisGetErrorsResult.fromResponse(Response response) { 511 factory AnalysisGetErrorsResult.fromResponse(Response response) {
512 return new AnalysisGetErrorsResult.fromJson( 512 return new AnalysisGetErrorsResult.fromJson(
513 new ResponseDecoder(), "result", response._result); 513 new ResponseDecoder(response), "result", response._result);
514 } 514 }
515 515
516 Map<String, dynamic> toJson() { 516 Map<String, dynamic> toJson() {
517 Map<String, dynamic> result = {}; 517 Map<String, dynamic> result = {};
518 result["errors"] = errors.map((AnalysisError value) => value.toJson()).toLis t(); 518 result["errors"] = errors.map((AnalysisError value) => value.toJson()).toLis t();
519 return result; 519 return result;
520 } 520 }
521 521
522 Response toResponse(String id) { 522 Response toResponse(String id) {
523 return new Response(id, result: toJson()); 523 return new Response(id, result: toJson());
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 throw jsonDecoder.missingKey(jsonPath, "hovers"); 654 throw jsonDecoder.missingKey(jsonPath, "hovers");
655 } 655 }
656 return new AnalysisGetHoverResult(hovers); 656 return new AnalysisGetHoverResult(hovers);
657 } else { 657 } else {
658 throw jsonDecoder.mismatch(jsonPath, "analysis.getHover result"); 658 throw jsonDecoder.mismatch(jsonPath, "analysis.getHover result");
659 } 659 }
660 } 660 }
661 661
662 factory AnalysisGetHoverResult.fromResponse(Response response) { 662 factory AnalysisGetHoverResult.fromResponse(Response response) {
663 return new AnalysisGetHoverResult.fromJson( 663 return new AnalysisGetHoverResult.fromJson(
664 new ResponseDecoder(), "result", response._result); 664 new ResponseDecoder(response), "result", response._result);
665 } 665 }
666 666
667 Map<String, dynamic> toJson() { 667 Map<String, dynamic> toJson() {
668 Map<String, dynamic> result = {}; 668 Map<String, dynamic> result = {};
669 result["hovers"] = hovers.map((HoverInformation value) => value.toJson()).to List(); 669 result["hovers"] = hovers.map((HoverInformation value) => value.toJson()).to List();
670 return result; 670 return result;
671 } 671 }
672 672
673 Response toResponse(String id) { 673 Response toResponse(String id) {
674 return new Response(id, result: toJson()); 674 return new Response(id, result: toJson());
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 throw jsonDecoder.missingKey(jsonPath, "errors"); 1227 throw jsonDecoder.missingKey(jsonPath, "errors");
1228 } 1228 }
1229 return new AnalysisErrorsParams(file, errors); 1229 return new AnalysisErrorsParams(file, errors);
1230 } else { 1230 } else {
1231 throw jsonDecoder.mismatch(jsonPath, "analysis.errors params"); 1231 throw jsonDecoder.mismatch(jsonPath, "analysis.errors params");
1232 } 1232 }
1233 } 1233 }
1234 1234
1235 factory AnalysisErrorsParams.fromNotification(Notification notification) { 1235 factory AnalysisErrorsParams.fromNotification(Notification notification) {
1236 return new AnalysisErrorsParams.fromJson( 1236 return new AnalysisErrorsParams.fromJson(
1237 new ResponseDecoder(), "params", notification._params); 1237 new ResponseDecoder(null), "params", notification._params);
1238 } 1238 }
1239 1239
1240 Map<String, dynamic> toJson() { 1240 Map<String, dynamic> toJson() {
1241 Map<String, dynamic> result = {}; 1241 Map<String, dynamic> result = {};
1242 result["file"] = file; 1242 result["file"] = file;
1243 result["errors"] = errors.map((AnalysisError value) => value.toJson()).toLis t(); 1243 result["errors"] = errors.map((AnalysisError value) => value.toJson()).toLis t();
1244 return result; 1244 return result;
1245 } 1245 }
1246 1246
1247 Notification toNotification() { 1247 Notification toNotification() {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 throw jsonDecoder.missingKey(jsonPath, "files"); 1296 throw jsonDecoder.missingKey(jsonPath, "files");
1297 } 1297 }
1298 return new AnalysisFlushResultsParams(files); 1298 return new AnalysisFlushResultsParams(files);
1299 } else { 1299 } else {
1300 throw jsonDecoder.mismatch(jsonPath, "analysis.flushResults params"); 1300 throw jsonDecoder.mismatch(jsonPath, "analysis.flushResults params");
1301 } 1301 }
1302 } 1302 }
1303 1303
1304 factory AnalysisFlushResultsParams.fromNotification(Notification notification) { 1304 factory AnalysisFlushResultsParams.fromNotification(Notification notification) {
1305 return new AnalysisFlushResultsParams.fromJson( 1305 return new AnalysisFlushResultsParams.fromJson(
1306 new ResponseDecoder(), "params", notification._params); 1306 new ResponseDecoder(null), "params", notification._params);
1307 } 1307 }
1308 1308
1309 Map<String, dynamic> toJson() { 1309 Map<String, dynamic> toJson() {
1310 Map<String, dynamic> result = {}; 1310 Map<String, dynamic> result = {};
1311 result["files"] = files; 1311 result["files"] = files;
1312 return result; 1312 return result;
1313 } 1313 }
1314 1314
1315 Notification toNotification() { 1315 Notification toNotification() {
1316 return new Notification("analysis.flushResults", toJson()); 1316 return new Notification("analysis.flushResults", toJson());
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 throw jsonDecoder.missingKey(jsonPath, "regions"); 1374 throw jsonDecoder.missingKey(jsonPath, "regions");
1375 } 1375 }
1376 return new AnalysisFoldingParams(file, regions); 1376 return new AnalysisFoldingParams(file, regions);
1377 } else { 1377 } else {
1378 throw jsonDecoder.mismatch(jsonPath, "analysis.folding params"); 1378 throw jsonDecoder.mismatch(jsonPath, "analysis.folding params");
1379 } 1379 }
1380 } 1380 }
1381 1381
1382 factory AnalysisFoldingParams.fromNotification(Notification notification) { 1382 factory AnalysisFoldingParams.fromNotification(Notification notification) {
1383 return new AnalysisFoldingParams.fromJson( 1383 return new AnalysisFoldingParams.fromJson(
1384 new ResponseDecoder(), "params", notification._params); 1384 new ResponseDecoder(null), "params", notification._params);
1385 } 1385 }
1386 1386
1387 Map<String, dynamic> toJson() { 1387 Map<String, dynamic> toJson() {
1388 Map<String, dynamic> result = {}; 1388 Map<String, dynamic> result = {};
1389 result["file"] = file; 1389 result["file"] = file;
1390 result["regions"] = regions.map((FoldingRegion value) => value.toJson()).toL ist(); 1390 result["regions"] = regions.map((FoldingRegion value) => value.toJson()).toL ist();
1391 return result; 1391 return result;
1392 } 1392 }
1393 1393
1394 Notification toNotification() { 1394 Notification toNotification() {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 throw jsonDecoder.missingKey(jsonPath, "regions"); 1459 throw jsonDecoder.missingKey(jsonPath, "regions");
1460 } 1460 }
1461 return new AnalysisHighlightsParams(file, regions); 1461 return new AnalysisHighlightsParams(file, regions);
1462 } else { 1462 } else {
1463 throw jsonDecoder.mismatch(jsonPath, "analysis.highlights params"); 1463 throw jsonDecoder.mismatch(jsonPath, "analysis.highlights params");
1464 } 1464 }
1465 } 1465 }
1466 1466
1467 factory AnalysisHighlightsParams.fromNotification(Notification notification) { 1467 factory AnalysisHighlightsParams.fromNotification(Notification notification) {
1468 return new AnalysisHighlightsParams.fromJson( 1468 return new AnalysisHighlightsParams.fromJson(
1469 new ResponseDecoder(), "params", notification._params); 1469 new ResponseDecoder(null), "params", notification._params);
1470 } 1470 }
1471 1471
1472 Map<String, dynamic> toJson() { 1472 Map<String, dynamic> toJson() {
1473 Map<String, dynamic> result = {}; 1473 Map<String, dynamic> result = {};
1474 result["file"] = file; 1474 result["file"] = file;
1475 result["regions"] = regions.map((HighlightRegion value) => value.toJson()).t oList(); 1475 result["regions"] = regions.map((HighlightRegion value) => value.toJson()).t oList();
1476 return result; 1476 return result;
1477 } 1477 }
1478 1478
1479 Notification toNotification() { 1479 Notification toNotification() {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 throw jsonDecoder.missingKey(jsonPath, "regions"); 1545 throw jsonDecoder.missingKey(jsonPath, "regions");
1546 } 1546 }
1547 return new AnalysisNavigationParams(file, regions); 1547 return new AnalysisNavigationParams(file, regions);
1548 } else { 1548 } else {
1549 throw jsonDecoder.mismatch(jsonPath, "analysis.navigation params"); 1549 throw jsonDecoder.mismatch(jsonPath, "analysis.navigation params");
1550 } 1550 }
1551 } 1551 }
1552 1552
1553 factory AnalysisNavigationParams.fromNotification(Notification notification) { 1553 factory AnalysisNavigationParams.fromNotification(Notification notification) {
1554 return new AnalysisNavigationParams.fromJson( 1554 return new AnalysisNavigationParams.fromJson(
1555 new ResponseDecoder(), "params", notification._params); 1555 new ResponseDecoder(null), "params", notification._params);
1556 } 1556 }
1557 1557
1558 Map<String, dynamic> toJson() { 1558 Map<String, dynamic> toJson() {
1559 Map<String, dynamic> result = {}; 1559 Map<String, dynamic> result = {};
1560 result["file"] = file; 1560 result["file"] = file;
1561 result["regions"] = regions.map((NavigationRegion value) => value.toJson()). toList(); 1561 result["regions"] = regions.map((NavigationRegion value) => value.toJson()). toList();
1562 return result; 1562 return result;
1563 } 1563 }
1564 1564
1565 Notification toNotification() { 1565 Notification toNotification() {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 throw jsonDecoder.missingKey(jsonPath, "occurrences"); 1626 throw jsonDecoder.missingKey(jsonPath, "occurrences");
1627 } 1627 }
1628 return new AnalysisOccurrencesParams(file, occurrences); 1628 return new AnalysisOccurrencesParams(file, occurrences);
1629 } else { 1629 } else {
1630 throw jsonDecoder.mismatch(jsonPath, "analysis.occurrences params"); 1630 throw jsonDecoder.mismatch(jsonPath, "analysis.occurrences params");
1631 } 1631 }
1632 } 1632 }
1633 1633
1634 factory AnalysisOccurrencesParams.fromNotification(Notification notification) { 1634 factory AnalysisOccurrencesParams.fromNotification(Notification notification) {
1635 return new AnalysisOccurrencesParams.fromJson( 1635 return new AnalysisOccurrencesParams.fromJson(
1636 new ResponseDecoder(), "params", notification._params); 1636 new ResponseDecoder(null), "params", notification._params);
1637 } 1637 }
1638 1638
1639 Map<String, dynamic> toJson() { 1639 Map<String, dynamic> toJson() {
1640 Map<String, dynamic> result = {}; 1640 Map<String, dynamic> result = {};
1641 result["file"] = file; 1641 result["file"] = file;
1642 result["occurrences"] = occurrences.map((Occurrences value) => value.toJson( )).toList(); 1642 result["occurrences"] = occurrences.map((Occurrences value) => value.toJson( )).toList();
1643 return result; 1643 return result;
1644 } 1644 }
1645 1645
1646 Notification toNotification() { 1646 Notification toNotification() {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 throw jsonDecoder.missingKey(jsonPath, "outline"); 1707 throw jsonDecoder.missingKey(jsonPath, "outline");
1708 } 1708 }
1709 return new AnalysisOutlineParams(file, outline); 1709 return new AnalysisOutlineParams(file, outline);
1710 } else { 1710 } else {
1711 throw jsonDecoder.mismatch(jsonPath, "analysis.outline params"); 1711 throw jsonDecoder.mismatch(jsonPath, "analysis.outline params");
1712 } 1712 }
1713 } 1713 }
1714 1714
1715 factory AnalysisOutlineParams.fromNotification(Notification notification) { 1715 factory AnalysisOutlineParams.fromNotification(Notification notification) {
1716 return new AnalysisOutlineParams.fromJson( 1716 return new AnalysisOutlineParams.fromJson(
1717 new ResponseDecoder(), "params", notification._params); 1717 new ResponseDecoder(null), "params", notification._params);
1718 } 1718 }
1719 1719
1720 Map<String, dynamic> toJson() { 1720 Map<String, dynamic> toJson() {
1721 Map<String, dynamic> result = {}; 1721 Map<String, dynamic> result = {};
1722 result["file"] = file; 1722 result["file"] = file;
1723 result["outline"] = outline.toJson(); 1723 result["outline"] = outline.toJson();
1724 return result; 1724 return result;
1725 } 1725 }
1726 1726
1727 Notification toNotification() { 1727 Notification toNotification() {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 throw jsonDecoder.missingKey(jsonPath, "overrides"); 1788 throw jsonDecoder.missingKey(jsonPath, "overrides");
1789 } 1789 }
1790 return new AnalysisOverridesParams(file, overrides); 1790 return new AnalysisOverridesParams(file, overrides);
1791 } else { 1791 } else {
1792 throw jsonDecoder.mismatch(jsonPath, "analysis.overrides params"); 1792 throw jsonDecoder.mismatch(jsonPath, "analysis.overrides params");
1793 } 1793 }
1794 } 1794 }
1795 1795
1796 factory AnalysisOverridesParams.fromNotification(Notification notification) { 1796 factory AnalysisOverridesParams.fromNotification(Notification notification) {
1797 return new AnalysisOverridesParams.fromJson( 1797 return new AnalysisOverridesParams.fromJson(
1798 new ResponseDecoder(), "params", notification._params); 1798 new ResponseDecoder(null), "params", notification._params);
1799 } 1799 }
1800 1800
1801 Map<String, dynamic> toJson() { 1801 Map<String, dynamic> toJson() {
1802 Map<String, dynamic> result = {}; 1802 Map<String, dynamic> result = {};
1803 result["file"] = file; 1803 result["file"] = file;
1804 result["overrides"] = overrides.map((Override value) => value.toJson()).toLi st(); 1804 result["overrides"] = overrides.map((Override value) => value.toJson()).toLi st();
1805 return result; 1805 return result;
1806 } 1806 }
1807 1807
1808 Notification toNotification() { 1808 Notification toNotification() {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1938 throw jsonDecoder.missingKey(jsonPath, "id"); 1938 throw jsonDecoder.missingKey(jsonPath, "id");
1939 } 1939 }
1940 return new CompletionGetSuggestionsResult(id); 1940 return new CompletionGetSuggestionsResult(id);
1941 } else { 1941 } else {
1942 throw jsonDecoder.mismatch(jsonPath, "completion.getSuggestions result"); 1942 throw jsonDecoder.mismatch(jsonPath, "completion.getSuggestions result");
1943 } 1943 }
1944 } 1944 }
1945 1945
1946 factory CompletionGetSuggestionsResult.fromResponse(Response response) { 1946 factory CompletionGetSuggestionsResult.fromResponse(Response response) {
1947 return new CompletionGetSuggestionsResult.fromJson( 1947 return new CompletionGetSuggestionsResult.fromJson(
1948 new ResponseDecoder(), "result", response._result); 1948 new ResponseDecoder(response), "result", response._result);
1949 } 1949 }
1950 1950
1951 Map<String, dynamic> toJson() { 1951 Map<String, dynamic> toJson() {
1952 Map<String, dynamic> result = {}; 1952 Map<String, dynamic> result = {};
1953 result["id"] = id; 1953 result["id"] = id;
1954 return result; 1954 return result;
1955 } 1955 }
1956 1956
1957 Response toResponse(String id) { 1957 Response toResponse(String id) {
1958 return new Response(id, result: toJson()); 1958 return new Response(id, result: toJson());
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2062 throw jsonDecoder.missingKey(jsonPath, "isLast"); 2062 throw jsonDecoder.missingKey(jsonPath, "isLast");
2063 } 2063 }
2064 return new CompletionResultsParams(id, replacementOffset, replacementLengt h, results, isLast); 2064 return new CompletionResultsParams(id, replacementOffset, replacementLengt h, results, isLast);
2065 } else { 2065 } else {
2066 throw jsonDecoder.mismatch(jsonPath, "completion.results params"); 2066 throw jsonDecoder.mismatch(jsonPath, "completion.results params");
2067 } 2067 }
2068 } 2068 }
2069 2069
2070 factory CompletionResultsParams.fromNotification(Notification notification) { 2070 factory CompletionResultsParams.fromNotification(Notification notification) {
2071 return new CompletionResultsParams.fromJson( 2071 return new CompletionResultsParams.fromJson(
2072 new ResponseDecoder(), "params", notification._params); 2072 new ResponseDecoder(null), "params", notification._params);
2073 } 2073 }
2074 2074
2075 Map<String, dynamic> toJson() { 2075 Map<String, dynamic> toJson() {
2076 Map<String, dynamic> result = {}; 2076 Map<String, dynamic> result = {};
2077 result["id"] = id; 2077 result["id"] = id;
2078 result["replacementOffset"] = replacementOffset; 2078 result["replacementOffset"] = replacementOffset;
2079 result["replacementLength"] = replacementLength; 2079 result["replacementLength"] = replacementLength;
2080 result["results"] = results.map((CompletionSuggestion value) => value.toJson ()).toList(); 2080 result["results"] = results.map((CompletionSuggestion value) => value.toJson ()).toList();
2081 result["isLast"] = isLast; 2081 result["isLast"] = isLast;
2082 return result; 2082 return result;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2252 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[ "element"]); 2252 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[ "element"]);
2253 } 2253 }
2254 return new SearchFindElementReferencesResult(id: id, element: element); 2254 return new SearchFindElementReferencesResult(id: id, element: element);
2255 } else { 2255 } else {
2256 throw jsonDecoder.mismatch(jsonPath, "search.findElementReferences result" ); 2256 throw jsonDecoder.mismatch(jsonPath, "search.findElementReferences result" );
2257 } 2257 }
2258 } 2258 }
2259 2259
2260 factory SearchFindElementReferencesResult.fromResponse(Response response) { 2260 factory SearchFindElementReferencesResult.fromResponse(Response response) {
2261 return new SearchFindElementReferencesResult.fromJson( 2261 return new SearchFindElementReferencesResult.fromJson(
2262 new ResponseDecoder(), "result", response._result); 2262 new ResponseDecoder(response), "result", response._result);
2263 } 2263 }
2264 2264
2265 Map<String, dynamic> toJson() { 2265 Map<String, dynamic> toJson() {
2266 Map<String, dynamic> result = {}; 2266 Map<String, dynamic> result = {};
2267 if (id != null) { 2267 if (id != null) {
2268 result["id"] = id; 2268 result["id"] = id;
2269 } 2269 }
2270 if (element != null) { 2270 if (element != null) {
2271 result["element"] = element.toJson(); 2271 result["element"] = element.toJson();
2272 } 2272 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
2391 throw jsonDecoder.missingKey(jsonPath, "id"); 2391 throw jsonDecoder.missingKey(jsonPath, "id");
2392 } 2392 }
2393 return new SearchFindMemberDeclarationsResult(id); 2393 return new SearchFindMemberDeclarationsResult(id);
2394 } else { 2394 } else {
2395 throw jsonDecoder.mismatch(jsonPath, "search.findMemberDeclarations result "); 2395 throw jsonDecoder.mismatch(jsonPath, "search.findMemberDeclarations result ");
2396 } 2396 }
2397 } 2397 }
2398 2398
2399 factory SearchFindMemberDeclarationsResult.fromResponse(Response response) { 2399 factory SearchFindMemberDeclarationsResult.fromResponse(Response response) {
2400 return new SearchFindMemberDeclarationsResult.fromJson( 2400 return new SearchFindMemberDeclarationsResult.fromJson(
2401 new ResponseDecoder(), "result", response._result); 2401 new ResponseDecoder(response), "result", response._result);
2402 } 2402 }
2403 2403
2404 Map<String, dynamic> toJson() { 2404 Map<String, dynamic> toJson() {
2405 Map<String, dynamic> result = {}; 2405 Map<String, dynamic> result = {};
2406 result["id"] = id; 2406 result["id"] = id;
2407 return result; 2407 return result;
2408 } 2408 }
2409 2409
2410 Response toResponse(String id) { 2410 Response toResponse(String id) {
2411 return new Response(id, result: toJson()); 2411 return new Response(id, result: toJson());
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
2523 throw jsonDecoder.missingKey(jsonPath, "id"); 2523 throw jsonDecoder.missingKey(jsonPath, "id");
2524 } 2524 }
2525 return new SearchFindMemberReferencesResult(id); 2525 return new SearchFindMemberReferencesResult(id);
2526 } else { 2526 } else {
2527 throw jsonDecoder.mismatch(jsonPath, "search.findMemberReferences result") ; 2527 throw jsonDecoder.mismatch(jsonPath, "search.findMemberReferences result") ;
2528 } 2528 }
2529 } 2529 }
2530 2530
2531 factory SearchFindMemberReferencesResult.fromResponse(Response response) { 2531 factory SearchFindMemberReferencesResult.fromResponse(Response response) {
2532 return new SearchFindMemberReferencesResult.fromJson( 2532 return new SearchFindMemberReferencesResult.fromJson(
2533 new ResponseDecoder(), "result", response._result); 2533 new ResponseDecoder(response), "result", response._result);
2534 } 2534 }
2535 2535
2536 Map<String, dynamic> toJson() { 2536 Map<String, dynamic> toJson() {
2537 Map<String, dynamic> result = {}; 2537 Map<String, dynamic> result = {};
2538 result["id"] = id; 2538 result["id"] = id;
2539 return result; 2539 return result;
2540 } 2540 }
2541 2541
2542 Response toResponse(String id) { 2542 Response toResponse(String id) {
2543 return new Response(id, result: toJson()); 2543 return new Response(id, result: toJson());
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2656 throw jsonDecoder.missingKey(jsonPath, "id"); 2656 throw jsonDecoder.missingKey(jsonPath, "id");
2657 } 2657 }
2658 return new SearchFindTopLevelDeclarationsResult(id); 2658 return new SearchFindTopLevelDeclarationsResult(id);
2659 } else { 2659 } else {
2660 throw jsonDecoder.mismatch(jsonPath, "search.findTopLevelDeclarations resu lt"); 2660 throw jsonDecoder.mismatch(jsonPath, "search.findTopLevelDeclarations resu lt");
2661 } 2661 }
2662 } 2662 }
2663 2663
2664 factory SearchFindTopLevelDeclarationsResult.fromResponse(Response response) { 2664 factory SearchFindTopLevelDeclarationsResult.fromResponse(Response response) {
2665 return new SearchFindTopLevelDeclarationsResult.fromJson( 2665 return new SearchFindTopLevelDeclarationsResult.fromJson(
2666 new ResponseDecoder(), "result", response._result); 2666 new ResponseDecoder(response), "result", response._result);
2667 } 2667 }
2668 2668
2669 Map<String, dynamic> toJson() { 2669 Map<String, dynamic> toJson() {
2670 Map<String, dynamic> result = {}; 2670 Map<String, dynamic> result = {};
2671 result["id"] = id; 2671 result["id"] = id;
2672 return result; 2672 return result;
2673 } 2673 }
2674 2674
2675 Response toResponse(String id) { 2675 Response toResponse(String id) {
2676 return new Response(id, result: toJson()); 2676 return new Response(id, result: toJson());
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 hierarchyItems = <TypeHierarchyItem>[]; 2816 hierarchyItems = <TypeHierarchyItem>[];
2817 } 2817 }
2818 return new SearchGetTypeHierarchyResult(hierarchyItems: hierarchyItems); 2818 return new SearchGetTypeHierarchyResult(hierarchyItems: hierarchyItems);
2819 } else { 2819 } else {
2820 throw jsonDecoder.mismatch(jsonPath, "search.getTypeHierarchy result"); 2820 throw jsonDecoder.mismatch(jsonPath, "search.getTypeHierarchy result");
2821 } 2821 }
2822 } 2822 }
2823 2823
2824 factory SearchGetTypeHierarchyResult.fromResponse(Response response) { 2824 factory SearchGetTypeHierarchyResult.fromResponse(Response response) {
2825 return new SearchGetTypeHierarchyResult.fromJson( 2825 return new SearchGetTypeHierarchyResult.fromJson(
2826 new ResponseDecoder(), "result", response._result); 2826 new ResponseDecoder(response), "result", response._result);
2827 } 2827 }
2828 2828
2829 Map<String, dynamic> toJson() { 2829 Map<String, dynamic> toJson() {
2830 Map<String, dynamic> result = {}; 2830 Map<String, dynamic> result = {};
2831 if (hierarchyItems.isNotEmpty) { 2831 if (hierarchyItems.isNotEmpty) {
2832 result["hierarchyItems"] = hierarchyItems.map((TypeHierarchyItem value) => value.toJson()).toList(); 2832 result["hierarchyItems"] = hierarchyItems.map((TypeHierarchyItem value) => value.toJson()).toList();
2833 } 2833 }
2834 return result; 2834 return result;
2835 } 2835 }
2836 2836
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
2909 throw jsonDecoder.missingKey(jsonPath, "isLast"); 2909 throw jsonDecoder.missingKey(jsonPath, "isLast");
2910 } 2910 }
2911 return new SearchResultsParams(id, results, isLast); 2911 return new SearchResultsParams(id, results, isLast);
2912 } else { 2912 } else {
2913 throw jsonDecoder.mismatch(jsonPath, "search.results params"); 2913 throw jsonDecoder.mismatch(jsonPath, "search.results params");
2914 } 2914 }
2915 } 2915 }
2916 2916
2917 factory SearchResultsParams.fromNotification(Notification notification) { 2917 factory SearchResultsParams.fromNotification(Notification notification) {
2918 return new SearchResultsParams.fromJson( 2918 return new SearchResultsParams.fromJson(
2919 new ResponseDecoder(), "params", notification._params); 2919 new ResponseDecoder(null), "params", notification._params);
2920 } 2920 }
2921 2921
2922 Map<String, dynamic> toJson() { 2922 Map<String, dynamic> toJson() {
2923 Map<String, dynamic> result = {}; 2923 Map<String, dynamic> result = {};
2924 result["id"] = id; 2924 result["id"] = id;
2925 result["results"] = results.map((SearchResult value) => value.toJson()).toLi st(); 2925 result["results"] = results.map((SearchResult value) => value.toJson()).toLi st();
2926 result["isLast"] = isLast; 2926 result["isLast"] = isLast;
2927 return result; 2927 return result;
2928 } 2928 }
2929 2929
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
3077 throw jsonDecoder.missingKey(jsonPath, "assists"); 3077 throw jsonDecoder.missingKey(jsonPath, "assists");
3078 } 3078 }
3079 return new EditGetAssistsResult(assists); 3079 return new EditGetAssistsResult(assists);
3080 } else { 3080 } else {
3081 throw jsonDecoder.mismatch(jsonPath, "edit.getAssists result"); 3081 throw jsonDecoder.mismatch(jsonPath, "edit.getAssists result");
3082 } 3082 }
3083 } 3083 }
3084 3084
3085 factory EditGetAssistsResult.fromResponse(Response response) { 3085 factory EditGetAssistsResult.fromResponse(Response response) {
3086 return new EditGetAssistsResult.fromJson( 3086 return new EditGetAssistsResult.fromJson(
3087 new ResponseDecoder(), "result", response._result); 3087 new ResponseDecoder(response), "result", response._result);
3088 } 3088 }
3089 3089
3090 Map<String, dynamic> toJson() { 3090 Map<String, dynamic> toJson() {
3091 Map<String, dynamic> result = {}; 3091 Map<String, dynamic> result = {};
3092 result["assists"] = assists.map((SourceChange value) => value.toJson()).toLi st(); 3092 result["assists"] = assists.map((SourceChange value) => value.toJson()).toLi st();
3093 return result; 3093 return result;
3094 } 3094 }
3095 3095
3096 Response toResponse(String id) { 3096 Response toResponse(String id) {
3097 return new Response(id, result: toJson()); 3097 return new Response(id, result: toJson());
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
3239 throw jsonDecoder.missingKey(jsonPath, "kinds"); 3239 throw jsonDecoder.missingKey(jsonPath, "kinds");
3240 } 3240 }
3241 return new EditGetAvailableRefactoringsResult(kinds); 3241 return new EditGetAvailableRefactoringsResult(kinds);
3242 } else { 3242 } else {
3243 throw jsonDecoder.mismatch(jsonPath, "edit.getAvailableRefactorings result "); 3243 throw jsonDecoder.mismatch(jsonPath, "edit.getAvailableRefactorings result ");
3244 } 3244 }
3245 } 3245 }
3246 3246
3247 factory EditGetAvailableRefactoringsResult.fromResponse(Response response) { 3247 factory EditGetAvailableRefactoringsResult.fromResponse(Response response) {
3248 return new EditGetAvailableRefactoringsResult.fromJson( 3248 return new EditGetAvailableRefactoringsResult.fromJson(
3249 new ResponseDecoder(), "result", response._result); 3249 new ResponseDecoder(response), "result", response._result);
3250 } 3250 }
3251 3251
3252 Map<String, dynamic> toJson() { 3252 Map<String, dynamic> toJson() {
3253 Map<String, dynamic> result = {}; 3253 Map<String, dynamic> result = {};
3254 result["kinds"] = kinds.map((RefactoringKind value) => value.toJson()).toLis t(); 3254 result["kinds"] = kinds.map((RefactoringKind value) => value.toJson()).toLis t();
3255 return result; 3255 return result;
3256 } 3256 }
3257 3257
3258 Response toResponse(String id) { 3258 Response toResponse(String id) {
3259 return new Response(id, result: toJson()); 3259 return new Response(id, result: toJson());
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
3391 throw jsonDecoder.missingKey(jsonPath, "fixes"); 3391 throw jsonDecoder.missingKey(jsonPath, "fixes");
3392 } 3392 }
3393 return new EditGetFixesResult(fixes); 3393 return new EditGetFixesResult(fixes);
3394 } else { 3394 } else {
3395 throw jsonDecoder.mismatch(jsonPath, "edit.getFixes result"); 3395 throw jsonDecoder.mismatch(jsonPath, "edit.getFixes result");
3396 } 3396 }
3397 } 3397 }
3398 3398
3399 factory EditGetFixesResult.fromResponse(Response response) { 3399 factory EditGetFixesResult.fromResponse(Response response) {
3400 return new EditGetFixesResult.fromJson( 3400 return new EditGetFixesResult.fromJson(
3401 new ResponseDecoder(), "result", response._result); 3401 new ResponseDecoder(response), "result", response._result);
3402 } 3402 }
3403 3403
3404 Map<String, dynamic> toJson() { 3404 Map<String, dynamic> toJson() {
3405 Map<String, dynamic> result = {}; 3405 Map<String, dynamic> result = {};
3406 result["fixes"] = fixes.map((AnalysisErrorFixes value) => value.toJson()).to List(); 3406 result["fixes"] = fixes.map((AnalysisErrorFixes value) => value.toJson()).to List();
3407 return result; 3407 return result;
3408 } 3408 }
3409 3409
3410 Response toResponse(String id) { 3410 Response toResponse(String id) {
3411 return new Response(id, result: toJson()); 3411 return new Response(id, result: toJson());
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
3519 if (json.containsKey("options")) { 3519 if (json.containsKey("options")) {
3520 options = new RefactoringOptions.fromJson(jsonDecoder, jsonPath + ".opti ons", json["options"], kind); 3520 options = new RefactoringOptions.fromJson(jsonDecoder, jsonPath + ".opti ons", json["options"], kind);
3521 } 3521 }
3522 return new EditGetRefactoringParams(kind, file, offset, length, validateOn ly, options: options); 3522 return new EditGetRefactoringParams(kind, file, offset, length, validateOn ly, options: options);
3523 } else { 3523 } else {
3524 throw jsonDecoder.mismatch(jsonPath, "edit.getRefactoring params"); 3524 throw jsonDecoder.mismatch(jsonPath, "edit.getRefactoring params");
3525 } 3525 }
3526 } 3526 }
3527 3527
3528 factory EditGetRefactoringParams.fromRequest(Request request) { 3528 factory EditGetRefactoringParams.fromRequest(Request request) {
3529 return new EditGetRefactoringParams.fromJson( 3529 var params = new EditGetRefactoringParams.fromJson(
3530 new RequestDecoder(request), "params", request._params); 3530 new RequestDecoder(request), "params", request._params);
3531 REQUEST_ID_REFACTORING_KINDS[request.id] = params.kind;
3532 return params;
3531 } 3533 }
3532 3534
3533 Map<String, dynamic> toJson() { 3535 Map<String, dynamic> toJson() {
3534 Map<String, dynamic> result = {}; 3536 Map<String, dynamic> result = {};
3535 result["kind"] = kind.toJson(); 3537 result["kind"] = kind.toJson();
3536 result["file"] = file; 3538 result["file"] = file;
3537 result["offset"] = offset; 3539 result["offset"] = offset;
3538 result["length"] = length; 3540 result["length"] = length;
3539 result["validateOnly"] = validateOnly; 3541 result["validateOnly"] = validateOnly;
3540 if (options != null) { 3542 if (options != null) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
3574 hash = _JenkinsSmiHash.combine(hash, options.hashCode); 3576 hash = _JenkinsSmiHash.combine(hash, options.hashCode);
3575 return _JenkinsSmiHash.finish(hash); 3577 return _JenkinsSmiHash.finish(hash);
3576 } 3578 }
3577 } 3579 }
3578 3580
3579 /** 3581 /**
3580 * edit.getRefactoring result 3582 * edit.getRefactoring result
3581 * 3583 *
3582 * { 3584 * {
3583 * "problems": List<RefactoringProblem> 3585 * "problems": List<RefactoringProblem>
3584 * "feedback": optional object 3586 * "feedback": optional RefactoringFeedback
3585 * "change": optional SourceChange 3587 * "change": optional SourceChange
3586 * "potentialEdits": optional List<String> 3588 * "potentialEdits": optional List<String>
3587 * } 3589 * }
3588 */ 3590 */
3589 class EditGetRefactoringResult implements HasToJson { 3591 class EditGetRefactoringResult implements HasToJson {
3590 /** 3592 /**
3591 * The status of the refactoring. The array will be empty if there are no 3593 * The status of the refactoring. The array will be empty if there are no
3592 * known problems. 3594 * known problems.
3593 */ 3595 */
3594 List<RefactoringProblem> problems; 3596 List<RefactoringProblem> problems;
3595 3597
3596 /** 3598 /**
3597 * Data used to provide feedback to the user. The structure of the data is 3599 * Data used to provide feedback to the user. The structure of the data is
3598 * dependent on the kind of refactoring being created. The data that is 3600 * dependent on the kind of refactoring being created. The data that is
3599 * returned is documented in the section titled Refactorings, labeled as 3601 * returned is documented in the section titled Refactorings, labeled as
3600 * “Feedback”. 3602 * “Feedback”.
3601 */ 3603 */
3602 Map feedback; 3604 RefactoringFeedback feedback;
3603 3605
3604 /** 3606 /**
3605 * The changes that are to be applied to affect the refactoring. This field 3607 * The changes that are to be applied to affect the refactoring. This field
3606 * will be omitted if there are problems that prevent a set of changes from 3608 * will be omitted if there are problems that prevent a set of changes from
3607 * being computed, such as having no options specified for a refactoring that 3609 * being computed, such as having no options specified for a refactoring that
3608 * requires them, or if only validation was requested. 3610 * requires them, or if only validation was requested.
3609 */ 3611 */
3610 SourceChange change; 3612 SourceChange change;
3611 3613
3612 /** 3614 /**
(...skipping 16 matching lines...) Expand all
3629 if (json == null) { 3631 if (json == null) {
3630 json = {}; 3632 json = {};
3631 } 3633 }
3632 if (json is Map) { 3634 if (json is Map) {
3633 List<RefactoringProblem> problems; 3635 List<RefactoringProblem> problems;
3634 if (json.containsKey("problems")) { 3636 if (json.containsKey("problems")) {
3635 problems = jsonDecoder._decodeList(jsonPath + ".problems", json["problem s"], (String jsonPath, Object json) => new RefactoringProblem.fromJson(jsonDecod er, jsonPath, json)); 3637 problems = jsonDecoder._decodeList(jsonPath + ".problems", json["problem s"], (String jsonPath, Object json) => new RefactoringProblem.fromJson(jsonDecod er, jsonPath, json));
3636 } else { 3638 } else {
3637 throw jsonDecoder.missingKey(jsonPath, "problems"); 3639 throw jsonDecoder.missingKey(jsonPath, "problems");
3638 } 3640 }
3639 Map feedback; 3641 RefactoringFeedback feedback;
3640 if (json.containsKey("feedback")) { 3642 if (json.containsKey("feedback")) {
3641 feedback = json["feedback"]; 3643 feedback = new RefactoringFeedback.fromJson(jsonDecoder, jsonPath + ".fe edback", json["feedback"], json);
3642 } 3644 }
3643 SourceChange change; 3645 SourceChange change;
3644 if (json.containsKey("change")) { 3646 if (json.containsKey("change")) {
3645 change = new SourceChange.fromJson(jsonDecoder, jsonPath + ".change", js on["change"]); 3647 change = new SourceChange.fromJson(jsonDecoder, jsonPath + ".change", js on["change"]);
3646 } 3648 }
3647 List<String> potentialEdits; 3649 List<String> potentialEdits;
3648 if (json.containsKey("potentialEdits")) { 3650 if (json.containsKey("potentialEdits")) {
3649 potentialEdits = jsonDecoder._decodeList(jsonPath + ".potentialEdits", j son["potentialEdits"], jsonDecoder._decodeString); 3651 potentialEdits = jsonDecoder._decodeList(jsonPath + ".potentialEdits", j son["potentialEdits"], jsonDecoder._decodeString);
3650 } else { 3652 } else {
3651 potentialEdits = <String>[]; 3653 potentialEdits = <String>[];
3652 } 3654 }
3653 return new EditGetRefactoringResult(problems, feedback: feedback, change: change, potentialEdits: potentialEdits); 3655 return new EditGetRefactoringResult(problems, feedback: feedback, change: change, potentialEdits: potentialEdits);
3654 } else { 3656 } else {
3655 throw jsonDecoder.mismatch(jsonPath, "edit.getRefactoring result"); 3657 throw jsonDecoder.mismatch(jsonPath, "edit.getRefactoring result");
3656 } 3658 }
3657 } 3659 }
3658 3660
3659 factory EditGetRefactoringResult.fromResponse(Response response) { 3661 factory EditGetRefactoringResult.fromResponse(Response response) {
3660 return new EditGetRefactoringResult.fromJson( 3662 return new EditGetRefactoringResult.fromJson(
3661 new ResponseDecoder(), "result", response._result); 3663 new ResponseDecoder(response), "result", response._result);
3662 } 3664 }
3663 3665
3664 Map<String, dynamic> toJson() { 3666 Map<String, dynamic> toJson() {
3665 Map<String, dynamic> result = {}; 3667 Map<String, dynamic> result = {};
3666 result["problems"] = problems.map((RefactoringProblem value) => value.toJson ()).toList(); 3668 result["problems"] = problems.map((RefactoringProblem value) => value.toJson ()).toList();
3667 if (feedback != null) { 3669 if (feedback != null) {
3668 result["feedback"] = feedback; 3670 result["feedback"] = feedback.toJson();
3669 } 3671 }
3670 if (change != null) { 3672 if (change != null) {
3671 result["change"] = change.toJson(); 3673 result["change"] = change.toJson();
3672 } 3674 }
3673 if (potentialEdits.isNotEmpty) { 3675 if (potentialEdits.isNotEmpty) {
3674 result["potentialEdits"] = potentialEdits; 3676 result["potentialEdits"] = potentialEdits;
3675 } 3677 }
3676 return result; 3678 return result;
3677 } 3679 }
3678 3680
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
3798 throw jsonDecoder.missingKey(jsonPath, "id"); 3800 throw jsonDecoder.missingKey(jsonPath, "id");
3799 } 3801 }
3800 return new DebugCreateContextResult(id); 3802 return new DebugCreateContextResult(id);
3801 } else { 3803 } else {
3802 throw jsonDecoder.mismatch(jsonPath, "debug.createContext result"); 3804 throw jsonDecoder.mismatch(jsonPath, "debug.createContext result");
3803 } 3805 }
3804 } 3806 }
3805 3807
3806 factory DebugCreateContextResult.fromResponse(Response response) { 3808 factory DebugCreateContextResult.fromResponse(Response response) {
3807 return new DebugCreateContextResult.fromJson( 3809 return new DebugCreateContextResult.fromJson(
3808 new ResponseDecoder(), "result", response._result); 3810 new ResponseDecoder(response), "result", response._result);
3809 } 3811 }
3810 3812
3811 Map<String, dynamic> toJson() { 3813 Map<String, dynamic> toJson() {
3812 Map<String, dynamic> result = {}; 3814 Map<String, dynamic> result = {};
3813 result["id"] = id; 3815 result["id"] = id;
3814 return result; 3816 return result;
3815 } 3817 }
3816 3818
3817 Response toResponse(String id) { 3819 Response toResponse(String id) {
3818 return new Response(id, result: toJson()); 3820 return new Response(id, result: toJson());
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
4057 uri = jsonDecoder._decodeString(jsonPath + ".uri", json["uri"]); 4059 uri = jsonDecoder._decodeString(jsonPath + ".uri", json["uri"]);
4058 } 4060 }
4059 return new DebugMapUriResult(file: file, uri: uri); 4061 return new DebugMapUriResult(file: file, uri: uri);
4060 } else { 4062 } else {
4061 throw jsonDecoder.mismatch(jsonPath, "debug.mapUri result"); 4063 throw jsonDecoder.mismatch(jsonPath, "debug.mapUri result");
4062 } 4064 }
4063 } 4065 }
4064 4066
4065 factory DebugMapUriResult.fromResponse(Response response) { 4067 factory DebugMapUriResult.fromResponse(Response response) {
4066 return new DebugMapUriResult.fromJson( 4068 return new DebugMapUriResult.fromJson(
4067 new ResponseDecoder(), "result", response._result); 4069 new ResponseDecoder(response), "result", response._result);
4068 } 4070 }
4069 4071
4070 Map<String, dynamic> toJson() { 4072 Map<String, dynamic> toJson() {
4071 Map<String, dynamic> result = {}; 4073 Map<String, dynamic> result = {};
4072 if (file != null) { 4074 if (file != null) {
4073 result["file"] = file; 4075 result["file"] = file;
4074 } 4076 }
4075 if (uri != null) { 4077 if (uri != null) {
4076 result["uri"] = uri; 4078 result["uri"] = uri;
4077 } 4079 }
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
4244 throw jsonDecoder.missingKey(jsonPath, "htmlToDart"); 4246 throw jsonDecoder.missingKey(jsonPath, "htmlToDart");
4245 } 4247 }
4246 return new DebugLaunchDataParams(executables, dartToHtml, htmlToDart); 4248 return new DebugLaunchDataParams(executables, dartToHtml, htmlToDart);
4247 } else { 4249 } else {
4248 throw jsonDecoder.mismatch(jsonPath, "debug.launchData params"); 4250 throw jsonDecoder.mismatch(jsonPath, "debug.launchData params");
4249 } 4251 }
4250 } 4252 }
4251 4253
4252 factory DebugLaunchDataParams.fromNotification(Notification notification) { 4254 factory DebugLaunchDataParams.fromNotification(Notification notification) {
4253 return new DebugLaunchDataParams.fromJson( 4255 return new DebugLaunchDataParams.fromJson(
4254 new ResponseDecoder(), "params", notification._params); 4256 new ResponseDecoder(null), "params", notification._params);
4255 } 4257 }
4256 4258
4257 Map<String, dynamic> toJson() { 4259 Map<String, dynamic> toJson() {
4258 Map<String, dynamic> result = {}; 4260 Map<String, dynamic> result = {};
4259 result["executables"] = executables.map((ExecutableFile value) => value.toJs on()).toList(); 4261 result["executables"] = executables.map((ExecutableFile value) => value.toJs on()).toList();
4260 result["dartToHtml"] = dartToHtml; 4262 result["dartToHtml"] = dartToHtml;
4261 result["htmlToDart"] = htmlToDart; 4263 result["htmlToDart"] = htmlToDart;
4262 return result; 4264 return result;
4263 } 4265 }
4264 4266
(...skipping 3479 matching lines...) Expand 10 before | Expand all | Expand 10 after
7744 hash = _JenkinsSmiHash.combine(hash, id.hashCode); 7746 hash = _JenkinsSmiHash.combine(hash, id.hashCode);
7745 hash = _JenkinsSmiHash.combine(hash, kind.hashCode); 7747 hash = _JenkinsSmiHash.combine(hash, kind.hashCode);
7746 hash = _JenkinsSmiHash.combine(hash, type.hashCode); 7748 hash = _JenkinsSmiHash.combine(hash, type.hashCode);
7747 hash = _JenkinsSmiHash.combine(hash, name.hashCode); 7749 hash = _JenkinsSmiHash.combine(hash, name.hashCode);
7748 hash = _JenkinsSmiHash.combine(hash, parameters.hashCode); 7750 hash = _JenkinsSmiHash.combine(hash, parameters.hashCode);
7749 return _JenkinsSmiHash.finish(hash); 7751 return _JenkinsSmiHash.finish(hash);
7750 } 7752 }
7751 } 7753 }
7752 7754
7753 /** 7755 /**
7756 * RefactoringFeedback
7757 *
7758 * {
7759 * }
7760 */
7761 class RefactoringFeedback implements HasToJson {
7762 RefactoringFeedback();
7763
7764 factory RefactoringFeedback.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json, Map responseJson) {
7765 return _refactoringFeedbackFromJson(jsonDecoder, jsonPath, json, responseJso n);
7766 }
7767
7768 Map<String, dynamic> toJson() {
7769 Map<String, dynamic> result = {};
7770 return result;
7771 }
7772
7773 @override
7774 String toString() => JSON.encode(toJson());
7775
7776 @override
7777 bool operator==(other) {
7778 if (other is RefactoringFeedback) {
7779 return true;
7780 }
7781 return false;
7782 }
7783
7784 @override
7785 int get hashCode {
7786 int hash = 0;
7787 return _JenkinsSmiHash.finish(hash);
7788 }
7789 }
7790
7791 /**
7754 * RefactoringOptions 7792 * RefactoringOptions
7755 * 7793 *
7756 * { 7794 * {
7757 * } 7795 * }
7758 */ 7796 */
7759 class RefactoringOptions implements HasToJson { 7797 class RefactoringOptions implements HasToJson {
7760 RefactoringOptions(); 7798 RefactoringOptions();
7761 7799
7762 factory RefactoringOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json, RefactoringKind kind) { 7800 factory RefactoringOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json, RefactoringKind kind) {
7763 return _refactoringOptionsFromJson(jsonDecoder, jsonPath, json, kind); 7801 return _refactoringOptionsFromJson(jsonDecoder, jsonPath, json, kind);
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after
9068 9106
9069 /** 9107 /**
9070 * extractLocalVariable feedback 9108 * extractLocalVariable feedback
9071 * 9109 *
9072 * { 9110 * {
9073 * "names": List<String> 9111 * "names": List<String>
9074 * "offsets": List<int> 9112 * "offsets": List<int>
9075 * "lengths": List<int> 9113 * "lengths": List<int>
9076 * } 9114 * }
9077 */ 9115 */
9078 class ExtractLocalVariableFeedback implements HasToJson { 9116 class ExtractLocalVariableFeedback extends RefactoringFeedback implements HasToJ son {
9079 /** 9117 /**
9080 * The proposed names for the local variable. 9118 * The proposed names for the local variable.
9081 */ 9119 */
9082 List<String> names; 9120 List<String> names;
9083 9121
9084 /** 9122 /**
9085 * The offsets of the expressions that would be replaced by a reference to 9123 * The offsets of the expressions that would be replaced by a reference to
9086 * the variable. 9124 * the variable.
9087 */ 9125 */
9088 List<int> offsets; 9126 List<int> offsets;
(...skipping 30 matching lines...) Expand all
9119 lengths = jsonDecoder._decodeList(jsonPath + ".lengths", json["lengths"] , jsonDecoder._decodeInt); 9157 lengths = jsonDecoder._decodeList(jsonPath + ".lengths", json["lengths"] , jsonDecoder._decodeInt);
9120 } else { 9158 } else {
9121 throw jsonDecoder.missingKey(jsonPath, "lengths"); 9159 throw jsonDecoder.missingKey(jsonPath, "lengths");
9122 } 9160 }
9123 return new ExtractLocalVariableFeedback(names, offsets, lengths); 9161 return new ExtractLocalVariableFeedback(names, offsets, lengths);
9124 } else { 9162 } else {
9125 throw jsonDecoder.mismatch(jsonPath, "extractLocalVariable feedback"); 9163 throw jsonDecoder.mismatch(jsonPath, "extractLocalVariable feedback");
9126 } 9164 }
9127 } 9165 }
9128 9166
9129 factory ExtractLocalVariableFeedback.fromRefactoringResult(EditGetRefactoringR esult refactoringResult) {
9130 return new ExtractLocalVariableFeedback.fromJson(
9131 new ResponseDecoder(), "feedback", refactoringResult.feedback);
9132 }
9133
9134 Map<String, dynamic> toJson() { 9167 Map<String, dynamic> toJson() {
9135 Map<String, dynamic> result = {}; 9168 Map<String, dynamic> result = {};
9136 result["names"] = names; 9169 result["names"] = names;
9137 result["offsets"] = offsets; 9170 result["offsets"] = offsets;
9138 result["lengths"] = lengths; 9171 result["lengths"] = lengths;
9139 return result; 9172 return result;
9140 } 9173 }
9141 9174
9142 @override 9175 @override
9143 String toString() => JSON.encode(toJson()); 9176 String toString() => JSON.encode(toJson());
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
9249 * "offset": int 9282 * "offset": int
9250 * "length": int 9283 * "length": int
9251 * "returnType": String 9284 * "returnType": String
9252 * "names": List<String> 9285 * "names": List<String>
9253 * "canCreateGetter": bool 9286 * "canCreateGetter": bool
9254 * "parameters": List<RefactoringMethodParameter> 9287 * "parameters": List<RefactoringMethodParameter>
9255 * "offsets": List<int> 9288 * "offsets": List<int>
9256 * "lengths": List<int> 9289 * "lengths": List<int>
9257 * } 9290 * }
9258 */ 9291 */
9259 class ExtractMethodFeedback implements HasToJson { 9292 class ExtractMethodFeedback extends RefactoringFeedback implements HasToJson {
9260 /** 9293 /**
9261 * The offset to the beginning of the expression or statements that will be 9294 * The offset to the beginning of the expression or statements that will be
9262 * extracted. 9295 * extracted.
9263 */ 9296 */
9264 int offset; 9297 int offset;
9265 9298
9266 /** 9299 /**
9267 * The length of the expression or statements that will be extracted. 9300 * The length of the expression or statements that will be extracted.
9268 */ 9301 */
9269 int length; 9302 int length;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
9357 lengths = jsonDecoder._decodeList(jsonPath + ".lengths", json["lengths"] , jsonDecoder._decodeInt); 9390 lengths = jsonDecoder._decodeList(jsonPath + ".lengths", json["lengths"] , jsonDecoder._decodeInt);
9358 } else { 9391 } else {
9359 throw jsonDecoder.missingKey(jsonPath, "lengths"); 9392 throw jsonDecoder.missingKey(jsonPath, "lengths");
9360 } 9393 }
9361 return new ExtractMethodFeedback(offset, length, returnType, names, canCre ateGetter, parameters, offsets, lengths); 9394 return new ExtractMethodFeedback(offset, length, returnType, names, canCre ateGetter, parameters, offsets, lengths);
9362 } else { 9395 } else {
9363 throw jsonDecoder.mismatch(jsonPath, "extractMethod feedback"); 9396 throw jsonDecoder.mismatch(jsonPath, "extractMethod feedback");
9364 } 9397 }
9365 } 9398 }
9366 9399
9367 factory ExtractMethodFeedback.fromRefactoringResult(EditGetRefactoringResult r efactoringResult) {
9368 return new ExtractMethodFeedback.fromJson(
9369 new ResponseDecoder(), "feedback", refactoringResult.feedback);
9370 }
9371
9372 Map<String, dynamic> toJson() { 9400 Map<String, dynamic> toJson() {
9373 Map<String, dynamic> result = {}; 9401 Map<String, dynamic> result = {};
9374 result["offset"] = offset; 9402 result["offset"] = offset;
9375 result["length"] = length; 9403 result["length"] = length;
9376 result["returnType"] = returnType; 9404 result["returnType"] = returnType;
9377 result["names"] = names; 9405 result["names"] = names;
9378 result["canCreateGetter"] = canCreateGetter; 9406 result["canCreateGetter"] = canCreateGetter;
9379 result["parameters"] = parameters.map((RefactoringMethodParameter value) => value.toJson()).toList(); 9407 result["parameters"] = parameters.map((RefactoringMethodParameter value) => value.toJson()).toList();
9380 result["offsets"] = offsets; 9408 result["offsets"] = offsets;
9381 result["lengths"] = lengths; 9409 result["lengths"] = lengths;
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
9680 } 9708 }
9681 9709
9682 /** 9710 /**
9683 * rename feedback 9711 * rename feedback
9684 * 9712 *
9685 * { 9713 * {
9686 * "offset": int 9714 * "offset": int
9687 * "length": int 9715 * "length": int
9688 * } 9716 * }
9689 */ 9717 */
9690 class RenameFeedback implements HasToJson { 9718 class RenameFeedback extends RefactoringFeedback implements HasToJson {
9691 /** 9719 /**
9692 * The offset to the beginning of the name selected to be renamed. 9720 * The offset to the beginning of the name selected to be renamed.
9693 */ 9721 */
9694 int offset; 9722 int offset;
9695 9723
9696 /** 9724 /**
9697 * The length of the name selected to be renamed. 9725 * The length of the name selected to be renamed.
9698 */ 9726 */
9699 int length; 9727 int length;
9700 9728
(...skipping 15 matching lines...) Expand all
9716 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); 9744 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
9717 } else { 9745 } else {
9718 throw jsonDecoder.missingKey(jsonPath, "length"); 9746 throw jsonDecoder.missingKey(jsonPath, "length");
9719 } 9747 }
9720 return new RenameFeedback(offset, length); 9748 return new RenameFeedback(offset, length);
9721 } else { 9749 } else {
9722 throw jsonDecoder.mismatch(jsonPath, "rename feedback"); 9750 throw jsonDecoder.mismatch(jsonPath, "rename feedback");
9723 } 9751 }
9724 } 9752 }
9725 9753
9726 factory RenameFeedback.fromRefactoringResult(EditGetRefactoringResult refactor ingResult) {
9727 return new RenameFeedback.fromJson(
9728 new ResponseDecoder(), "feedback", refactoringResult.feedback);
9729 }
9730
9731 Map<String, dynamic> toJson() { 9754 Map<String, dynamic> toJson() {
9732 Map<String, dynamic> result = {}; 9755 Map<String, dynamic> result = {};
9733 result["offset"] = offset; 9756 result["offset"] = offset;
9734 result["length"] = length; 9757 result["length"] = length;
9735 return result; 9758 return result;
9736 } 9759 }
9737 9760
9738 @override 9761 @override
9739 String toString() => JSON.encode(toJson()); 9762 String toString() => JSON.encode(toJson());
9740 9763
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
9810 return false; 9833 return false;
9811 } 9834 }
9812 9835
9813 @override 9836 @override
9814 int get hashCode { 9837 int get hashCode {
9815 int hash = 0; 9838 int hash = 0;
9816 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); 9839 hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
9817 return _JenkinsSmiHash.finish(hash); 9840 return _JenkinsSmiHash.finish(hash);
9818 } 9841 }
9819 } 9842 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/edit/edit_domain.dart ('k') | pkg/analysis_server/lib/src/protocol.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698