| 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 3140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3151 hash = _JenkinsSmiHash.combine(hash, occurrences.hashCode); | 3151 hash = _JenkinsSmiHash.combine(hash, occurrences.hashCode); |
| 3152 return _JenkinsSmiHash.finish(hash); | 3152 return _JenkinsSmiHash.finish(hash); |
| 3153 } | 3153 } |
| 3154 } | 3154 } |
| 3155 | 3155 |
| 3156 /** | 3156 /** |
| 3157 * analysis.outline params | 3157 * analysis.outline params |
| 3158 * | 3158 * |
| 3159 * { | 3159 * { |
| 3160 * "file": FilePath | 3160 * "file": FilePath |
| 3161 * "kind": FileKind |
| 3162 * "libraryName": optional String |
| 3161 * "outline": Outline | 3163 * "outline": Outline |
| 3162 * } | 3164 * } |
| 3163 */ | 3165 */ |
| 3164 class AnalysisOutlineParams implements HasToJson { | 3166 class AnalysisOutlineParams implements HasToJson { |
| 3165 String _file; | 3167 String _file; |
| 3166 | 3168 |
| 3169 FileKind _kind; |
| 3170 |
| 3171 String _libraryName; |
| 3172 |
| 3167 Outline _outline; | 3173 Outline _outline; |
| 3168 | 3174 |
| 3169 /** | 3175 /** |
| 3170 * The file with which the outline is associated. | 3176 * The file with which the outline is associated. |
| 3171 */ | 3177 */ |
| 3172 String get file => _file; | 3178 String get file => _file; |
| 3173 | 3179 |
| 3174 /** | 3180 /** |
| 3175 * The file with which the outline is associated. | 3181 * The file with which the outline is associated. |
| 3176 */ | 3182 */ |
| 3177 void set file(String value) { | 3183 void set file(String value) { |
| 3178 assert(value != null); | 3184 assert(value != null); |
| 3179 this._file = value; | 3185 this._file = value; |
| 3180 } | 3186 } |
| 3181 | 3187 |
| 3182 /** | 3188 /** |
| 3189 * The kind of the file. |
| 3190 */ |
| 3191 FileKind get kind => _kind; |
| 3192 |
| 3193 /** |
| 3194 * The kind of the file. |
| 3195 */ |
| 3196 void set kind(FileKind value) { |
| 3197 assert(value != null); |
| 3198 this._kind = value; |
| 3199 } |
| 3200 |
| 3201 /** |
| 3202 * The name of the library defined by the file using a "library" directive, |
| 3203 * or referenced by a "part of" directive. If both "library" and "part of" |
| 3204 * directives are present, then the "library" directive takes precedence. |
| 3205 * This field will be omitted if the file has neither "library" nor "part of" |
| 3206 * directives. |
| 3207 */ |
| 3208 String get libraryName => _libraryName; |
| 3209 |
| 3210 /** |
| 3211 * The name of the library defined by the file using a "library" directive, |
| 3212 * or referenced by a "part of" directive. If both "library" and "part of" |
| 3213 * directives are present, then the "library" directive takes precedence. |
| 3214 * This field will be omitted if the file has neither "library" nor "part of" |
| 3215 * directives. |
| 3216 */ |
| 3217 void set libraryName(String value) { |
| 3218 this._libraryName = value; |
| 3219 } |
| 3220 |
| 3221 /** |
| 3183 * The outline associated with the file. | 3222 * The outline associated with the file. |
| 3184 */ | 3223 */ |
| 3185 Outline get outline => _outline; | 3224 Outline get outline => _outline; |
| 3186 | 3225 |
| 3187 /** | 3226 /** |
| 3188 * The outline associated with the file. | 3227 * The outline associated with the file. |
| 3189 */ | 3228 */ |
| 3190 void set outline(Outline value) { | 3229 void set outline(Outline value) { |
| 3191 assert(value != null); | 3230 assert(value != null); |
| 3192 this._outline = value; | 3231 this._outline = value; |
| 3193 } | 3232 } |
| 3194 | 3233 |
| 3195 AnalysisOutlineParams(String file, Outline outline) { | 3234 AnalysisOutlineParams(String file, FileKind kind, Outline outline, {String lib
raryName}) { |
| 3196 this.file = file; | 3235 this.file = file; |
| 3236 this.kind = kind; |
| 3237 this.libraryName = libraryName; |
| 3197 this.outline = outline; | 3238 this.outline = outline; |
| 3198 } | 3239 } |
| 3199 | 3240 |
| 3200 factory AnalysisOutlineParams.fromJson(JsonDecoder jsonDecoder, String jsonPat
h, Object json) { | 3241 factory AnalysisOutlineParams.fromJson(JsonDecoder jsonDecoder, String jsonPat
h, Object json) { |
| 3201 if (json == null) { | 3242 if (json == null) { |
| 3202 json = {}; | 3243 json = {}; |
| 3203 } | 3244 } |
| 3204 if (json is Map) { | 3245 if (json is Map) { |
| 3205 String file; | 3246 String file; |
| 3206 if (json.containsKey("file")) { | 3247 if (json.containsKey("file")) { |
| 3207 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 3248 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
| 3208 } else { | 3249 } else { |
| 3209 throw jsonDecoder.missingKey(jsonPath, "file"); | 3250 throw jsonDecoder.missingKey(jsonPath, "file"); |
| 3210 } | 3251 } |
| 3252 FileKind kind; |
| 3253 if (json.containsKey("kind")) { |
| 3254 kind = new FileKind.fromJson(jsonDecoder, jsonPath + ".kind", json["kind
"]); |
| 3255 } else { |
| 3256 throw jsonDecoder.missingKey(jsonPath, "kind"); |
| 3257 } |
| 3258 String libraryName; |
| 3259 if (json.containsKey("libraryName")) { |
| 3260 libraryName = jsonDecoder._decodeString(jsonPath + ".libraryName", json[
"libraryName"]); |
| 3261 } |
| 3211 Outline outline; | 3262 Outline outline; |
| 3212 if (json.containsKey("outline")) { | 3263 if (json.containsKey("outline")) { |
| 3213 outline = new Outline.fromJson(jsonDecoder, jsonPath + ".outline", json[
"outline"]); | 3264 outline = new Outline.fromJson(jsonDecoder, jsonPath + ".outline", json[
"outline"]); |
| 3214 } else { | 3265 } else { |
| 3215 throw jsonDecoder.missingKey(jsonPath, "outline"); | 3266 throw jsonDecoder.missingKey(jsonPath, "outline"); |
| 3216 } | 3267 } |
| 3217 return new AnalysisOutlineParams(file, outline); | 3268 return new AnalysisOutlineParams(file, kind, outline, libraryName: library
Name); |
| 3218 } else { | 3269 } else { |
| 3219 throw jsonDecoder.mismatch(jsonPath, "analysis.outline params", json); | 3270 throw jsonDecoder.mismatch(jsonPath, "analysis.outline params", json); |
| 3220 } | 3271 } |
| 3221 } | 3272 } |
| 3222 | 3273 |
| 3223 factory AnalysisOutlineParams.fromNotification(Notification notification) { | 3274 factory AnalysisOutlineParams.fromNotification(Notification notification) { |
| 3224 return new AnalysisOutlineParams.fromJson( | 3275 return new AnalysisOutlineParams.fromJson( |
| 3225 new ResponseDecoder(null), "params", notification._params); | 3276 new ResponseDecoder(null), "params", notification._params); |
| 3226 } | 3277 } |
| 3227 | 3278 |
| 3228 Map<String, dynamic> toJson() { | 3279 Map<String, dynamic> toJson() { |
| 3229 Map<String, dynamic> result = {}; | 3280 Map<String, dynamic> result = {}; |
| 3230 result["file"] = file; | 3281 result["file"] = file; |
| 3282 result["kind"] = kind.toJson(); |
| 3283 if (libraryName != null) { |
| 3284 result["libraryName"] = libraryName; |
| 3285 } |
| 3231 result["outline"] = outline.toJson(); | 3286 result["outline"] = outline.toJson(); |
| 3232 return result; | 3287 return result; |
| 3233 } | 3288 } |
| 3234 | 3289 |
| 3235 Notification toNotification() { | 3290 Notification toNotification() { |
| 3236 return new Notification("analysis.outline", toJson()); | 3291 return new Notification("analysis.outline", toJson()); |
| 3237 } | 3292 } |
| 3238 | 3293 |
| 3239 @override | 3294 @override |
| 3240 String toString() => JSON.encode(toJson()); | 3295 String toString() => JSON.encode(toJson()); |
| 3241 | 3296 |
| 3242 @override | 3297 @override |
| 3243 bool operator==(other) { | 3298 bool operator==(other) { |
| 3244 if (other is AnalysisOutlineParams) { | 3299 if (other is AnalysisOutlineParams) { |
| 3245 return file == other.file && | 3300 return file == other.file && |
| 3301 kind == other.kind && |
| 3302 libraryName == other.libraryName && |
| 3246 outline == other.outline; | 3303 outline == other.outline; |
| 3247 } | 3304 } |
| 3248 return false; | 3305 return false; |
| 3249 } | 3306 } |
| 3250 | 3307 |
| 3251 @override | 3308 @override |
| 3252 int get hashCode { | 3309 int get hashCode { |
| 3253 int hash = 0; | 3310 int hash = 0; |
| 3254 hash = _JenkinsSmiHash.combine(hash, file.hashCode); | 3311 hash = _JenkinsSmiHash.combine(hash, file.hashCode); |
| 3312 hash = _JenkinsSmiHash.combine(hash, kind.hashCode); |
| 3313 hash = _JenkinsSmiHash.combine(hash, libraryName.hashCode); |
| 3255 hash = _JenkinsSmiHash.combine(hash, outline.hashCode); | 3314 hash = _JenkinsSmiHash.combine(hash, outline.hashCode); |
| 3256 return _JenkinsSmiHash.finish(hash); | 3315 return _JenkinsSmiHash.finish(hash); |
| 3257 } | 3316 } |
| 3258 } | 3317 } |
| 3259 | 3318 |
| 3260 /** | 3319 /** |
| 3261 * analysis.overrides params | 3320 * analysis.overrides params |
| 3262 * | 3321 * |
| 3263 * { | 3322 * { |
| 3264 * "file": FilePath | 3323 * "file": FilePath |
| (...skipping 6239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9504 throw jsonDecoder.mismatch(jsonPath, "ExecutionService", json); | 9563 throw jsonDecoder.mismatch(jsonPath, "ExecutionService", json); |
| 9505 } | 9564 } |
| 9506 | 9565 |
| 9507 @override | 9566 @override |
| 9508 String toString() => "ExecutionService.$name"; | 9567 String toString() => "ExecutionService.$name"; |
| 9509 | 9568 |
| 9510 String toJson() => name; | 9569 String toJson() => name; |
| 9511 } | 9570 } |
| 9512 | 9571 |
| 9513 /** | 9572 /** |
| 9573 * FileKind |
| 9574 * |
| 9575 * enum { |
| 9576 * LIBRARY |
| 9577 * PART |
| 9578 * } |
| 9579 */ |
| 9580 class FileKind implements Enum { |
| 9581 static const LIBRARY = const FileKind._("LIBRARY"); |
| 9582 |
| 9583 static const PART = const FileKind._("PART"); |
| 9584 |
| 9585 /** |
| 9586 * A list containing all of the enum values that are defined. |
| 9587 */ |
| 9588 static const List<FileKind> VALUES = const <FileKind>[LIBRARY, PART]; |
| 9589 |
| 9590 final String name; |
| 9591 |
| 9592 const FileKind._(this.name); |
| 9593 |
| 9594 factory FileKind(String name) { |
| 9595 switch (name) { |
| 9596 case "LIBRARY": |
| 9597 return LIBRARY; |
| 9598 case "PART": |
| 9599 return PART; |
| 9600 } |
| 9601 throw new Exception('Illegal enum value: $name'); |
| 9602 } |
| 9603 |
| 9604 factory FileKind.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object jso
n) { |
| 9605 if (json is String) { |
| 9606 try { |
| 9607 return new FileKind(json); |
| 9608 } catch(_) { |
| 9609 // Fall through |
| 9610 } |
| 9611 } |
| 9612 throw jsonDecoder.mismatch(jsonPath, "FileKind", json); |
| 9613 } |
| 9614 |
| 9615 @override |
| 9616 String toString() => "FileKind.$name"; |
| 9617 |
| 9618 String toJson() => name; |
| 9619 } |
| 9620 |
| 9621 /** |
| 9514 * FoldingKind | 9622 * FoldingKind |
| 9515 * | 9623 * |
| 9516 * enum { | 9624 * enum { |
| 9517 * COMMENT | 9625 * COMMENT |
| 9518 * CLASS_MEMBER | 9626 * CLASS_MEMBER |
| 9519 * DIRECTIVES | 9627 * DIRECTIVES |
| 9520 * DOCUMENTATION_COMMENT | 9628 * DOCUMENTATION_COMMENT |
| 9521 * TOP_LEVEL_DECLARATION | 9629 * TOP_LEVEL_DECLARATION |
| 9522 * } | 9630 * } |
| 9523 */ | 9631 */ |
| (...skipping 6393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15917 return false; | 16025 return false; |
| 15918 } | 16026 } |
| 15919 | 16027 |
| 15920 @override | 16028 @override |
| 15921 int get hashCode { | 16029 int get hashCode { |
| 15922 int hash = 0; | 16030 int hash = 0; |
| 15923 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); | 16031 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); |
| 15924 return _JenkinsSmiHash.finish(hash); | 16032 return _JenkinsSmiHash.finish(hash); |
| 15925 } | 16033 } |
| 15926 } | 16034 } |
| OLD | NEW |