Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: pkg/analysis_server/lib/plugin/index/index_core.dart

Issue 1409203002: Declare IndexableObject.file instead of Source. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/index/index.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/index/index.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698