Index: pkg/analysis_server/lib/src/services/index/index_store.dart |
diff --git a/pkg/analysis_server/lib/src/services/index/index_store.dart b/pkg/analysis_server/lib/src/services/index/index_store.dart |
index 8dd931a1bd6a69439702ddf29a22e5c3111253a9..1d61e7a4f0618420ff2ceefe121ddbcda329e7a2 100644 |
--- a/pkg/analysis_server/lib/src/services/index/index_store.dart |
+++ b/pkg/analysis_server/lib/src/services/index/index_store.dart |
@@ -4,18 +4,16 @@ |
library services.index_store; |
-import 'dart:async'; |
- |
+import 'package:analysis_server/analysis/index/index_core.dart'; |
import 'package:analysis_server/src/services/index/index.dart'; |
import 'package:analyzer/src/generated/element.dart'; |
import 'package:analyzer/src/generated/engine.dart'; |
-import 'package:analyzer/src/generated/source.dart'; |
/** |
* A container with information computed by an index - relations between |
* elements. |
*/ |
-abstract class InternalIndexStore { |
+abstract class InternalIndexStore extends IndexStore { |
/** |
* Answers index statistics. |
*/ |
@@ -53,11 +51,6 @@ abstract class InternalIndexStore { |
bool aboutToIndexHtml(AnalysisContext context, HtmlElement htmlElement); |
/** |
- * Removes all of the information. |
- */ |
- void clear(); |
- |
- /** |
* Notifies that index store that the current Dart or HTML unit indexing is |
* done. |
* |
@@ -67,91 +60,12 @@ abstract class InternalIndexStore { |
void doneIndex(); |
/** |
- * Returns a [Future] that completes with locations of the elements that have |
- * the given [relationship] with the given [element]. |
- * |
- * For example, if the [element] represents a function and the relationship is |
- * the `is-invoked-by` relationship, then the returned locations will be all |
- * of the places where the function is invoked. |
- * |
- * [element] - the the [Element] that has the relationship with the locations |
- * to be returned. |
- * [relationship] - the [RelationshipImpl] between the given element and the |
- * locations to be returned |
- */ |
- Future<List<LocationImpl>> getRelationships( |
- Element element, RelationshipImpl relationship); |
- |
- /** |
* Returns top-level [Element]s whose names satisfy to [nameFilter]. |
*/ |
List<Element> getTopLevelDeclarations(ElementNameFilter nameFilter); |
/** |
- * Records that the given [element] and [location] have the given |
- * [relationship]. |
- * |
- * For example, if the [relationship] is the `is-invoked-by` relationship, |
- * then [element] would be the function being invoked and [location] would be |
- * the point at which it is referenced. Each element can have the same |
- * relationship with multiple locations. In other words, if the following code |
- * were executed |
- * |
- * recordRelationship(element, isReferencedBy, location1); |
- * recordRelationship(element, isReferencedBy, location2); |
- * |
- * then both relationships would be maintained in the index and the result of executing |
- * |
- * getRelationship(element, isReferencedBy); |
- * |
- * would be a list containing both `location1` and `location2`. |
- * |
- * [element] - the [Element] that is related to the location. |
- * [relationship] - the [RelationshipImpl] between the element and the location. |
- * [location] the [LocationImpl] where relationship happens. |
- */ |
- void recordRelationship( |
- Element element, RelationshipImpl relationship, LocationImpl location); |
- |
- /** |
* Records the declaration of the given top-level [element]. |
*/ |
void recordTopLevelDeclaration(Element element); |
- |
- /** |
- * Removes from the index all of the information associated with [context]. |
- * |
- * This method should be invoked when [context] is disposed. |
- * |
- * [context] - the [AnalysisContext] being removed. |
- */ |
- void removeContext(AnalysisContext context); |
- |
- /** |
- * Removes from the index all of the information associated with elements or |
- * locations in [source]. This includes relationships between an element in |
- * [source] and any other locations, relationships between any other elements |
- * and locations within [source]. |
- * |
- * This method should be invoked when [source] is no longer part of the code |
- * base. |
- * |
- * [context] - the [AnalysisContext] in which [source] being removed. |
- * [source] - the [Source] being removed |
- */ |
- void removeSource(AnalysisContext context, Source source); |
- |
- /** |
- * Removes from the index all of the information associated with elements or |
- * locations in the given sources. This includes relationships between an |
- * element in the given sources and any other locations, relationships between |
- * any other elements and a location within the given sources. |
- * |
- * This method should be invoked when multiple sources are no longer part of |
- * the code base. |
- * |
- * [context] - the [AnalysisContext] in which [Source]s being removed. |
- * [container] - the [SourceContainer] holding the sources being removed. |
- */ |
- void removeSources(AnalysisContext context, SourceContainer container); |
} |