Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library analysis_server.plugin.index.index_core; | 5 library analysis_server.plugin.index.index_core; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analysis_server/src/services/index/index.dart'; | 10 import 'package:analysis_server/src/services/index/index.dart'; |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 * a [source]. | 27 * a [source]. |
| 28 * | 28 * |
| 29 * Clients must ensure that two distinct objects in the same source cannot have | 29 * Clients must ensure that two distinct objects in the same source cannot have |
| 30 * the same kind and offset. Failure to do so will make it impossible for | 30 * the same kind and offset. Failure to do so will make it impossible for |
| 31 * clients to identify the model element corresponding to the indexable object. | 31 * clients to identify the model element corresponding to the indexable object. |
| 32 * | 32 * |
| 33 * Clients are expected to subtype this class when implementing plugins. | 33 * Clients are expected to subtype this class when implementing plugins. |
| 34 */ | 34 */ |
| 35 abstract class IndexableObject { | 35 abstract class IndexableObject { |
| 36 /** | 36 /** |
| 37 * Return the absolute path of the file containing the indexable object. | |
| 38 */ | |
| 39 String get file; | |
|
Brian Wilkerson
2015/10/16 20:47:37
I'd prefer filePath given that there are several c
| |
| 40 | |
| 41 /** | |
| 37 * Return the kind of this object. | 42 * Return the kind of this object. |
| 38 */ | 43 */ |
| 39 IndexableObjectKind get kind; | 44 IndexableObjectKind get kind; |
| 40 | 45 |
| 41 /** | 46 /** |
| 42 * Return the offset of the indexable object within its source. | 47 * Return the offset of the indexable object within its source. |
| 43 */ | 48 */ |
| 44 int get offset; | 49 int get offset; |
| 45 | |
| 46 /** | |
| 47 * Return the source containing the indexable object. | |
| 48 */ | |
| 49 Source get source; | |
| 50 } | 50 } |
| 51 | 51 |
| 52 /** | 52 /** |
| 53 * The kind associated with an [IndexableObject]. | 53 * The kind associated with an [IndexableObject]. |
| 54 * | 54 * |
| 55 * Clients are expected to implement this class when implementing plugins. | 55 * Clients are expected to implement this class when implementing plugins. |
| 56 */ | 56 */ |
| 57 abstract class IndexableObjectKind { | 57 abstract class IndexableObjectKind { |
| 58 /** | 58 /** |
| 59 * The next available index for a newly created kind of indexable object. | 59 * The next available index for a newly created kind of indexable object. |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 271 */ | 271 */ |
| 272 abstract class Relationship { | 272 abstract class Relationship { |
| 273 /** | 273 /** |
| 274 * Return a relationship that has the given [identifier]. If the relationship | 274 * Return a relationship that has the given [identifier]. If the relationship |
| 275 * has already been created, then it will be returned, otherwise a new | 275 * has already been created, then it will be returned, otherwise a new |
| 276 * relationship will be created | 276 * relationship will be created |
| 277 */ | 277 */ |
| 278 factory Relationship(String identifier) => | 278 factory Relationship(String identifier) => |
| 279 RelationshipImpl.getRelationship(identifier); | 279 RelationshipImpl.getRelationship(identifier); |
| 280 } | 280 } |
| OLD | NEW |