| 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, StringUtils; | 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 `Element` defines the behavior of objects that represent an inf
ormation for |
| 15 * an element. |
| 16 */ |
| 17 abstract class Element { |
| 18 /** |
| 19 * An empty array of elements. |
| 20 */ |
| 21 static final List<Element> EMPTY_ARRAY = new List<Element>(0); |
| 22 |
| 23 /** |
| 24 * Return the id of the element, may be `null` if there is no resolution infor
mation |
| 25 * associated with this element. |
| 26 * |
| 27 * @return the id of the element |
| 28 */ |
| 29 String get id; |
| 30 |
| 31 /** |
| 32 * Return the kind of the element. |
| 33 * |
| 34 * @return the kind of the element |
| 35 */ |
| 36 ElementKind get kind; |
| 37 |
| 38 /** |
| 39 * Return the length of the element's name. |
| 40 * |
| 41 * @return the length of the element's name |
| 42 */ |
| 43 int get length; |
| 44 |
| 45 /** |
| 46 * Return the name of the element. |
| 47 * |
| 48 * @return the name of the element |
| 49 */ |
| 50 String get name; |
| 51 |
| 52 /** |
| 53 * Return the offset to the beginning of the element's name. |
| 54 * |
| 55 * @return the offset to the beginning of the element's name |
| 56 */ |
| 57 int get offset; |
| 58 |
| 59 /** |
| 60 * Return the parameter list for the element, or `null` if the element is not
a constructor, |
| 61 * method or function. If the element has zero arguments, the string `"()"` wi
ll be |
| 62 * returned. |
| 63 * |
| 64 * @return the parameter list for the element |
| 65 */ |
| 66 String get parameters; |
| 67 |
| 68 /** |
| 69 * Return the return type of the element, or `null` if the element is not a me
thod or |
| 70 * function. If the element does not have a declared return type then an empty
string will be |
| 71 * returned. |
| 72 * |
| 73 * @return the return type of the element |
| 74 */ |
| 75 String get returnType; |
| 76 |
| 77 /** |
| 78 * Return the source containing the element, not `null`. |
| 79 * |
| 80 * @return the source containing the element |
| 81 */ |
| 82 Source get source; |
| 83 |
| 84 /** |
| 85 * Return `true` if the element is abstract. |
| 86 * |
| 87 * @return `true` if the element is abstract |
| 88 */ |
| 89 bool get isAbstract; |
| 90 |
| 91 /** |
| 92 * Return `true` if the element is private. |
| 93 * |
| 94 * @return `true` if the element is private |
| 95 */ |
| 96 bool get isPrivate; |
| 97 |
| 98 /** |
| 99 * Return `true` if the element is a class member and is a static element. |
| 100 * |
| 101 * @return `true` if the element is a static element |
| 102 */ |
| 103 bool get isStatic; |
| 104 } |
| 105 |
| 106 /** |
| 107 * The enumeration `ElementKind` defines the various kinds of [Element]s. |
| 108 */ |
| 109 class ElementKind extends Enum<ElementKind> { |
| 110 static const ElementKind CLASS = const ElementKind('CLASS', 0); |
| 111 |
| 112 static const ElementKind CLASS_TYPE_ALIAS = const ElementKind('CLASS_TYPE_ALIA
S', 1); |
| 113 |
| 114 static const ElementKind COMPILATION_UNIT = const ElementKind('COMPILATION_UNI
T', 2); |
| 115 |
| 116 static const ElementKind CONSTRUCTOR = const ElementKind('CONSTRUCTOR', 3); |
| 117 |
| 118 static const ElementKind GETTER = const ElementKind('GETTER', 4); |
| 119 |
| 120 static const ElementKind FIELD = const ElementKind('FIELD', 5); |
| 121 |
| 122 static const ElementKind FUNCTION = const ElementKind('FUNCTION', 6); |
| 123 |
| 124 static const ElementKind FUNCTION_TYPE_ALIAS = const ElementKind('FUNCTION_TYP
E_ALIAS', 7); |
| 125 |
| 126 static const ElementKind LIBRARY = const ElementKind('LIBRARY', 8); |
| 127 |
| 128 static const ElementKind METHOD = const ElementKind('METHOD', 9); |
| 129 |
| 130 static const ElementKind SETTER = const ElementKind('SETTER', 10); |
| 131 |
| 132 static const ElementKind TOP_LEVEL_VARIABLE = const ElementKind('TOP_LEVEL_VAR
IABLE', 11); |
| 133 |
| 134 static const ElementKind UNKNOWN = const ElementKind('UNKNOWN', 12); |
| 135 |
| 136 static const ElementKind UNIT_TEST_CASE = const ElementKind('UNIT_TEST_CASE',
13); |
| 137 |
| 138 static const ElementKind UNIT_TEST_GROUP = const ElementKind('UNIT_TEST_GROUP'
, 14); |
| 139 |
| 140 static const List<ElementKind> values = const [ |
| 141 CLASS, |
| 142 CLASS_TYPE_ALIAS, |
| 143 COMPILATION_UNIT, |
| 144 CONSTRUCTOR, |
| 145 GETTER, |
| 146 FIELD, |
| 147 FUNCTION, |
| 148 FUNCTION_TYPE_ALIAS, |
| 149 LIBRARY, |
| 150 METHOD, |
| 151 SETTER, |
| 152 TOP_LEVEL_VARIABLE, |
| 153 UNKNOWN, |
| 154 UNIT_TEST_CASE, |
| 155 UNIT_TEST_GROUP]; |
| 156 |
| 157 const ElementKind(String name, int ordinal) : super(name, ordinal); |
| 158 } |
| 159 |
| 160 /** |
| 14 * The interface `HighlightRegion` defines the behavior of objects representing
a particular | 161 * The interface `HighlightRegion` defines the behavior of objects representing
a particular |
| 15 * syntactic or semantic meaning associated with a source region. | 162 * syntactic or semantic meaning associated with a source region. |
| 16 */ | 163 */ |
| 17 abstract class HighlightRegion implements SourceRegion { | 164 abstract class HighlightRegion implements SourceRegion { |
| 18 /** | 165 /** |
| 19 * Return the type of highlight associated with the region. | 166 * Return the type of highlight associated with the region. |
| 20 * | 167 * |
| 21 * @return the type of highlight associated with the region | 168 * @return the type of highlight associated with the region |
| 22 */ | 169 */ |
| 23 HighlightType get type; | 170 HighlightType get type; |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 ListSourceSet(this.sources); | 307 ListSourceSet(this.sources); |
| 161 | 308 |
| 162 @override | 309 @override |
| 163 SourceSetKind get kind => SourceSetKind.LIST; | 310 SourceSetKind get kind => SourceSetKind.LIST; |
| 164 | 311 |
| 165 @override | 312 @override |
| 166 String toString() => "[${StringUtils.join(sources, ", ")}]"; | 313 String toString() => "[${StringUtils.join(sources, ", ")}]"; |
| 167 } | 314 } |
| 168 | 315 |
| 169 /** | 316 /** |
| 317 * The interface `MinorRefactoringsConsumer` defines the behavior of objects tha
t consume |
| 318 * minor refactorings [CorrectionProposal]s. |
| 319 */ |
| 320 abstract class MinorRefactoringsConsumer { |
| 321 /** |
| 322 * A set [CorrectionProposal]s have been computed. |
| 323 * |
| 324 * @param proposals an array of computed [CorrectionProposal]s |
| 325 * @param isLastResult is `true` if this is the last set of results |
| 326 */ |
| 327 void computedProposals(List<CorrectionProposal> proposals, bool isLastResult); |
| 328 } |
| 329 |
| 330 /** |
| 170 * The interface `NavigationRegion` defines the behavior of objects representing
a list of | 331 * The interface `NavigationRegion` defines the behavior of objects representing
a list of |
| 171 * elements with which a source region is associated. | 332 * elements with which a source region is associated. |
| 172 */ | 333 */ |
| 173 abstract class NavigationRegion implements SourceRegion { | 334 abstract class NavigationRegion implements SourceRegion { |
| 174 /** | 335 /** |
| 175 * An empty array of navigation regions. | 336 * An empty array of navigation regions. |
| 176 */ | 337 */ |
| 177 static final List<NavigationRegion> EMPTY_ARRAY = new List<NavigationRegion>(0
); | 338 static final List<NavigationRegion> EMPTY_ARRAY = new List<NavigationRegion>(0
); |
| 178 | 339 |
| 179 /** | 340 /** |
| 180 * Return the identifiers of the elements associated with the region. | 341 * Return the elements associated with the region. |
| 181 * | 342 * |
| 182 * @return the identifiers of the elements associated with the region | 343 * @return the elements associated with the region |
| 183 */ | 344 */ |
| 184 List<NavigationTarget> get targets; | 345 List<Element> get targets; |
| 185 } | 346 } |
| 186 | 347 |
| 187 /** | 348 /** |
| 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 | 349 * The enumeration `NotificationKind` defines the kinds of notification clients
may subscribe |
| 223 * for. | 350 * for. |
| 224 */ | 351 */ |
| 225 class NotificationKind extends Enum<NotificationKind> { | 352 class NotificationKind extends Enum<NotificationKind> { |
| 226 static const NotificationKind ERRORS = const NotificationKind('ERRORS', 0); | 353 static const NotificationKind ERRORS = const NotificationKind('ERRORS', 0); |
| 227 | 354 |
| 228 static const NotificationKind HIGHLIGHTS = const NotificationKind('HIGHLIGHTS'
, 1); | 355 static const NotificationKind HIGHLIGHTS = const NotificationKind('HIGHLIGHTS'
, 1); |
| 229 | 356 |
| 230 static const NotificationKind NAVIGATION = const NotificationKind('NAVIGATION'
, 2); | 357 static const NotificationKind NAVIGATION = const NotificationKind('NAVIGATION'
, 2); |
| 231 | 358 |
| 232 static const NotificationKind OUTLINE = const NotificationKind('OUTLINE', 3); | 359 static const NotificationKind OUTLINE = const NotificationKind('OUTLINE', 3); |
| 233 | 360 |
| 234 static const List<NotificationKind> values = const [ERRORS, HIGHLIGHTS, NAVIGA
TION, OUTLINE]; | 361 static const List<NotificationKind> values = const [ERRORS, HIGHLIGHTS, NAVIGA
TION, OUTLINE]; |
| 235 | 362 |
| 236 const NotificationKind(String name, int ordinal) : super(name, ordinal); | 363 const NotificationKind(String name, int ordinal) : super(name, ordinal); |
| 237 } | 364 } |
| 238 | 365 |
| 239 /** | 366 /** |
| 240 * The interface `Outline` defines the behavior of objects that represent an out
line for a | 367 * The interface `Outline` defines the behavior of objects that represent an out
line for an |
| 241 * single source. | 368 * element. |
| 242 */ | 369 */ |
| 243 abstract class Outline { | 370 abstract class Outline { |
| 244 /** | 371 /** |
| 245 * An empty array of outlines. | 372 * An empty array of outlines. |
| 246 */ | 373 */ |
| 247 static final List<Outline> EMPTY_ARRAY = new List<Outline>(0); | 374 static final List<Outline> EMPTY_ARRAY = new List<Outline>(0); |
| 248 | 375 |
| 249 /** | 376 /** |
| 250 * Return an array containing the children of the element. The array will be e
mpty if the element | 377 * Return an array containing the children outline. The array will be empty if
the outline has no |
| 251 * has no children. | 378 * children. |
| 252 * | 379 * |
| 253 * @return an array containing the children of the element | 380 * @return an array containing the children of the element |
| 254 */ | 381 */ |
| 255 List<Outline> get children; | 382 List<Outline> get children; |
| 256 | 383 |
| 257 /** | 384 /** |
| 258 * Return the kind of the element. | 385 * Return the information about the element. |
| 259 * | 386 * |
| 260 * @return the kind of the element | 387 * @return the information about the element |
| 261 */ | 388 */ |
| 262 OutlineKind get kind; | 389 Element get element; |
| 263 | |
| 264 /** | |
| 265 * Return the length of the element's name. | |
| 266 * | |
| 267 * @return the length of the element's name | |
| 268 */ | |
| 269 int get length; | |
| 270 | |
| 271 /** | |
| 272 * Return the name of the element. | |
| 273 * | |
| 274 * @return the name of the element | |
| 275 */ | |
| 276 String get name; | |
| 277 | |
| 278 /** | |
| 279 * Return the offset to the beginning of the element's name. | |
| 280 * | |
| 281 * @return the offset to the beginning of the element's name | |
| 282 */ | |
| 283 int get offset; | |
| 284 | |
| 285 /** | |
| 286 * Return the parameter list for the element, or `null` if the element is not
a constructor, | |
| 287 * method or function. If the element has zero arguments, the string `"()"` wi
ll be | |
| 288 * returned. | |
| 289 * | |
| 290 * @return the parameter list for the element | |
| 291 */ | |
| 292 String get parameters; | |
| 293 | 390 |
| 294 /** | 391 /** |
| 295 * Return the outline that either physically or logically encloses this outlin
e. This will be | 392 * Return the outline that either physically or logically encloses this outlin
e. This will be |
| 296 * `null` if this outline is a unit outline. | 393 * `null` if this outline is a unit outline. |
| 297 * | 394 * |
| 298 * @return the outline that encloses this outline | 395 * @return the outline that encloses this outline |
| 299 */ | 396 */ |
| 300 Outline get parent; | 397 Outline get parent; |
| 301 | 398 |
| 302 /** | 399 /** |
| 303 * Return the return type of the element, or `null` if the element is not a me
thod or | 400 * Return the source range associated with this outline. |
| 304 * function. If the element does not have a declared return type then an empty
string will be | |
| 305 * returned. | |
| 306 * | 401 * |
| 307 * @return the return type of the element | 402 * @return the source range associated with this outline |
| 308 */ | |
| 309 String get returnType; | |
| 310 | |
| 311 /** | |
| 312 * Return the element's source range. | |
| 313 * | |
| 314 * @return the element's source range | |
| 315 */ | 403 */ |
| 316 SourceRegion get sourceRegion; | 404 SourceRegion get sourceRegion; |
| 317 | |
| 318 /** | |
| 319 * Return `true` if the element is abstract. | |
| 320 * | |
| 321 * @return `true` if the element is abstract | |
| 322 */ | |
| 323 bool get isAbstract; | |
| 324 | |
| 325 /** | |
| 326 * Return `true` if the element is private. | |
| 327 * | |
| 328 * @return `true` if the element is private | |
| 329 */ | |
| 330 bool get isPrivate; | |
| 331 | |
| 332 /** | |
| 333 * Return `true` if the element is a class member and is a static element. | |
| 334 * | |
| 335 * @return `true` if the element is a static element | |
| 336 */ | |
| 337 bool get isStatic; | |
| 338 } | 405 } |
| 339 | 406 |
| 340 /** | 407 /** |
| 341 * The enumeration `OutlineKind` defines the various kinds of [Outline] items. | 408 * The interface `SearchResult` defines the behavior of objects that represent a
search |
| 409 * result. |
| 342 */ | 410 */ |
| 343 class OutlineKind extends Enum<OutlineKind> { | 411 abstract class SearchResult { |
| 344 static const OutlineKind CLASS = const OutlineKind('CLASS', 0); | 412 /** |
| 413 * An empty array of [SearchResult]s. |
| 414 */ |
| 415 static final List<SearchResult> EMPTY_ARRAY = new List<SearchResult>(0); |
| 345 | 416 |
| 346 static const OutlineKind CLASS_TYPE_ALIAS = const OutlineKind('CLASS_TYPE_ALIA
S', 1); | 417 /** |
| 418 * Return the kind to this result. |
| 419 * |
| 420 * @return the kind of this result |
| 421 */ |
| 422 SearchResultKind get kind; |
| 347 | 423 |
| 348 static const OutlineKind CONSTRUCTOR = const OutlineKind('CONSTRUCTOR', 2); | 424 /** |
| 425 * Return the length of the result. |
| 426 * |
| 427 * @return the length of the result |
| 428 */ |
| 429 int get length; |
| 349 | 430 |
| 350 static const OutlineKind GETTER = const OutlineKind('GETTER', 3); | 431 /** |
| 432 * Return the offset to the beginning of the result in [getSource]. |
| 433 * |
| 434 * @return the offset to the beginning of the result |
| 435 */ |
| 436 int get offset; |
| 351 | 437 |
| 352 static const OutlineKind FIELD = const OutlineKind('FIELD', 4); | 438 /** |
| 439 * Return the path to this result starting with the element that encloses it,
then for its |
| 440 * enclosing element, etc up to the library. |
| 441 * |
| 442 * @return the path to this result |
| 443 */ |
| 444 List<Element> get path; |
| 353 | 445 |
| 354 static const OutlineKind FUNCTION = const OutlineKind('FUNCTION', 5); | 446 /** |
| 355 | 447 * Return the source containing the result. |
| 356 static const OutlineKind FUNCTION_TYPE_ALIAS = const OutlineKind('FUNCTION_TYP
E_ALIAS', 6); | 448 * |
| 357 | 449 * @return the source containing the result |
| 358 static const OutlineKind METHOD = const OutlineKind('METHOD', 7); | 450 */ |
| 359 | 451 Source get source; |
| 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 } | 452 } |
| 381 | 453 |
| 382 /** | 454 /** |
| 455 * The enumeration `SearchResultKind` defines the various kinds of [SearchResult
]. |
| 456 */ |
| 457 class SearchResultKind extends Enum<SearchResultKind> { |
| 458 /** |
| 459 * A reference to a constructor. |
| 460 */ |
| 461 static const SearchResultKind CONSTRUCTOR_REFERENCE = const SearchResultKind('
CONSTRUCTOR_REFERENCE', 0); |
| 462 |
| 463 /** |
| 464 * A reference to a field (from field formal parameter). |
| 465 */ |
| 466 static const SearchResultKind FIELD_REFERENCE = const SearchResultKind('FIELD_
REFERENCE', 1); |
| 467 |
| 468 /** |
| 469 * A reference to a field in which it is read. |
| 470 */ |
| 471 static const SearchResultKind FIELD_READ = const SearchResultKind('FIELD_READ'
, 2); |
| 472 |
| 473 /** |
| 474 * A reference to a field in which it is written. |
| 475 */ |
| 476 static const SearchResultKind FIELD_WRITE = const SearchResultKind('FIELD_WRIT
E', 3); |
| 477 |
| 478 /** |
| 479 * A reference to a function in which it is invoked. |
| 480 */ |
| 481 static const SearchResultKind FUNCTION_INVOCATION = const SearchResultKind('FU
NCTION_INVOCATION', 4); |
| 482 |
| 483 /** |
| 484 * A reference to a function in which it is referenced. |
| 485 */ |
| 486 static const SearchResultKind FUNCTION_REFERENCE = const SearchResultKind('FUN
CTION_REFERENCE', 5); |
| 487 |
| 488 /** |
| 489 * A reference to a method in which it is invoked. |
| 490 */ |
| 491 static const SearchResultKind METHOD_INVOCATION = const SearchResultKind('METH
OD_INVOCATION', 6); |
| 492 |
| 493 /** |
| 494 * A reference to a method in which it is referenced. |
| 495 */ |
| 496 static const SearchResultKind METHOD_REFERENCE = const SearchResultKind('METHO
D_REFERENCE', 7); |
| 497 |
| 498 /** |
| 499 * A reference to a property accessor. |
| 500 */ |
| 501 static const SearchResultKind PROPERTY_ACCESSOR_REFERENCE = const SearchResult
Kind('PROPERTY_ACCESSOR_REFERENCE', 8); |
| 502 |
| 503 /** |
| 504 * A reference to a type. |
| 505 */ |
| 506 static const SearchResultKind TYPE_REFERENCE = const SearchResultKind('TYPE_RE
FERENCE', 9); |
| 507 |
| 508 /** |
| 509 * A declaration of a variable. |
| 510 */ |
| 511 static const SearchResultKind VARIABLE_DECLARATION = const SearchResultKind('V
ARIABLE_DECLARATION', 10); |
| 512 |
| 513 /** |
| 514 * A reference to a variable in which it is read. |
| 515 */ |
| 516 static const SearchResultKind VARIABLE_READ = const SearchResultKind('VARIABLE
_READ', 11); |
| 517 |
| 518 /** |
| 519 * A reference to a variable in which it is both read and written. |
| 520 */ |
| 521 static const SearchResultKind VARIABLE_READ_WRITE = const SearchResultKind('VA
RIABLE_READ_WRITE', 12); |
| 522 |
| 523 /** |
| 524 * A reference to a variable in which it is written. |
| 525 */ |
| 526 static const SearchResultKind VARIABLE_WRITE = const SearchResultKind('VARIABL
E_WRITE', 13); |
| 527 |
| 528 static const List<SearchResultKind> values = const [ |
| 529 CONSTRUCTOR_REFERENCE, |
| 530 FIELD_REFERENCE, |
| 531 FIELD_READ, |
| 532 FIELD_WRITE, |
| 533 FUNCTION_INVOCATION, |
| 534 FUNCTION_REFERENCE, |
| 535 METHOD_INVOCATION, |
| 536 METHOD_REFERENCE, |
| 537 PROPERTY_ACCESSOR_REFERENCE, |
| 538 TYPE_REFERENCE, |
| 539 VARIABLE_DECLARATION, |
| 540 VARIABLE_READ, |
| 541 VARIABLE_READ_WRITE, |
| 542 VARIABLE_WRITE]; |
| 543 |
| 544 const SearchResultKind(String name, int ordinal) : super(name, ordinal); |
| 545 } |
| 546 |
| 547 /** |
| 548 * The interface `SearchReferencesConsumer` defines the behavior of objects that
consume |
| 549 * [SearchResult]s. |
| 550 */ |
| 551 abstract class SearchResultsConsumer { |
| 552 /** |
| 553 * [SearchResult]s have been computed. |
| 554 * |
| 555 * @param contextId the identifier of the context to search within |
| 556 * @param source the [Source] with element |
| 557 * @param offset the offset within the `source` |
| 558 * @param searchResults an array of [SearchResult]s computed so far |
| 559 * @param isLastResult is `true` if this is the last set of results |
| 560 */ |
| 561 void computedReferences(String contextId, Source source, int offset, List<Sear
chResult> searchResults, bool isLastResult); |
| 562 } |
| 563 |
| 564 /** |
| 383 * The interface `SourceRegion` defines the behavior of objects representing a r
ange of | 565 * The interface `SourceRegion` defines the behavior of objects representing a r
ange of |
| 384 * characters within a [Source]. | 566 * characters within a [Source]. |
| 385 */ | 567 */ |
| 386 abstract class SourceRegion { | 568 abstract class SourceRegion { |
| 387 /** | 569 /** |
| 388 * Check if <code>x</code> is in [offset, offset + length] interval. | 570 * Check if <code>x</code> is in [offset, offset + length] interval. |
| 389 */ | 571 */ |
| 390 bool containsInclusive(int x); | 572 bool containsInclusive(int x); |
| 391 | 573 |
| 392 /** | 574 /** |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 final SourceSetKind kind; | 642 final SourceSetKind kind; |
| 461 | 643 |
| 462 _ImplicitSourceSet(this.kind); | 644 _ImplicitSourceSet(this.kind); |
| 463 | 645 |
| 464 @override | 646 @override |
| 465 List<Source> get sources => Source.EMPTY_ARRAY; | 647 List<Source> get sources => Source.EMPTY_ARRAY; |
| 466 | 648 |
| 467 @override | 649 @override |
| 468 String toString() => kind.toString(); | 650 String toString() => kind.toString(); |
| 469 } | 651 } |
| OLD | NEW |