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

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

Issue 769963003: Add paging support (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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/tool/spec/generate_files". 7 // "pkg/analysis_server/tool/spec/generate_files".
8 8
9 part of protocol; 9 part of protocol;
10 /** 10 /**
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 return false; 685 return false;
686 } 686 }
687 687
688 @override 688 @override
689 int get hashCode { 689 int get hashCode {
690 int hash = 0; 690 int hash = 0;
691 hash = _JenkinsSmiHash.combine(hash, hovers.hashCode); 691 hash = _JenkinsSmiHash.combine(hash, hovers.hashCode);
692 return _JenkinsSmiHash.finish(hash); 692 return _JenkinsSmiHash.finish(hash);
693 } 693 }
694 } 694 }
695
696 /**
697 * analysis.getNavigation params
698 *
699 * {
700 * "file": FilePath
701 * "start": int
702 * "end": int
703 * }
704 */
705 class AnalysisGetNavigationParams implements HasToJson {
706 /**
707 * The file in which navigation information is being requested.
708 */
709 String file;
710
711 /**
712 * The offset of the start of the region for which hover information is being
713 * requested.
714 */
715 int start;
716
717 /**
718 * The offset of the end of the region for which hover information is being
719 * requested.
720 */
721 int end;
722
723 AnalysisGetNavigationParams(this.file, this.start, this.end);
724
725 factory AnalysisGetNavigationParams.fromJson(JsonDecoder jsonDecoder, String j sonPath, Object json) {
726 if (json == null) {
727 json = {};
728 }
729 if (json is Map) {
730 String file;
731 if (json.containsKey("file")) {
732 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
733 } else {
734 throw jsonDecoder.missingKey(jsonPath, "file");
735 }
736 int start;
737 if (json.containsKey("start")) {
738 start = jsonDecoder._decodeInt(jsonPath + ".start", json["start"]);
739 } else {
740 throw jsonDecoder.missingKey(jsonPath, "start");
741 }
742 int end;
743 if (json.containsKey("end")) {
744 end = jsonDecoder._decodeInt(jsonPath + ".end", json["end"]);
745 } else {
746 throw jsonDecoder.missingKey(jsonPath, "end");
747 }
748 return new AnalysisGetNavigationParams(file, start, end);
749 } else {
750 throw jsonDecoder.mismatch(jsonPath, "analysis.getNavigation params");
751 }
752 }
753
754 factory AnalysisGetNavigationParams.fromRequest(Request request) {
755 return new AnalysisGetNavigationParams.fromJson(
756 new RequestDecoder(request), "params", request._params);
757 }
758
759 Map<String, dynamic> toJson() {
760 Map<String, dynamic> result = {};
761 result["file"] = file;
762 result["start"] = start;
763 result["end"] = end;
764 return result;
765 }
766
767 Request toRequest(String id) {
768 return new Request(id, "analysis.getNavigation", toJson());
769 }
770
771 @override
772 String toString() => JSON.encode(toJson());
773
774 @override
775 bool operator==(other) {
776 if (other is AnalysisGetNavigationParams) {
777 return file == other.file &&
778 start == other.start &&
779 end == other.end;
780 }
781 return false;
782 }
783
784 @override
785 int get hashCode {
786 int hash = 0;
787 hash = _JenkinsSmiHash.combine(hash, file.hashCode);
788 hash = _JenkinsSmiHash.combine(hash, start.hashCode);
789 hash = _JenkinsSmiHash.combine(hash, end.hashCode);
790 return _JenkinsSmiHash.finish(hash);
791 }
792 }
793
794 /**
795 * analysis.getNavigation result
796 *
797 * {
798 * "files": List<FilePath>
799 * "targets": List<NavigationTarget>
800 * "regions": List<NavigationRegion>
801 * }
802 */
803 class AnalysisGetNavigationResult implements HasToJson {
804 /**
805 * A list of the paths of files that are referenced by the navigation
806 * targets.
807 */
808 List<String> files;
809
810 /**
811 * A list of the navigation targets that are referenced by the navigation
812 * regions.
813 */
814 List<NavigationTarget> targets;
815
816 /**
817 * A list of the navigation regions within the requested region of the file.
818 */
819 List<NavigationRegion> regions;
820
821 AnalysisGetNavigationResult(this.files, this.targets, this.regions);
822
823 factory AnalysisGetNavigationResult.fromJson(JsonDecoder jsonDecoder, String j sonPath, Object json) {
824 if (json == null) {
825 json = {};
826 }
827 if (json is Map) {
828 List<String> files;
829 if (json.containsKey("files")) {
830 files = jsonDecoder._decodeList(jsonPath + ".files", json["files"], json Decoder._decodeString);
831 } else {
832 throw jsonDecoder.missingKey(jsonPath, "files");
833 }
834 List<NavigationTarget> targets;
835 if (json.containsKey("targets")) {
836 targets = jsonDecoder._decodeList(jsonPath + ".targets", json["targets"] , (String jsonPath, Object json) => new NavigationTarget.fromJson(jsonDecoder, j sonPath, json));
837 } else {
838 throw jsonDecoder.missingKey(jsonPath, "targets");
839 }
840 List<NavigationRegion> regions;
841 if (json.containsKey("regions")) {
842 regions = jsonDecoder._decodeList(jsonPath + ".regions", json["regions"] , (String jsonPath, Object json) => new NavigationRegion.fromJson(jsonDecoder, j sonPath, json));
843 } else {
844 throw jsonDecoder.missingKey(jsonPath, "regions");
845 }
846 return new AnalysisGetNavigationResult(files, targets, regions);
847 } else {
848 throw jsonDecoder.mismatch(jsonPath, "analysis.getNavigation result");
849 }
850 }
851
852 factory AnalysisGetNavigationResult.fromResponse(Response response) {
853 return new AnalysisGetNavigationResult.fromJson(
854 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), " result", response._result);
855 }
856
857 Map<String, dynamic> toJson() {
858 Map<String, dynamic> result = {};
859 result["files"] = files;
860 result["targets"] = targets.map((NavigationTarget value) => value.toJson()). toList();
861 result["regions"] = regions.map((NavigationRegion value) => value.toJson()). toList();
862 return result;
863 }
864
865 Response toResponse(String id) {
866 return new Response(id, result: toJson());
867 }
868
869 @override
870 String toString() => JSON.encode(toJson());
871
872 @override
873 bool operator==(other) {
874 if (other is AnalysisGetNavigationResult) {
875 return _listEqual(files, other.files, (String a, String b) => a == b) &&
876 _listEqual(targets, other.targets, (NavigationTarget a, NavigationTarg et b) => a == b) &&
877 _listEqual(regions, other.regions, (NavigationRegion a, NavigationRegi on b) => a == b);
878 }
879 return false;
880 }
881
882 @override
883 int get hashCode {
884 int hash = 0;
885 hash = _JenkinsSmiHash.combine(hash, files.hashCode);
886 hash = _JenkinsSmiHash.combine(hash, targets.hashCode);
887 hash = _JenkinsSmiHash.combine(hash, regions.hashCode);
888 return _JenkinsSmiHash.finish(hash);
889 }
890 }
695 /** 891 /**
696 * analysis.reanalyze params 892 * analysis.reanalyze params
697 */ 893 */
698 class AnalysisReanalyzeParams { 894 class AnalysisReanalyzeParams {
699 Request toRequest(String id) { 895 Request toRequest(String id) {
700 return new Request(id, "analysis.reanalyze", null); 896 return new Request(id, "analysis.reanalyze", null);
701 } 897 }
702 898
703 @override 899 @override
704 bool operator==(other) { 900 bool operator==(other) {
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
1521 @override 1717 @override
1522 int get hashCode { 1718 int get hashCode {
1523 int hash = 0; 1719 int hash = 0;
1524 hash = _JenkinsSmiHash.combine(hash, file.hashCode); 1720 hash = _JenkinsSmiHash.combine(hash, file.hashCode);
1525 hash = _JenkinsSmiHash.combine(hash, regions.hashCode); 1721 hash = _JenkinsSmiHash.combine(hash, regions.hashCode);
1526 return _JenkinsSmiHash.finish(hash); 1722 return _JenkinsSmiHash.finish(hash);
1527 } 1723 }
1528 } 1724 }
1529 1725
1530 /** 1726 /**
1727 * analysis.invalidate params
1728 *
1729 * {
1730 * "file": FilePath
1731 * "start": int
1732 * "end": int
1733 * "delta": int
1734 * }
1735 */
1736 class AnalysisInvalidateParams implements HasToJson {
1737 /**
1738 * The file whose information has been invalidated.
1739 */
1740 String file;
1741
1742 /**
1743 * The offset of the start of the invalidated region.
1744 */
1745 int start;
1746
1747 /**
1748 * The offset of the end of the invalidated region.
1749 */
1750 int end;
1751
1752 /**
1753 * The delta to be applied to the offsets in information that follows the
1754 * invalidated region in order to update it so that it doesn't need to be
1755 * re-requested.
1756 */
1757 int delta;
1758
1759 AnalysisInvalidateParams(this.file, this.start, this.end, this.delta);
1760
1761 factory AnalysisInvalidateParams.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) {
1762 if (json == null) {
1763 json = {};
1764 }
1765 if (json is Map) {
1766 String file;
1767 if (json.containsKey("file")) {
1768 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
1769 } else {
1770 throw jsonDecoder.missingKey(jsonPath, "file");
1771 }
1772 int start;
1773 if (json.containsKey("start")) {
1774 start = jsonDecoder._decodeInt(jsonPath + ".start", json["start"]);
1775 } else {
1776 throw jsonDecoder.missingKey(jsonPath, "start");
1777 }
1778 int end;
1779 if (json.containsKey("end")) {
1780 end = jsonDecoder._decodeInt(jsonPath + ".end", json["end"]);
1781 } else {
1782 throw jsonDecoder.missingKey(jsonPath, "end");
1783 }
1784 int delta;
1785 if (json.containsKey("delta")) {
1786 delta = jsonDecoder._decodeInt(jsonPath + ".delta", json["delta"]);
1787 } else {
1788 throw jsonDecoder.missingKey(jsonPath, "delta");
1789 }
1790 return new AnalysisInvalidateParams(file, start, end, delta);
1791 } else {
1792 throw jsonDecoder.mismatch(jsonPath, "analysis.invalidate params");
1793 }
1794 }
1795
1796 factory AnalysisInvalidateParams.fromNotification(Notification notification) {
1797 return new AnalysisInvalidateParams.fromJson(
1798 new ResponseDecoder(null), "params", notification._params);
1799 }
1800
1801 Map<String, dynamic> toJson() {
1802 Map<String, dynamic> result = {};
1803 result["file"] = file;
1804 result["start"] = start;
1805 result["end"] = end;
1806 result["delta"] = delta;
1807 return result;
1808 }
1809
1810 Notification toNotification() {
1811 return new Notification("analysis.invalidate", toJson());
1812 }
1813
1814 @override
1815 String toString() => JSON.encode(toJson());
1816
1817 @override
1818 bool operator==(other) {
1819 if (other is AnalysisInvalidateParams) {
1820 return file == other.file &&
1821 start == other.start &&
1822 end == other.end &&
1823 delta == other.delta;
1824 }
1825 return false;
1826 }
1827
1828 @override
1829 int get hashCode {
1830 int hash = 0;
1831 hash = _JenkinsSmiHash.combine(hash, file.hashCode);
1832 hash = _JenkinsSmiHash.combine(hash, start.hashCode);
1833 hash = _JenkinsSmiHash.combine(hash, end.hashCode);
1834 hash = _JenkinsSmiHash.combine(hash, delta.hashCode);
1835 return _JenkinsSmiHash.finish(hash);
1836 }
1837 }
1838
1839 /**
1531 * analysis.navigation params 1840 * analysis.navigation params
1532 * 1841 *
1533 * { 1842 * {
1534 * "file": FilePath 1843 * "file": FilePath
1535 * "regions": List<NavigationRegion> 1844 * "regions": List<NavigationRegion>
1536 * "targets": List<NavigationTarget> 1845 * "targets": List<NavigationTarget>
1537 * "files": List<FilePath> 1846 * "files": List<FilePath>
1538 * } 1847 * }
1539 */ 1848 */
1540 class AnalysisNavigationParams implements HasToJson { 1849 class AnalysisNavigationParams implements HasToJson {
(...skipping 3466 matching lines...) Expand 10 before | Expand all | Expand 10 after
5007 return _JenkinsSmiHash.finish(hash); 5316 return _JenkinsSmiHash.finish(hash);
5008 } 5317 }
5009 } 5318 }
5010 5319
5011 /** 5320 /**
5012 * AnalysisService 5321 * AnalysisService
5013 * 5322 *
5014 * enum { 5323 * enum {
5015 * FOLDING 5324 * FOLDING
5016 * HIGHLIGHTS 5325 * HIGHLIGHTS
5326 * INVALIDATE
5017 * NAVIGATION 5327 * NAVIGATION
5018 * OCCURRENCES 5328 * OCCURRENCES
5019 * OUTLINE 5329 * OUTLINE
5020 * OVERRIDES 5330 * OVERRIDES
5021 * } 5331 * }
5022 */ 5332 */
5023 class AnalysisService implements Enum { 5333 class AnalysisService implements Enum {
5024 static const FOLDING = const AnalysisService._("FOLDING"); 5334 static const FOLDING = const AnalysisService._("FOLDING");
5025 5335
5026 static const HIGHLIGHTS = const AnalysisService._("HIGHLIGHTS"); 5336 static const HIGHLIGHTS = const AnalysisService._("HIGHLIGHTS");
5027 5337
5338 static const INVALIDATE = const AnalysisService._("INVALIDATE");
5339
5028 static const NAVIGATION = const AnalysisService._("NAVIGATION"); 5340 static const NAVIGATION = const AnalysisService._("NAVIGATION");
5029 5341
5030 static const OCCURRENCES = const AnalysisService._("OCCURRENCES"); 5342 static const OCCURRENCES = const AnalysisService._("OCCURRENCES");
5031 5343
5032 static const OUTLINE = const AnalysisService._("OUTLINE"); 5344 static const OUTLINE = const AnalysisService._("OUTLINE");
5033 5345
5034 static const OVERRIDES = const AnalysisService._("OVERRIDES"); 5346 static const OVERRIDES = const AnalysisService._("OVERRIDES");
5035 5347
5036 final String name; 5348 final String name;
5037 5349
5038 const AnalysisService._(this.name); 5350 const AnalysisService._(this.name);
5039 5351
5040 factory AnalysisService(String name) { 5352 factory AnalysisService(String name) {
5041 switch (name) { 5353 switch (name) {
5042 case "FOLDING": 5354 case "FOLDING":
5043 return FOLDING; 5355 return FOLDING;
5044 case "HIGHLIGHTS": 5356 case "HIGHLIGHTS":
5045 return HIGHLIGHTS; 5357 return HIGHLIGHTS;
5358 case "INVALIDATE":
5359 return INVALIDATE;
5046 case "NAVIGATION": 5360 case "NAVIGATION":
5047 return NAVIGATION; 5361 return NAVIGATION;
5048 case "OCCURRENCES": 5362 case "OCCURRENCES":
5049 return OCCURRENCES; 5363 return OCCURRENCES;
5050 case "OUTLINE": 5364 case "OUTLINE":
5051 return OUTLINE; 5365 return OUTLINE;
5052 case "OVERRIDES": 5366 case "OVERRIDES":
5053 return OVERRIDES; 5367 return OVERRIDES;
5054 } 5368 }
5055 throw new Exception('Illegal enum value: $name'); 5369 throw new Exception('Illegal enum value: $name');
(...skipping 5339 matching lines...) Expand 10 before | Expand all | Expand 10 after
10395 return false; 10709 return false;
10396 } 10710 }
10397 10711
10398 @override 10712 @override
10399 int get hashCode { 10713 int get hashCode {
10400 int hash = 0; 10714 int hash = 0;
10401 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); 10715 hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
10402 return _JenkinsSmiHash.finish(hash); 10716 return _JenkinsSmiHash.finish(hash);
10403 } 10717 }
10404 } 10718 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698