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 library services.src.index.local_index; | 5 library services.src.index.local_index; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/src/services/index/index.dart'; | 9 import 'package:analysis_server/src/services/index/index.dart'; |
10 import 'package:analysis_server/src/services/index/index_contributor.dart' | 10 import 'package:analysis_server/src/services/index/index_contributor.dart' |
(...skipping 26 matching lines...) Expand all Loading... |
37 /** | 37 /** |
38 * Returns all relations with [Element]s with the given [name]. | 38 * Returns all relations with [Element]s with the given [name]. |
39 */ | 39 */ |
40 Future<Map<List<String>, List<InspectLocation>>> findElementsByName( | 40 Future<Map<List<String>, List<InspectLocation>>> findElementsByName( |
41 String name) { | 41 String name) { |
42 return _store.inspect_getElementRelations(name); | 42 return _store.inspect_getElementRelations(name); |
43 } | 43 } |
44 | 44 |
45 /** | 45 /** |
46 * Returns a `Future<List<Location>>` that completes with the list of | 46 * Returns a `Future<List<Location>>` that completes with the list of |
47 * [Location]s of the given [relationship] with the given [element]. | 47 * [LocationImpl]s of the given [relationship] with the given [element]. |
48 * | 48 * |
49 * For example, if the [element] represents a function and the [relationship] | 49 * For example, if the [element] represents a function and the [relationship] |
50 * is the `is-invoked-by` relationship, then the locations will be all of the | 50 * is the `is-invoked-by` relationship, then the locations will be all of the |
51 * places where the function is invoked. | 51 * places where the function is invoked. |
52 */ | 52 */ |
53 @override | 53 @override |
54 Future<List<Location>> getRelationships( | 54 Future<List<LocationImpl>> getRelationships( |
55 Element element, Relationship relationship) { | 55 Element element, RelationshipImpl relationship) { |
56 return _store.getRelationships(element, relationship); | 56 return _store.getRelationships(element, relationship); |
57 } | 57 } |
58 | 58 |
59 @override | 59 @override |
60 List<Element> getTopLevelDeclarations(ElementNameFilter nameFilter) { | 60 List<Element> getTopLevelDeclarations(ElementNameFilter nameFilter) { |
61 return _store.getTopLevelDeclarations(nameFilter); | 61 return _store.getTopLevelDeclarations(nameFilter); |
62 } | 62 } |
63 | 63 |
64 @override | 64 @override |
65 void indexHtmlUnit(AnalysisContext context, HtmlUnit unit) { | 65 void indexHtmlUnit(AnalysisContext context, HtmlUnit unit) { |
(...skipping 23 matching lines...) Expand all Loading... |
89 @override | 89 @override |
90 void run() { | 90 void run() { |
91 // NO-OP for the local index | 91 // NO-OP for the local index |
92 } | 92 } |
93 | 93 |
94 @override | 94 @override |
95 void stop() { | 95 void stop() { |
96 // NO-OP for the local index | 96 // NO-OP for the local index |
97 } | 97 } |
98 } | 98 } |
OLD | NEW |