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

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

Issue 2995683002: Initial experimental Kythe Dart Analysis Server protocol (Closed)
Patch Set: rebase Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
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 11755 matching lines...) Expand 10 before | Expand all | Expand 10 after
11766 @override 11766 @override
11767 int get hashCode { 11767 int get hashCode {
11768 int hash = 0; 11768 int hash = 0;
11769 hash = JenkinsSmiHash.combine(hash, deleteSource.hashCode); 11769 hash = JenkinsSmiHash.combine(hash, deleteSource.hashCode);
11770 hash = JenkinsSmiHash.combine(hash, inlineAll.hashCode); 11770 hash = JenkinsSmiHash.combine(hash, inlineAll.hashCode);
11771 return JenkinsSmiHash.finish(hash); 11771 return JenkinsSmiHash.finish(hash);
11772 } 11772 }
11773 } 11773 }
11774 11774
11775 /** 11775 /**
11776 * KytheEntry
11777 *
11778 * {
11779 * "source": KytheVName
11780 * "kind": String
11781 * "target": KytheVName
11782 * "fact": String
11783 * "value": List<int>
11784 * }
11785 *
11786 * Clients may not extend, implement or mix-in this class.
11787 */
11788 class KytheEntry implements HasToJson {
11789 KytheVName _source;
11790
11791 String _kind;
11792
11793 KytheVName _target;
11794
11795 String _fact;
11796
11797 List<int> _value;
11798
11799 /**
11800 * The ticket of the source node (must not be empty).
11801 */
11802 KytheVName get source => _source;
11803
11804 /**
11805 * The ticket of the source node (must not be empty).
11806 */
11807 void set source(KytheVName value) {
11808 assert(value != null);
11809 this._source = value;
11810 }
11811
11812 /**
11813 * An edge label (may be empty). The schema defines which labels are
11814 * meaningful.
11815 */
11816 String get kind => _kind;
11817
11818 /**
11819 * An edge label (may be empty). The schema defines which labels are
11820 * meaningful.
11821 */
11822 void set kind(String value) {
11823 assert(value != null);
11824 this._kind = value;
11825 }
11826
11827 /**
11828 * The ticket of the target node (may be empty).
11829 */
11830 KytheVName get target => _target;
11831
11832 /**
11833 * The ticket of the target node (may be empty).
11834 */
11835 void set target(KytheVName value) {
11836 assert(value != null);
11837 this._target = value;
11838 }
11839
11840 /**
11841 * A fact label (must not be empty). The schema defines which fact labels are
11842 * meaningful.
11843 */
11844 String get fact => _fact;
11845
11846 /**
11847 * A fact label (must not be empty). The schema defines which fact labels are
11848 * meaningful.
11849 */
11850 void set fact(String value) {
11851 assert(value != null);
11852 this._fact = value;
11853 }
11854
11855 /**
11856 * The String value of the fact (may be empty).
11857 */
11858 List<int> get value => _value;
11859
11860 /**
11861 * The String value of the fact (may be empty).
11862 */
11863 void set value(List<int> value) {
11864 assert(value != null);
11865 this._value = value;
11866 }
11867
11868 KytheEntry(KytheVName source, String kind, KytheVName target, String fact,
11869 List<int> value) {
11870 this.source = source;
11871 this.kind = kind;
11872 this.target = target;
11873 this.fact = fact;
11874 this.value = value;
11875 }
11876
11877 factory KytheEntry.fromJson(
11878 JsonDecoder jsonDecoder, String jsonPath, Object json) {
11879 if (json == null) {
11880 json = {};
11881 }
11882 if (json is Map) {
11883 KytheVName source;
11884 if (json.containsKey("source")) {
11885 source = new KytheVName.fromJson(
11886 jsonDecoder, jsonPath + ".source", json["source"]);
11887 } else {
11888 throw jsonDecoder.mismatch(jsonPath, "source");
11889 }
11890 String kind;
11891 if (json.containsKey("kind")) {
11892 kind = jsonDecoder.decodeString(jsonPath + ".kind", json["kind"]);
11893 } else {
11894 throw jsonDecoder.mismatch(jsonPath, "kind");
11895 }
11896 KytheVName target;
11897 if (json.containsKey("target")) {
11898 target = new KytheVName.fromJson(
11899 jsonDecoder, jsonPath + ".target", json["target"]);
11900 } else {
11901 throw jsonDecoder.mismatch(jsonPath, "target");
11902 }
11903 String fact;
11904 if (json.containsKey("fact")) {
11905 fact = jsonDecoder.decodeString(jsonPath + ".fact", json["fact"]);
11906 } else {
11907 throw jsonDecoder.mismatch(jsonPath, "fact");
11908 }
11909 List<int> value;
11910 if (json.containsKey("value")) {
11911 value = jsonDecoder.decodeList(
11912 jsonPath + ".value", json["value"], jsonDecoder.decodeInt);
11913 } else {
11914 throw jsonDecoder.mismatch(jsonPath, "value");
11915 }
11916 return new KytheEntry(source, kind, target, fact, value);
11917 } else {
11918 throw jsonDecoder.mismatch(jsonPath, "KytheEntry", json);
11919 }
11920 }
11921
11922 @override
11923 Map<String, dynamic> toJson() {
11924 Map<String, dynamic> result = {};
11925 result["source"] = source.toJson();
11926 result["kind"] = kind;
11927 result["target"] = target.toJson();
11928 result["fact"] = fact;
11929 result["value"] = value;
11930 return result;
11931 }
11932
11933 @override
11934 String toString() => JSON.encode(toJson());
11935
11936 @override
11937 bool operator ==(other) {
11938 if (other is KytheEntry) {
11939 return source == other.source &&
11940 kind == other.kind &&
11941 target == other.target &&
11942 fact == other.fact &&
11943 listEqual(value, other.value, (int a, int b) => a == b);
11944 }
11945 return false;
11946 }
11947
11948 @override
11949 int get hashCode {
11950 int hash = 0;
11951 hash = JenkinsSmiHash.combine(hash, source.hashCode);
11952 hash = JenkinsSmiHash.combine(hash, kind.hashCode);
11953 hash = JenkinsSmiHash.combine(hash, target.hashCode);
11954 hash = JenkinsSmiHash.combine(hash, fact.hashCode);
11955 hash = JenkinsSmiHash.combine(hash, value.hashCode);
11956 return JenkinsSmiHash.finish(hash);
11957 }
11958 }
11959
11960 /**
11961 * kythe.getKytheEntries params
11962 *
11963 * {
11964 * "file": FilePath
11965 * }
11966 *
11967 * Clients may not extend, implement or mix-in this class.
11968 */
11969 class KytheGetKytheEntriesParams implements RequestParams {
11970 String _file;
11971
11972 /**
11973 * The file containing the code for which the Kythe Entry objects are being
11974 * requested.
11975 */
11976 String get file => _file;
11977
11978 /**
11979 * The file containing the code for which the Kythe Entry objects are being
11980 * requested.
11981 */
11982 void set file(String value) {
11983 assert(value != null);
11984 this._file = value;
11985 }
11986
11987 KytheGetKytheEntriesParams(String file) {
11988 this.file = file;
11989 }
11990
11991 factory KytheGetKytheEntriesParams.fromJson(
11992 JsonDecoder jsonDecoder, String jsonPath, Object json) {
11993 if (json == null) {
11994 json = {};
11995 }
11996 if (json is Map) {
11997 String file;
11998 if (json.containsKey("file")) {
11999 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
12000 } else {
12001 throw jsonDecoder.mismatch(jsonPath, "file");
12002 }
12003 return new KytheGetKytheEntriesParams(file);
12004 } else {
12005 throw jsonDecoder.mismatch(
12006 jsonPath, "kythe.getKytheEntries params", json);
12007 }
12008 }
12009
12010 factory KytheGetKytheEntriesParams.fromRequest(Request request) {
12011 return new KytheGetKytheEntriesParams.fromJson(
12012 new RequestDecoder(request), "params", request.params);
12013 }
12014
12015 @override
12016 Map<String, dynamic> toJson() {
12017 Map<String, dynamic> result = {};
12018 result["file"] = file;
12019 return result;
12020 }
12021
12022 @override
12023 Request toRequest(String id) {
12024 return new Request(id, "kythe.getKytheEntries", toJson());
12025 }
12026
12027 @override
12028 String toString() => JSON.encode(toJson());
12029
12030 @override
12031 bool operator ==(other) {
12032 if (other is KytheGetKytheEntriesParams) {
12033 return file == other.file;
12034 }
12035 return false;
12036 }
12037
12038 @override
12039 int get hashCode {
12040 int hash = 0;
12041 hash = JenkinsSmiHash.combine(hash, file.hashCode);
12042 return JenkinsSmiHash.finish(hash);
12043 }
12044 }
12045
12046 /**
12047 * kythe.getKytheEntries result
12048 *
12049 * {
12050 * "entries": List<KytheEntry>
12051 * "files": List<FilePath>
12052 * }
12053 *
12054 * Clients may not extend, implement or mix-in this class.
12055 */
12056 class KytheGetKytheEntriesResult implements ResponseResult {
12057 List<KytheEntry> _entries;
12058
12059 List<String> _files;
12060
12061 /**
12062 * The list of KytheEntry objects for the queried file.
12063 */
12064 List<KytheEntry> get entries => _entries;
12065
12066 /**
12067 * The list of KytheEntry objects for the queried file.
12068 */
12069 void set entries(List<KytheEntry> value) {
12070 assert(value != null);
12071 this._entries = value;
12072 }
12073
12074 /**
12075 * The set of files paths that were required, but not in the file system, to
12076 * give a complete and accurate Kythe graph for the file. This could be due
12077 * to a referenced file that does not exist or generated files not being
12078 * generated or passed before the call to "getKytheEntries".
12079 */
12080 List<String> get files => _files;
12081
12082 /**
12083 * The set of files paths that were required, but not in the file system, to
12084 * give a complete and accurate Kythe graph for the file. This could be due
12085 * to a referenced file that does not exist or generated files not being
12086 * generated or passed before the call to "getKytheEntries".
12087 */
12088 void set files(List<String> value) {
12089 assert(value != null);
12090 this._files = value;
12091 }
12092
12093 KytheGetKytheEntriesResult(List<KytheEntry> entries, List<String> files) {
12094 this.entries = entries;
12095 this.files = files;
12096 }
12097
12098 factory KytheGetKytheEntriesResult.fromJson(
12099 JsonDecoder jsonDecoder, String jsonPath, Object json) {
12100 if (json == null) {
12101 json = {};
12102 }
12103 if (json is Map) {
12104 List<KytheEntry> entries;
12105 if (json.containsKey("entries")) {
12106 entries = jsonDecoder.decodeList(
12107 jsonPath + ".entries",
12108 json["entries"],
12109 (String jsonPath, Object json) =>
12110 new KytheEntry.fromJson(jsonDecoder, jsonPath, json));
12111 } else {
12112 throw jsonDecoder.mismatch(jsonPath, "entries");
12113 }
12114 List<String> files;
12115 if (json.containsKey("files")) {
12116 files = jsonDecoder.decodeList(
12117 jsonPath + ".files", json["files"], jsonDecoder.decodeString);
12118 } else {
12119 throw jsonDecoder.mismatch(jsonPath, "files");
12120 }
12121 return new KytheGetKytheEntriesResult(entries, files);
12122 } else {
12123 throw jsonDecoder.mismatch(
12124 jsonPath, "kythe.getKytheEntries result", json);
12125 }
12126 }
12127
12128 factory KytheGetKytheEntriesResult.fromResponse(Response response) {
12129 return new KytheGetKytheEntriesResult.fromJson(
12130 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
12131 "result",
12132 response.result);
12133 }
12134
12135 @override
12136 Map<String, dynamic> toJson() {
12137 Map<String, dynamic> result = {};
12138 result["entries"] =
12139 entries.map((KytheEntry value) => value.toJson()).toList();
12140 result["files"] = files;
12141 return result;
12142 }
12143
12144 @override
12145 Response toResponse(String id) {
12146 return new Response(id, result: toJson());
12147 }
12148
12149 @override
12150 String toString() => JSON.encode(toJson());
12151
12152 @override
12153 bool operator ==(other) {
12154 if (other is KytheGetKytheEntriesResult) {
12155 return listEqual(
12156 entries, other.entries, (KytheEntry a, KytheEntry b) => a == b) &&
12157 listEqual(files, other.files, (String a, String b) => a == b);
12158 }
12159 return false;
12160 }
12161
12162 @override
12163 int get hashCode {
12164 int hash = 0;
12165 hash = JenkinsSmiHash.combine(hash, entries.hashCode);
12166 hash = JenkinsSmiHash.combine(hash, files.hashCode);
12167 return JenkinsSmiHash.finish(hash);
12168 }
12169 }
12170
12171 /**
12172 * KytheVName
12173 *
12174 * {
12175 * "signature": String
12176 * "corpus": String
12177 * "root": String
12178 * "path": String
12179 * "language": String
12180 * }
12181 *
12182 * Clients may not extend, implement or mix-in this class.
12183 */
12184 class KytheVName implements HasToJson {
12185 String _signature;
12186
12187 String _corpus;
12188
12189 String _root;
12190
12191 String _path;
12192
12193 String _language;
12194
12195 /**
12196 * An opaque signature generated by the analyzer.
12197 */
12198 String get signature => _signature;
12199
12200 /**
12201 * An opaque signature generated by the analyzer.
12202 */
12203 void set signature(String value) {
12204 assert(value != null);
12205 this._signature = value;
12206 }
12207
12208 /**
12209 * The corpus of source code this KytheVName belongs to. Loosely, a corpus is
12210 * a collection of related files, such as the contents of a given source
12211 * repository.
12212 */
12213 String get corpus => _corpus;
12214
12215 /**
12216 * The corpus of source code this KytheVName belongs to. Loosely, a corpus is
12217 * a collection of related files, such as the contents of a given source
12218 * repository.
12219 */
12220 void set corpus(String value) {
12221 assert(value != null);
12222 this._corpus = value;
12223 }
12224
12225 /**
12226 * A corpus-specific root label, typically a directory path or project
12227 * identifier, denoting a distinct subset of the corpus. This may also be
12228 * used to designate virtual collections like generated files.
12229 */
12230 String get root => _root;
12231
12232 /**
12233 * A corpus-specific root label, typically a directory path or project
12234 * identifier, denoting a distinct subset of the corpus. This may also be
12235 * used to designate virtual collections like generated files.
12236 */
12237 void set root(String value) {
12238 assert(value != null);
12239 this._root = value;
12240 }
12241
12242 /**
12243 * A path-structured label describing the “location” of the named object
12244 * relative to the corpus and the root.
12245 */
12246 String get path => _path;
12247
12248 /**
12249 * A path-structured label describing the “location” of the named object
12250 * relative to the corpus and the root.
12251 */
12252 void set path(String value) {
12253 assert(value != null);
12254 this._path = value;
12255 }
12256
12257 /**
12258 * The language this name belongs to.
12259 */
12260 String get language => _language;
12261
12262 /**
12263 * The language this name belongs to.
12264 */
12265 void set language(String value) {
12266 assert(value != null);
12267 this._language = value;
12268 }
12269
12270 KytheVName(String signature, String corpus, String root, String path,
12271 String language) {
12272 this.signature = signature;
12273 this.corpus = corpus;
12274 this.root = root;
12275 this.path = path;
12276 this.language = language;
12277 }
12278
12279 factory KytheVName.fromJson(
12280 JsonDecoder jsonDecoder, String jsonPath, Object json) {
12281 if (json == null) {
12282 json = {};
12283 }
12284 if (json is Map) {
12285 String signature;
12286 if (json.containsKey("signature")) {
12287 signature = jsonDecoder.decodeString(
12288 jsonPath + ".signature", json["signature"]);
12289 } else {
12290 throw jsonDecoder.mismatch(jsonPath, "signature");
12291 }
12292 String corpus;
12293 if (json.containsKey("corpus")) {
12294 corpus = jsonDecoder.decodeString(jsonPath + ".corpus", json["corpus"]);
12295 } else {
12296 throw jsonDecoder.mismatch(jsonPath, "corpus");
12297 }
12298 String root;
12299 if (json.containsKey("root")) {
12300 root = jsonDecoder.decodeString(jsonPath + ".root", json["root"]);
12301 } else {
12302 throw jsonDecoder.mismatch(jsonPath, "root");
12303 }
12304 String path;
12305 if (json.containsKey("path")) {
12306 path = jsonDecoder.decodeString(jsonPath + ".path", json["path"]);
12307 } else {
12308 throw jsonDecoder.mismatch(jsonPath, "path");
12309 }
12310 String language;
12311 if (json.containsKey("language")) {
12312 language =
12313 jsonDecoder.decodeString(jsonPath + ".language", json["language"]);
12314 } else {
12315 throw jsonDecoder.mismatch(jsonPath, "language");
12316 }
12317 return new KytheVName(signature, corpus, root, path, language);
12318 } else {
12319 throw jsonDecoder.mismatch(jsonPath, "KytheVName", json);
12320 }
12321 }
12322
12323 @override
12324 Map<String, dynamic> toJson() {
12325 Map<String, dynamic> result = {};
12326 result["signature"] = signature;
12327 result["corpus"] = corpus;
12328 result["root"] = root;
12329 result["path"] = path;
12330 result["language"] = language;
12331 return result;
12332 }
12333
12334 @override
12335 String toString() => JSON.encode(toJson());
12336
12337 @override
12338 bool operator ==(other) {
12339 if (other is KytheVName) {
12340 return signature == other.signature &&
12341 corpus == other.corpus &&
12342 root == other.root &&
12343 path == other.path &&
12344 language == other.language;
12345 }
12346 return false;
12347 }
12348
12349 @override
12350 int get hashCode {
12351 int hash = 0;
12352 hash = JenkinsSmiHash.combine(hash, signature.hashCode);
12353 hash = JenkinsSmiHash.combine(hash, corpus.hashCode);
12354 hash = JenkinsSmiHash.combine(hash, root.hashCode);
12355 hash = JenkinsSmiHash.combine(hash, path.hashCode);
12356 hash = JenkinsSmiHash.combine(hash, language.hashCode);
12357 return JenkinsSmiHash.finish(hash);
12358 }
12359 }
12360
12361 /**
11776 * moveFile feedback 12362 * moveFile feedback
11777 * 12363 *
11778 * Clients may not extend, implement or mix-in this class. 12364 * Clients may not extend, implement or mix-in this class.
11779 */ 12365 */
11780 class MoveFileFeedback extends RefactoringFeedback implements HasToJson { 12366 class MoveFileFeedback extends RefactoringFeedback implements HasToJson {
11781 @override 12367 @override
11782 bool operator ==(other) { 12368 bool operator ==(other) {
11783 if (other is MoveFileFeedback) { 12369 if (other is MoveFileFeedback) {
11784 return true; 12370 return true;
11785 } 12371 }
(...skipping 3783 matching lines...) Expand 10 before | Expand all | Expand 10 after
15569 hash = JenkinsSmiHash.combine(hash, classElement.hashCode); 16155 hash = JenkinsSmiHash.combine(hash, classElement.hashCode);
15570 hash = JenkinsSmiHash.combine(hash, displayName.hashCode); 16156 hash = JenkinsSmiHash.combine(hash, displayName.hashCode);
15571 hash = JenkinsSmiHash.combine(hash, memberElement.hashCode); 16157 hash = JenkinsSmiHash.combine(hash, memberElement.hashCode);
15572 hash = JenkinsSmiHash.combine(hash, superclass.hashCode); 16158 hash = JenkinsSmiHash.combine(hash, superclass.hashCode);
15573 hash = JenkinsSmiHash.combine(hash, interfaces.hashCode); 16159 hash = JenkinsSmiHash.combine(hash, interfaces.hashCode);
15574 hash = JenkinsSmiHash.combine(hash, mixins.hashCode); 16160 hash = JenkinsSmiHash.combine(hash, mixins.hashCode);
15575 hash = JenkinsSmiHash.combine(hash, subclasses.hashCode); 16161 hash = JenkinsSmiHash.combine(hash, subclasses.hashCode);
15576 return JenkinsSmiHash.finish(hash); 16162 return JenkinsSmiHash.finish(hash);
15577 } 16163 }
15578 } 16164 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698