| 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 code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library service.interfaces; | 8 library service.interfaces; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/java_core.dart' show Enum; | 10 import 'package:analyzer/src/generated/java_core.dart' show Enum, StringUtils; |
| 11 import 'package:analyzer/src/generated/source.dart' show Source; | 11 import 'package:analyzer/src/generated/source.dart' show Source; |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * The interface `HighlightRegion` defines the behavior of objects representing
a particular | 14 * The interface `HighlightRegion` defines the behavior of objects representing
a particular |
| 15 * syntactic or semantic meaning associated with a source region. | 15 * syntactic or semantic meaning associated with a source region. |
| 16 */ | 16 */ |
| 17 abstract class HighlightRegion implements SourceRegion { | 17 abstract class HighlightRegion implements SourceRegion { |
| 18 /** | 18 /** |
| 19 * Return the type of highlight associated with the region. | 19 * Return the type of highlight associated with the region. |
| 20 * | 20 * |
| 21 * @return the type of highlight associated with the region | 21 * @return the type of highlight associated with the region |
| 22 */ | 22 */ |
| 23 HighlightType get type; | 23 HighlightType get type; |
| 24 } | 24 } |
| 25 | 25 |
| 26 /** | 26 /** |
| 27 * The interface `NavigationTarget` defines the behavior of objects that provide
information | |
| 28 * about the target of a navigation region. | |
| 29 */ | |
| 30 abstract class NavigationTarget { | |
| 31 /** | |
| 32 * Return the id of the element to which this target will navigate. | |
| 33 * | |
| 34 * @return the id of the element to which this target will navigate | |
| 35 */ | |
| 36 String get elementId; | |
| 37 | |
| 38 /** | |
| 39 * Return the length of the region to which the target will navigate. | |
| 40 * | |
| 41 * @return the length of the region to which the target will navigate | |
| 42 */ | |
| 43 int get length; | |
| 44 | |
| 45 /** | |
| 46 * Return the offset to the region to which the target will navigate. | |
| 47 * | |
| 48 * @return the offset to the region to which the target will navigate | |
| 49 */ | |
| 50 int get offset; | |
| 51 | |
| 52 /** | |
| 53 * Return the source containing the element to which this target will navigate
. | |
| 54 * | |
| 55 * @return the source containing the element to which this target will navigat
e | |
| 56 */ | |
| 57 Source get source; | |
| 58 } | |
| 59 | |
| 60 /** | |
| 61 * The enumeration `OutlineKind` defines the various kinds of [Outline] items. | |
| 62 */ | |
| 63 class OutlineKind extends Enum<OutlineKind> { | |
| 64 static const OutlineKind CLASS = const OutlineKind('CLASS', 0); | |
| 65 | |
| 66 static const OutlineKind CLASS_TYPE_ALIAS = const OutlineKind('CLASS_TYPE_ALIA
S', 1); | |
| 67 | |
| 68 static const OutlineKind CONSTRUCTOR = const OutlineKind('CONSTRUCTOR', 2); | |
| 69 | |
| 70 static const OutlineKind GETTER = const OutlineKind('GETTER', 3); | |
| 71 | |
| 72 static const OutlineKind FIELD = const OutlineKind('FIELD', 4); | |
| 73 | |
| 74 static const OutlineKind FUNCTION = const OutlineKind('FUNCTION', 5); | |
| 75 | |
| 76 static const OutlineKind FUNCTION_TYPE_ALIAS = const OutlineKind('FUNCTION_TYP
E_ALIAS', 6); | |
| 77 | |
| 78 static const OutlineKind METHOD = const OutlineKind('METHOD', 7); | |
| 79 | |
| 80 static const OutlineKind SETTER = const OutlineKind('SETTER', 8); | |
| 81 | |
| 82 static const OutlineKind TOP_LEVEL_VARIABLE = const OutlineKind('TOP_LEVEL_VAR
IABLE', 9); | |
| 83 | |
| 84 static const OutlineKind COMPILATION_UNIT = const OutlineKind('COMPILATION_UNI
T', 10); | |
| 85 | |
| 86 static const List<OutlineKind> values = const [ | |
| 87 CLASS, | |
| 88 CLASS_TYPE_ALIAS, | |
| 89 CONSTRUCTOR, | |
| 90 GETTER, | |
| 91 FIELD, | |
| 92 FUNCTION, | |
| 93 FUNCTION_TYPE_ALIAS, | |
| 94 METHOD, | |
| 95 SETTER, | |
| 96 TOP_LEVEL_VARIABLE, | |
| 97 COMPILATION_UNIT]; | |
| 98 | |
| 99 const OutlineKind(String name, int ordinal) : super(name, ordinal); | |
| 100 } | |
| 101 | |
| 102 /** | |
| 103 * The interface `SourceSet` defines the behavior of objects that represent a se
t of | |
| 104 * [Source]s. | |
| 105 */ | |
| 106 abstract class SourceSet { | |
| 107 /** | |
| 108 * An instance of [SourceSet] for [SourceSetKind#ALL]. | |
| 109 */ | |
| 110 static final SourceSet ALL = new _ImplicitSourceSet(SourceSetKind.ALL); | |
| 111 | |
| 112 /** | |
| 113 * An instance of [SourceSet] for [SourceSetKind#NON_SDK]. | |
| 114 */ | |
| 115 static final SourceSet NON_SDK = new _ImplicitSourceSet(SourceSetKind.NON_SDK)
; | |
| 116 | |
| 117 /** | |
| 118 * An instance of [SourceSet] for [SourceSetKind#EXPLICITLY_ADDED]. | |
| 119 */ | |
| 120 static final SourceSet EXPLICITLY_ADDED = new _ImplicitSourceSet(SourceSetKind
.EXPLICITLY_ADDED); | |
| 121 | |
| 122 /** | |
| 123 * Return the kind of the this source set. | |
| 124 */ | |
| 125 SourceSetKind get kind; | |
| 126 | |
| 127 /** | |
| 128 * Returns [Source]s that belong to this source set, if [SourceSetKind#LIST] i
s used; | |
| 129 * an empty array otherwise. | |
| 130 */ | |
| 131 List<Source> get sources; | |
| 132 } | |
| 133 | |
| 134 /** | |
| 135 * The enumeration `SourceSetKind` defines the kinds of [SourceSet]s. | |
| 136 */ | |
| 137 class SourceSetKind extends Enum<SourceSetKind> { | |
| 138 static const SourceSetKind ALL = const SourceSetKind('ALL', 0); | |
| 139 | |
| 140 static const SourceSetKind NON_SDK = const SourceSetKind('NON_SDK', 1); | |
| 141 | |
| 142 static const SourceSetKind EXPLICITLY_ADDED = const SourceSetKind('EXPLICITLY_
ADDED', 2); | |
| 143 | |
| 144 static const SourceSetKind LIST = const SourceSetKind('LIST', 3); | |
| 145 | |
| 146 static const List<SourceSetKind> values = const [ALL, NON_SDK, EXPLICITLY_ADDE
D, LIST]; | |
| 147 | |
| 148 const SourceSetKind(String name, int ordinal) : super(name, ordinal); | |
| 149 } | |
| 150 | |
| 151 /** | |
| 152 * The interface `SourceRegion` defines the behavior of objects representing a r
ange of | |
| 153 * characters within a [Source]. | |
| 154 */ | |
| 155 abstract class SourceRegion { | |
| 156 /** | |
| 157 * Check if <code>x</code> is in [offset, offset + length] interval. | |
| 158 */ | |
| 159 bool containsInclusive(int x); | |
| 160 | |
| 161 /** | |
| 162 * Return the length of the region. | |
| 163 * | |
| 164 * @return the length of the region | |
| 165 */ | |
| 166 int get length; | |
| 167 | |
| 168 /** | |
| 169 * Return the offset to the beginning of the region. | |
| 170 * | |
| 171 * @return the offset to the beginning of the region | |
| 172 */ | |
| 173 int get offset; | |
| 174 } | |
| 175 | |
| 176 /** | |
| 177 * The enumeration `NotificationKind` defines the kinds of notification clients
may subscribe | |
| 178 * for. | |
| 179 */ | |
| 180 class NotificationKind extends Enum<NotificationKind> { | |
| 181 static const NotificationKind ERRORS = const NotificationKind('ERRORS', 0); | |
| 182 | |
| 183 static const NotificationKind HIGHLIGHTS = const NotificationKind('HIGHLIGHTS'
, 1); | |
| 184 | |
| 185 static const NotificationKind NAVIGATION = const NotificationKind('NAVIGATION'
, 2); | |
| 186 | |
| 187 static const NotificationKind OUTLINE = const NotificationKind('OUTLINE', 3); | |
| 188 | |
| 189 static const List<NotificationKind> values = const [ERRORS, HIGHLIGHTS, NAVIGA
TION, OUTLINE]; | |
| 190 | |
| 191 const NotificationKind(String name, int ordinal) : super(name, ordinal); | |
| 192 } | |
| 193 | |
| 194 /** | |
| 195 * A [SourceSetKind#LIST] implementation of [SourceSet]. | |
| 196 */ | |
| 197 class ListSourceSet implements SourceSet { | |
| 198 /** | |
| 199 * Creates a new list-based [SourceSet] instance. | |
| 200 */ | |
| 201 static SourceSet create(Iterable<Source> sourceCollection) { | |
| 202 List<Source> sources = new List.from(sourceCollection); | |
| 203 return new ListSourceSet(sources); | |
| 204 } | |
| 205 | |
| 206 /** | |
| 207 * Creates a new list-based [SourceSet] instance. | |
| 208 */ | |
| 209 static SourceSet create2(List<Source> sources) => new ListSourceSet(sources); | |
| 210 | |
| 211 final List<Source> sources; | |
| 212 | |
| 213 ListSourceSet(this.sources); | |
| 214 | |
| 215 @override | |
| 216 SourceSetKind get kind => SourceSetKind.LIST; | |
| 217 | |
| 218 @override | |
| 219 String toString() => "[${StringUtils.join(sources, ", ")}]"; | |
| 220 } | |
| 221 | |
| 222 /** | |
| 223 * The interface `NavigationRegion` defines the behavior of objects representing
a list of | |
| 224 * elements with which a source region is associated. | |
| 225 */ | |
| 226 abstract class NavigationRegion implements SourceRegion { | |
| 227 /** | |
| 228 * An empty array of navigation regions. | |
| 229 */ | |
| 230 static final List<NavigationRegion> EMPTY_ARRAY = new List<NavigationRegion>(0
); | |
| 231 | |
| 232 /** | |
| 233 * Return the identifiers of the elements associated with the region. | |
| 234 * | |
| 235 * @return the identifiers of the elements associated with the region | |
| 236 */ | |
| 237 List<NavigationTarget> get targets; | |
| 238 } | |
| 239 | |
| 240 /** | |
| 241 * An implementation of [SourceSet] for some [SourceSetKind]. | |
| 242 */ | |
| 243 class _ImplicitSourceSet implements SourceSet { | |
| 244 final SourceSetKind kind; | |
| 245 | |
| 246 _ImplicitSourceSet(this.kind); | |
| 247 | |
| 248 @override | |
| 249 List<Source> get sources => Source.EMPTY_ARRAY; | |
| 250 | |
| 251 @override | |
| 252 String toString() => kind.toString(); | |
| 253 } | |
| 254 | |
| 255 /** | |
| 256 * The enumeration `HighlightType` defines the kinds of highlighting that can be
associated | 27 * The enumeration `HighlightType` defines the kinds of highlighting that can be
associated |
| 257 * with a region of text. | 28 * with a region of text. |
| 258 */ | 29 */ |
| 259 class HighlightType extends Enum<HighlightType> { | 30 class HighlightType extends Enum<HighlightType> { |
| 260 static const HighlightType ANNOTATION = const HighlightType('ANNOTATION', 0); | 31 static const HighlightType ANNOTATION = const HighlightType('ANNOTATION', 0); |
| 261 | 32 |
| 262 static const HighlightType BUILT_IN = const HighlightType('BUILT_IN', 1); | 33 static const HighlightType BUILT_IN = const HighlightType('BUILT_IN', 1); |
| 263 | 34 |
| 264 static const HighlightType CLASS = const HighlightType('CLASS', 2); | 35 static const HighlightType CLASS = const HighlightType('CLASS', 2); |
| 265 | 36 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 PARAMETER, | 132 PARAMETER, |
| 362 SETTER_DECLARATION, | 133 SETTER_DECLARATION, |
| 363 TOP_LEVEL_VARIABLE, | 134 TOP_LEVEL_VARIABLE, |
| 364 TYPE_NAME_DYNAMIC, | 135 TYPE_NAME_DYNAMIC, |
| 365 TYPE_PARAMETER]; | 136 TYPE_PARAMETER]; |
| 366 | 137 |
| 367 const HighlightType(String name, int ordinal) : super(name, ordinal); | 138 const HighlightType(String name, int ordinal) : super(name, ordinal); |
| 368 } | 139 } |
| 369 | 140 |
| 370 /** | 141 /** |
| 142 * A [SourceSetKind#LIST] implementation of [SourceSet]. |
| 143 */ |
| 144 class ListSourceSet implements SourceSet { |
| 145 /** |
| 146 * Creates a new list-based [SourceSet] instance. |
| 147 */ |
| 148 static SourceSet create(Iterable<Source> sourceCollection) { |
| 149 List<Source> sources = new List.from(sourceCollection); |
| 150 return new ListSourceSet(sources); |
| 151 } |
| 152 |
| 153 /** |
| 154 * Creates a new list-based [SourceSet] instance. |
| 155 */ |
| 156 static SourceSet create2(List<Source> sources) => new ListSourceSet(sources); |
| 157 |
| 158 final List<Source> sources; |
| 159 |
| 160 ListSourceSet(this.sources); |
| 161 |
| 162 @override |
| 163 SourceSetKind get kind => SourceSetKind.LIST; |
| 164 |
| 165 @override |
| 166 String toString() => "[${StringUtils.join(sources, ", ")}]"; |
| 167 } |
| 168 |
| 169 /** |
| 170 * The interface `NavigationRegion` defines the behavior of objects representing
a list of |
| 171 * elements with which a source region is associated. |
| 172 */ |
| 173 abstract class NavigationRegion implements SourceRegion { |
| 174 /** |
| 175 * An empty array of navigation regions. |
| 176 */ |
| 177 static final List<NavigationRegion> EMPTY_ARRAY = new List<NavigationRegion>(0
); |
| 178 |
| 179 /** |
| 180 * Return the identifiers of the elements associated with the region. |
| 181 * |
| 182 * @return the identifiers of the elements associated with the region |
| 183 */ |
| 184 List<NavigationTarget> get targets; |
| 185 } |
| 186 |
| 187 /** |
| 188 * The interface `NavigationTarget` defines the behavior of objects that provide
information |
| 189 * about the target of a navigation region. |
| 190 */ |
| 191 abstract class NavigationTarget { |
| 192 /** |
| 193 * Return the id of the element to which this target will navigate. |
| 194 * |
| 195 * @return the id of the element to which this target will navigate |
| 196 */ |
| 197 String get elementId; |
| 198 |
| 199 /** |
| 200 * Return the length of the region to which the target will navigate. |
| 201 * |
| 202 * @return the length of the region to which the target will navigate |
| 203 */ |
| 204 int get length; |
| 205 |
| 206 /** |
| 207 * Return the offset to the region to which the target will navigate. |
| 208 * |
| 209 * @return the offset to the region to which the target will navigate |
| 210 */ |
| 211 int get offset; |
| 212 |
| 213 /** |
| 214 * Return the source containing the element to which this target will navigate
. |
| 215 * |
| 216 * @return the source containing the element to which this target will navigat
e |
| 217 */ |
| 218 Source get source; |
| 219 } |
| 220 |
| 221 /** |
| 222 * The enumeration `NotificationKind` defines the kinds of notification clients
may subscribe |
| 223 * for. |
| 224 */ |
| 225 class NotificationKind extends Enum<NotificationKind> { |
| 226 static const NotificationKind ERRORS = const NotificationKind('ERRORS', 0); |
| 227 |
| 228 static const NotificationKind HIGHLIGHTS = const NotificationKind('HIGHLIGHTS'
, 1); |
| 229 |
| 230 static const NotificationKind NAVIGATION = const NotificationKind('NAVIGATION'
, 2); |
| 231 |
| 232 static const NotificationKind OUTLINE = const NotificationKind('OUTLINE', 3); |
| 233 |
| 234 static const List<NotificationKind> values = const [ERRORS, HIGHLIGHTS, NAVIGA
TION, OUTLINE]; |
| 235 |
| 236 const NotificationKind(String name, int ordinal) : super(name, ordinal); |
| 237 } |
| 238 |
| 239 /** |
| 371 * The interface `Outline` defines the behavior of objects that represent an out
line for a | 240 * The interface `Outline` defines the behavior of objects that represent an out
line for a |
| 372 * single source. | 241 * single source. |
| 373 */ | 242 */ |
| 374 abstract class Outline { | 243 abstract class Outline { |
| 375 /** | 244 /** |
| 376 * An empty array of outlines. | 245 * An empty array of outlines. |
| 377 */ | 246 */ |
| 378 static final List<Outline> EMPTY_ARRAY = new List<Outline>(0); | 247 static final List<Outline> EMPTY_ARRAY = new List<Outline>(0); |
| 379 | 248 |
| 380 /** | 249 /** |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 * @return `true` if the element is private | 328 * @return `true` if the element is private |
| 460 */ | 329 */ |
| 461 bool get isPrivate; | 330 bool get isPrivate; |
| 462 | 331 |
| 463 /** | 332 /** |
| 464 * Return `true` if the element is a class member and is a static element. | 333 * Return `true` if the element is a class member and is a static element. |
| 465 * | 334 * |
| 466 * @return `true` if the element is a static element | 335 * @return `true` if the element is a static element |
| 467 */ | 336 */ |
| 468 bool get isStatic; | 337 bool get isStatic; |
| 338 } |
| 339 |
| 340 /** |
| 341 * The enumeration `OutlineKind` defines the various kinds of [Outline] items. |
| 342 */ |
| 343 class OutlineKind extends Enum<OutlineKind> { |
| 344 static const OutlineKind CLASS = const OutlineKind('CLASS', 0); |
| 345 |
| 346 static const OutlineKind CLASS_TYPE_ALIAS = const OutlineKind('CLASS_TYPE_ALIA
S', 1); |
| 347 |
| 348 static const OutlineKind CONSTRUCTOR = const OutlineKind('CONSTRUCTOR', 2); |
| 349 |
| 350 static const OutlineKind GETTER = const OutlineKind('GETTER', 3); |
| 351 |
| 352 static const OutlineKind FIELD = const OutlineKind('FIELD', 4); |
| 353 |
| 354 static const OutlineKind FUNCTION = const OutlineKind('FUNCTION', 5); |
| 355 |
| 356 static const OutlineKind FUNCTION_TYPE_ALIAS = const OutlineKind('FUNCTION_TYP
E_ALIAS', 6); |
| 357 |
| 358 static const OutlineKind METHOD = const OutlineKind('METHOD', 7); |
| 359 |
| 360 static const OutlineKind SETTER = const OutlineKind('SETTER', 8); |
| 361 |
| 362 static const OutlineKind TOP_LEVEL_VARIABLE = const OutlineKind('TOP_LEVEL_VAR
IABLE', 9); |
| 363 |
| 364 static const OutlineKind COMPILATION_UNIT = const OutlineKind('COMPILATION_UNI
T', 10); |
| 365 |
| 366 static const List<OutlineKind> values = const [ |
| 367 CLASS, |
| 368 CLASS_TYPE_ALIAS, |
| 369 CONSTRUCTOR, |
| 370 GETTER, |
| 371 FIELD, |
| 372 FUNCTION, |
| 373 FUNCTION_TYPE_ALIAS, |
| 374 METHOD, |
| 375 SETTER, |
| 376 TOP_LEVEL_VARIABLE, |
| 377 COMPILATION_UNIT]; |
| 378 |
| 379 const OutlineKind(String name, int ordinal) : super(name, ordinal); |
| 380 } |
| 381 |
| 382 /** |
| 383 * The interface `SourceRegion` defines the behavior of objects representing a r
ange of |
| 384 * characters within a [Source]. |
| 385 */ |
| 386 abstract class SourceRegion { |
| 387 /** |
| 388 * Check if <code>x</code> is in [offset, offset + length] interval. |
| 389 */ |
| 390 bool containsInclusive(int x); |
| 391 |
| 392 /** |
| 393 * Return the length of the region. |
| 394 * |
| 395 * @return the length of the region |
| 396 */ |
| 397 int get length; |
| 398 |
| 399 /** |
| 400 * Return the offset to the beginning of the region. |
| 401 * |
| 402 * @return the offset to the beginning of the region |
| 403 */ |
| 404 int get offset; |
| 405 } |
| 406 |
| 407 /** |
| 408 * The interface `SourceSet` defines the behavior of objects that represent a se
t of |
| 409 * [Source]s. |
| 410 */ |
| 411 abstract class SourceSet { |
| 412 /** |
| 413 * An instance of [SourceSet] for [SourceSetKind#ALL]. |
| 414 */ |
| 415 static final SourceSet ALL = new _ImplicitSourceSet(SourceSetKind.ALL); |
| 416 |
| 417 /** |
| 418 * An instance of [SourceSet] for [SourceSetKind#NON_SDK]. |
| 419 */ |
| 420 static final SourceSet NON_SDK = new _ImplicitSourceSet(SourceSetKind.NON_SDK)
; |
| 421 |
| 422 /** |
| 423 * An instance of [SourceSet] for [SourceSetKind#EXPLICITLY_ADDED]. |
| 424 */ |
| 425 static final SourceSet EXPLICITLY_ADDED = new _ImplicitSourceSet(SourceSetKind
.EXPLICITLY_ADDED); |
| 426 |
| 427 /** |
| 428 * Return the kind of the this source set. |
| 429 */ |
| 430 SourceSetKind get kind; |
| 431 |
| 432 /** |
| 433 * Returns [Source]s that belong to this source set, if [SourceSetKind#LIST] i
s used; |
| 434 * an empty array otherwise. |
| 435 */ |
| 436 List<Source> get sources; |
| 437 } |
| 438 |
| 439 /** |
| 440 * The enumeration `SourceSetKind` defines the kinds of [SourceSet]s. |
| 441 */ |
| 442 class SourceSetKind extends Enum<SourceSetKind> { |
| 443 static const SourceSetKind ALL = const SourceSetKind('ALL', 0); |
| 444 |
| 445 static const SourceSetKind NON_SDK = const SourceSetKind('NON_SDK', 1); |
| 446 |
| 447 static const SourceSetKind EXPLICITLY_ADDED = const SourceSetKind('EXPLICITLY_
ADDED', 2); |
| 448 |
| 449 static const SourceSetKind LIST = const SourceSetKind('LIST', 3); |
| 450 |
| 451 static const List<SourceSetKind> values = const [ALL, NON_SDK, EXPLICITLY_ADDE
D, LIST]; |
| 452 |
| 453 const SourceSetKind(String name, int ordinal) : super(name, ordinal); |
| 454 } |
| 455 |
| 456 /** |
| 457 * An implementation of [SourceSet] for some [SourceSetKind]. |
| 458 */ |
| 459 class _ImplicitSourceSet implements SourceSet { |
| 460 final SourceSetKind kind; |
| 461 |
| 462 _ImplicitSourceSet(this.kind); |
| 463 |
| 464 @override |
| 465 List<Source> get sources => Source.EMPTY_ARRAY; |
| 466 |
| 467 @override |
| 468 String toString() => kind.toString(); |
| 469 } | 469 } |
| OLD | NEW |