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

Unified Diff: pkg/analyzer/lib/src/generated/index.dart

Issue 348673002: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/error.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b5b5b101d79b91fad82ba80d161d08f6ebd526e6..92ed3883e7c2c9f61c577e22079d19d080ab5a1d 100644
--- a/pkg/analyzer/lib/src/generated/index.dart
+++ b/pkg/analyzer/lib/src/generated/index.dart
@@ -1080,7 +1080,7 @@ class IndexContributor extends GeneralizingAstVisitor<Object> {
Object visitMethodInvocation(MethodInvocation node) {
SimpleIdentifier name = node.methodName;
Element element = name.bestElement;
- if (element is MethodElement) {
+ if (element is MethodElement || element is PropertyAccessorElement) {
Location location = _createLocationFromNode(name);
Relationship relationship;
if (node.target != null) {
@@ -1526,6 +1526,7 @@ class IndexHtmlUnitOperation implements IndexOperation {
}
AngularHtmlIndexContributor contributor = new AngularHtmlIndexContributor(_indexStore);
unit.accept(contributor);
+ _indexStore.doneIndex();
} catch (exception) {
AnalysisEngine.instance.logger.logError2("Could not index ${unit.element.location}", exception);
}
@@ -1600,6 +1601,14 @@ abstract class IndexStore {
void clear();
/**
+ * Notifies that index store that the current Dart or HTML unit indexing is done.
+ *
+ * If this method is not invoked after corresponding "aboutToIndex*" invocation, all recorded
+ * information may be lost.
+ */
+ void doneIndex();
+
+ /**
* 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
@@ -1736,6 +1745,7 @@ class IndexUnitOperation implements IndexOperation {
}
unit.accept(new IndexContributor(_indexStore));
unit.accept(new AngularDartIndexContributor(_indexStore));
+ _indexStore.doneIndex();
} catch (exception) {
AnalysisEngine.instance.logger.logError2("Could not index ${unit.element.location}", exception);
}
@@ -1997,6 +2007,10 @@ class MemoryIndexStoreImpl implements MemoryIndexStore {
}
@override
+ void doneIndex() {
+ }
+
+ @override
List<Location> getRelationships(Element element, Relationship relationship) {
MemoryIndexStoreImpl_ElementRelationKey key = new MemoryIndexStoreImpl_ElementRelationKey(element, relationship);
Set<Location> locations = _keyToLocations[key];
« no previous file with comments | « pkg/analyzer/lib/src/generated/error.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698