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

Unified Diff: pkg/analysis_server/lib/src/services/index/index_contributor.dart

Issue 783223003: Issue 21801. Index redirecting constructor invocations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | « no previous file | pkg/analysis_server/test/services/index/dart_index_contributor_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/index/index_contributor.dart
diff --git a/pkg/analysis_server/lib/src/services/index/index_contributor.dart b/pkg/analysis_server/lib/src/services/index/index_contributor.dart
index e17a66f7fb36123320748bf520e283059b1afca7..98d28f20b4db34978ac8ce2f09773aac5f792187 100644
--- a/pkg/analysis_server/lib/src/services/index/index_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/index/index_contributor.dart
@@ -662,6 +662,23 @@ class _IndexContributor extends GeneralizingAstVisitor<Object> {
}
@override
+ Object
+ visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) {
+ ConstructorElement element = node.staticElement;
+ Location location;
+ if (node.constructorName != null) {
+ int start = node.period.offset;
+ int end = node.constructorName.end;
+ location = _createLocationForOffset(start, end - start);
+ } else {
+ int start = node.keyword.end;
+ location = _createLocationForOffset(start, 0);
+ }
+ recordRelationship(element, IndexConstants.IS_REFERENCED_BY, location);
+ return super.visitRedirectingConstructorInvocation(node);
+ }
+
+ @override
Object visitSimpleIdentifier(SimpleIdentifier node) {
Element nameElement = new NameElement(node.name);
Location location = _createLocationForNode(node);
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/index/dart_index_contributor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698