| OLD | NEW |
| 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 4208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4219 @override | 4219 @override |
| 4220 int get hashCode { | 4220 int get hashCode { |
| 4221 return 287678780; | 4221 return 287678780; |
| 4222 } | 4222 } |
| 4223 } | 4223 } |
| 4224 | 4224 |
| 4225 /** | 4225 /** |
| 4226 * execution.launchData params | 4226 * execution.launchData params |
| 4227 * | 4227 * |
| 4228 * { | 4228 * { |
| 4229 * "executables": List<ExecutableFile> | 4229 * "file": FilePath |
| 4230 * "dartToHtml": Map<FilePath, List<FilePath>> | 4230 * "kind": optional ExecutableKind |
| 4231 * "htmlToDart": Map<FilePath, List<FilePath>> | 4231 * "referencedFiles": optional List<FilePath> |
| 4232 * } | 4232 * } |
| 4233 */ | 4233 */ |
| 4234 class ExecutionLaunchDataParams implements HasToJson { | 4234 class ExecutionLaunchDataParams implements HasToJson { |
| 4235 /** | 4235 /** |
| 4236 * A list of the files that are executable. This list replaces any previous | 4236 * The file for which launch data is being provided. This will either be a |
| 4237 * list provided. | 4237 * Dart library or an HTML file. |
| 4238 */ | 4238 */ |
| 4239 List<ExecutableFile> executables; | 4239 String file; |
| 4240 | 4240 |
| 4241 /** | 4241 /** |
| 4242 * A mapping from the paths of Dart files that are referenced by HTML files | 4242 * The kind of the executable file. This field is omitted if the file is not |
| 4243 * to a list of the HTML files that reference the Dart files. | 4243 * a Dart file. |
| 4244 */ | 4244 */ |
| 4245 Map<String, List<String>> dartToHtml; | 4245 ExecutableKind kind; |
| 4246 | 4246 |
| 4247 /** | 4247 /** |
| 4248 * A mapping from the paths of HTML files that reference Dart files to a list | 4248 * A list of the Dart files that are referenced by the file. This field is |
| 4249 * of the Dart files they reference. | 4249 * omitted if the file is not an HTML file. |
| 4250 */ | 4250 */ |
| 4251 Map<String, List<String>> htmlToDart; | 4251 List<String> referencedFiles; |
| 4252 | 4252 |
| 4253 ExecutionLaunchDataParams(this.executables, this.dartToHtml, this.htmlToDart); | 4253 ExecutionLaunchDataParams(this.file, {this.kind, this.referencedFiles}) { |
| 4254 if (referencedFiles == null) { |
| 4255 referencedFiles = <String>[]; |
| 4256 } |
| 4257 } |
| 4254 | 4258 |
| 4255 factory ExecutionLaunchDataParams.fromJson(JsonDecoder jsonDecoder, String jso
nPath, Object json) { | 4259 factory ExecutionLaunchDataParams.fromJson(JsonDecoder jsonDecoder, String jso
nPath, Object json) { |
| 4256 if (json == null) { | 4260 if (json == null) { |
| 4257 json = {}; | 4261 json = {}; |
| 4258 } | 4262 } |
| 4259 if (json is Map) { | 4263 if (json is Map) { |
| 4260 List<ExecutableFile> executables; | 4264 String file; |
| 4261 if (json.containsKey("executables")) { | 4265 if (json.containsKey("file")) { |
| 4262 executables = jsonDecoder._decodeList(jsonPath + ".executables", json["e
xecutables"], (String jsonPath, Object json) => new ExecutableFile.fromJson(json
Decoder, jsonPath, json)); | 4266 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 4263 } else { | 4267 } else { |
| 4264 throw jsonDecoder.missingKey(jsonPath, "executables"); | 4268 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 4265 } | 4269 } |
| 4266 Map<String, List<String>> dartToHtml; | 4270 ExecutableKind kind; |
| 4267 if (json.containsKey("dartToHtml")) { | 4271 if (json.containsKey("kind")) { |
| 4268 dartToHtml = jsonDecoder._decodeMap(jsonPath + ".dartToHtml", json["dart
ToHtml"], valueDecoder: (String jsonPath, Object json) => jsonDecoder._decodeLis
t(jsonPath, json, jsonDecoder._decodeString)); | 4272 kind = new ExecutableKind.fromJson(jsonDecoder, jsonPath + ".kind", json
["kind"]); |
| 4273 } |
| 4274 List<String> referencedFiles; |
| 4275 if (json.containsKey("referencedFiles")) { |
| 4276 referencedFiles = jsonDecoder._decodeList(jsonPath + ".referencedFiles",
json["referencedFiles"], jsonDecoder._decodeString); |
| 4269 } else { | 4277 } else { |
| 4270 throw jsonDecoder.missingKey(jsonPath, "dartToHtml"); | 4278 referencedFiles = <String>[]; |
| 4271 } | 4279 } |
| 4272 Map<String, List<String>> htmlToDart; | 4280 return new ExecutionLaunchDataParams(file, kind: kind, referencedFiles: re
ferencedFiles); |
| 4273 if (json.containsKey("htmlToDart")) { | |
| 4274 htmlToDart = jsonDecoder._decodeMap(jsonPath + ".htmlToDart", json["html
ToDart"], valueDecoder: (String jsonPath, Object json) => jsonDecoder._decodeLis
t(jsonPath, json, jsonDecoder._decodeString)); | |
| 4275 } else { | |
| 4276 throw jsonDecoder.missingKey(jsonPath, "htmlToDart"); | |
| 4277 } | |
| 4278 return new ExecutionLaunchDataParams(executables, dartToHtml, htmlToDart); | |
| 4279 } else { | 4281 } else { |
| 4280 throw jsonDecoder.mismatch(jsonPath, "execution.launchData params"); | 4282 throw jsonDecoder.mismatch(jsonPath, "execution.launchData params"); |
| 4281 } | 4283 } |
| 4282 } | 4284 } |
| 4283 | 4285 |
| 4284 factory ExecutionLaunchDataParams.fromNotification(Notification notification)
{ | 4286 factory ExecutionLaunchDataParams.fromNotification(Notification notification)
{ |
| 4285 return new ExecutionLaunchDataParams.fromJson( | 4287 return new ExecutionLaunchDataParams.fromJson( |
| 4286 new ResponseDecoder(null), "params", notification._params); | 4288 new ResponseDecoder(null), "params", notification._params); |
| 4287 } | 4289 } |
| 4288 | 4290 |
| 4289 Map<String, dynamic> toJson() { | 4291 Map<String, dynamic> toJson() { |
| 4290 Map<String, dynamic> result = {}; | 4292 Map<String, dynamic> result = {}; |
| 4291 result["executables"] = executables.map((ExecutableFile value) => value.toJs
on()).toList(); | 4293 result["file"] = file; |
| 4292 result["dartToHtml"] = dartToHtml; | 4294 if (kind != null) { |
| 4293 result["htmlToDart"] = htmlToDart; | 4295 result["kind"] = kind.toJson(); |
| 4296 } |
| 4297 if (referencedFiles.isNotEmpty) { |
| 4298 result["referencedFiles"] = referencedFiles; |
| 4299 } |
| 4294 return result; | 4300 return result; |
| 4295 } | 4301 } |
| 4296 | 4302 |
| 4297 Notification toNotification() { | 4303 Notification toNotification() { |
| 4298 return new Notification("execution.launchData", toJson()); | 4304 return new Notification("execution.launchData", toJson()); |
| 4299 } | 4305 } |
| 4300 | 4306 |
| 4301 @override | 4307 @override |
| 4302 String toString() => JSON.encode(toJson()); | 4308 String toString() => JSON.encode(toJson()); |
| 4303 | 4309 |
| 4304 @override | 4310 @override |
| 4305 bool operator==(other) { | 4311 bool operator==(other) { |
| 4306 if (other is ExecutionLaunchDataParams) { | 4312 if (other is ExecutionLaunchDataParams) { |
| 4307 return _listEqual(executables, other.executables, (ExecutableFile a, Execu
tableFile b) => a == b) && | 4313 return file == other.file && |
| 4308 _mapEqual(dartToHtml, other.dartToHtml, (List<String> a, List<String>
b) => _listEqual(a, b, (String a, String b) => a == b)) && | 4314 kind == other.kind && |
| 4309 _mapEqual(htmlToDart, other.htmlToDart, (List<String> a, List<String>
b) => _listEqual(a, b, (String a, String b) => a == b)); | 4315 _listEqual(referencedFiles, other.referencedFiles, (String a, String b
) => a == b); |
| 4310 } | 4316 } |
| 4311 return false; | 4317 return false; |
| 4312 } | 4318 } |
| 4313 | 4319 |
| 4314 @override | 4320 @override |
| 4315 int get hashCode { | 4321 int get hashCode { |
| 4316 int hash = 0; | 4322 int hash = 0; |
| 4317 hash = _JenkinsSmiHash.combine(hash, executables.hashCode); | 4323 hash = _JenkinsSmiHash.combine(hash, file.hashCode); |
| 4318 hash = _JenkinsSmiHash.combine(hash, dartToHtml.hashCode); | 4324 hash = _JenkinsSmiHash.combine(hash, kind.hashCode); |
| 4319 hash = _JenkinsSmiHash.combine(hash, htmlToDart.hashCode); | 4325 hash = _JenkinsSmiHash.combine(hash, referencedFiles.hashCode); |
| 4320 return _JenkinsSmiHash.finish(hash); | 4326 return _JenkinsSmiHash.finish(hash); |
| 4321 } | 4327 } |
| 4322 } | 4328 } |
| 4323 | 4329 |
| 4324 /** | 4330 /** |
| 4325 * AddContentOverlay | 4331 * AddContentOverlay |
| 4326 * | 4332 * |
| 4327 * { | 4333 * { |
| 4328 * "type": "add" | 4334 * "type": "add" |
| 4329 * "content": String | 4335 * "content": String |
| (...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5966 return _JenkinsSmiHash.finish(hash); | 5972 return _JenkinsSmiHash.finish(hash); |
| 5967 } | 5973 } |
| 5968 } | 5974 } |
| 5969 | 5975 |
| 5970 /** | 5976 /** |
| 5971 * ExecutableKind | 5977 * ExecutableKind |
| 5972 * | 5978 * |
| 5973 * enum { | 5979 * enum { |
| 5974 * CLIENT | 5980 * CLIENT |
| 5975 * EITHER | 5981 * EITHER |
| 5982 * NOT_EXECUTABLE |
| 5976 * SERVER | 5983 * SERVER |
| 5977 * } | 5984 * } |
| 5978 */ | 5985 */ |
| 5979 class ExecutableKind { | 5986 class ExecutableKind { |
| 5980 static const CLIENT = const ExecutableKind._("CLIENT"); | 5987 static const CLIENT = const ExecutableKind._("CLIENT"); |
| 5981 | 5988 |
| 5982 static const EITHER = const ExecutableKind._("EITHER"); | 5989 static const EITHER = const ExecutableKind._("EITHER"); |
| 5983 | 5990 |
| 5991 static const NOT_EXECUTABLE = const ExecutableKind._("NOT_EXECUTABLE"); |
| 5992 |
| 5984 static const SERVER = const ExecutableKind._("SERVER"); | 5993 static const SERVER = const ExecutableKind._("SERVER"); |
| 5985 | 5994 |
| 5986 final String name; | 5995 final String name; |
| 5987 | 5996 |
| 5988 const ExecutableKind._(this.name); | 5997 const ExecutableKind._(this.name); |
| 5989 | 5998 |
| 5990 factory ExecutableKind(String name) { | 5999 factory ExecutableKind(String name) { |
| 5991 switch (name) { | 6000 switch (name) { |
| 5992 case "CLIENT": | 6001 case "CLIENT": |
| 5993 return CLIENT; | 6002 return CLIENT; |
| 5994 case "EITHER": | 6003 case "EITHER": |
| 5995 return EITHER; | 6004 return EITHER; |
| 6005 case "NOT_EXECUTABLE": |
| 6006 return NOT_EXECUTABLE; |
| 5996 case "SERVER": | 6007 case "SERVER": |
| 5997 return SERVER; | 6008 return SERVER; |
| 5998 } | 6009 } |
| 5999 throw new Exception('Illegal enum value: $name'); | 6010 throw new Exception('Illegal enum value: $name'); |
| 6000 } | 6011 } |
| 6001 | 6012 |
| 6002 factory ExecutableKind.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje
ct json) { | 6013 factory ExecutableKind.fromJson(JsonDecoder jsonDecoder, String jsonPath, Obje
ct json) { |
| 6003 if (json is String) { | 6014 if (json is String) { |
| 6004 try { | 6015 try { |
| 6005 return new ExecutableKind(json); | 6016 return new ExecutableKind(json); |
| (...skipping 4234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10240 return true; | 10251 return true; |
| 10241 } | 10252 } |
| 10242 return false; | 10253 return false; |
| 10243 } | 10254 } |
| 10244 | 10255 |
| 10245 @override | 10256 @override |
| 10246 int get hashCode { | 10257 int get hashCode { |
| 10247 return 99705880; | 10258 return 99705880; |
| 10248 } | 10259 } |
| 10249 } | 10260 } |
| OLD | NEW |