| Index: pkg/analyzer/lib/src/generated/index.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/index.dart b/pkg/analyzer/lib/src/generated/index.dart
|
| index ae07ab521a3db80d8c946a01e3d86e750d697d6c..b5b5b101d79b91fad82ba80d161d08f6ebd526e6 100644
|
| --- a/pkg/analyzer/lib/src/generated/index.dart
|
| +++ b/pkg/analyzer/lib/src/generated/index.dart
|
| @@ -174,6 +174,33 @@ class AngularHtmlIndexContributor extends ExpressionVisitor {
|
| }
|
|
|
| /**
|
| + * Instances of the [ClearOperation] implement an operation that removes all of the
|
| + * information from the index.
|
| + */
|
| +class ClearOperation implements IndexOperation {
|
| + /**
|
| + * The index store against which this operation is being run.
|
| + */
|
| + final IndexStore _indexStore;
|
| +
|
| + ClearOperation(this._indexStore);
|
| +
|
| + @override
|
| + bool get isQuery => false;
|
| +
|
| + @override
|
| + void performOperation() {
|
| + _indexStore.clear();
|
| + }
|
| +
|
| + @override
|
| + bool removeWhenSourceRemoved(Source source) => false;
|
| +
|
| + @override
|
| + String toString() => "ClearOperation()";
|
| +}
|
| +
|
| +/**
|
| * Recursively visits [HtmlUnit] and every embedded [Expression].
|
| */
|
| abstract class ExpressionVisitor extends ht.RecursiveXmlVisitor<Object> {
|
| @@ -265,6 +292,11 @@ class GetRelationshipsOperation implements IndexOperation {
|
| */
|
| abstract class Index {
|
| /**
|
| + * Asynchronously remove from the index all of the information.
|
| + */
|
| + void clear();
|
| +
|
| + /**
|
| * Asynchronously invoke the given callback with an array containing all of the locations of the
|
| * elements that have the given relationship with the given element. For example, if the element
|
| * represents a method and the relationship is the is-referenced-by relationship, then the
|
| @@ -1563,6 +1595,11 @@ abstract class IndexStore {
|
| bool aboutToIndexHtml(AnalysisContext context, HtmlElement htmlElement);
|
|
|
| /**
|
| + * Removes all of the information.
|
| + */
|
| + void clear();
|
| +
|
| + /**
|
| * Return the locations of the elements that have the given relationship with the given element.
|
| * For example, if the element represents a method and the relationship is the is-referenced-by
|
| * relationship, then the returned locations will be all of the places where the method is
|
| @@ -1950,6 +1987,16 @@ class MemoryIndexStoreImpl implements MemoryIndexStore {
|
| }
|
|
|
| @override
|
| + void clear() {
|
| + _canonicalKeys.clear();
|
| + _keyToLocations.clear();
|
| + _contextToSourceToKeys.clear();
|
| + _contextToSourceToLocations.clear();
|
| + _contextToLibraryToUnits.clear();
|
| + _contextToUnitToLibraries.clear();
|
| + }
|
| +
|
| + @override
|
| List<Location> getRelationships(Element element, Relationship relationship) {
|
| MemoryIndexStoreImpl_ElementRelationKey key = new MemoryIndexStoreImpl_ElementRelationKey(element, relationship);
|
| Set<Location> locations = _keyToLocations[key];
|
|
|