| 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' as | 10 import 'package:analysis_server/src/services/index/index_contributor.dart' as |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 @override | 30 @override |
| 31 String get statistics => _store.statistics; | 31 String get statistics => _store.statistics; |
| 32 | 32 |
| 33 @override | 33 @override |
| 34 void clear() { | 34 void clear() { |
| 35 _store.clear(); | 35 _store.clear(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 /** | 38 /** |
| 39 * Returns all relations with [Element]s with the given [name]. |
| 40 */ |
| 41 Future<Map<List<String>, List<InspectLocation>>> |
| 42 findElementsByName(String name) { |
| 43 return _store.inspect_getElementRelations(name); |
| 44 } |
| 45 |
| 46 /** |
| 39 * Returns a `Future<List<Location>>` that completes with the list of | 47 * Returns a `Future<List<Location>>` that completes with the list of |
| 40 * [Location]s of the given [relationship] with the given [element]. | 48 * [Location]s of the given [relationship] with the given [element]. |
| 41 * | 49 * |
| 42 * For example, if the [element] represents a function and the [relationship] | 50 * For example, if the [element] represents a function and the [relationship] |
| 43 * is the `is-invoked-by` relationship, then the locations will be all of the | 51 * is the `is-invoked-by` relationship, then the locations will be all of the |
| 44 * places where the function is invoked. | 52 * places where the function is invoked. |
| 45 */ | 53 */ |
| 46 @override | 54 @override |
| 47 Future<List<Location>> getRelationships(Element element, | 55 Future<List<Location>> getRelationships(Element element, |
| 48 Relationship relationship) { | 56 Relationship relationship) { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 77 @override | 85 @override |
| 78 void run() { | 86 void run() { |
| 79 // NO-OP for the local index | 87 // NO-OP for the local index |
| 80 } | 88 } |
| 81 | 89 |
| 82 @override | 90 @override |
| 83 void stop() { | 91 void stop() { |
| 84 // NO-OP for the local index | 92 // NO-OP for the local index |
| 85 } | 93 } |
| 86 } | 94 } |
| OLD | NEW |