Index: pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart |
diff --git a/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart b/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart |
index dc4616f086ac09827f01de8f8a70c5235691380b..855330efd8ca5b8ff4b470d51634c4eb6d428685 100644 |
--- a/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart |
+++ b/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart |
@@ -243,6 +243,19 @@ class _DartNavigationComputerVisitor extends RecursiveAstVisitor { |
} |
@override |
+ visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) { |
+ Element element = node.staticElement; |
+ if (element != null && element.isSynthetic) { |
+ element = element.enclosingElement; |
+ } |
+ // add region |
+ computer._addRegionForToken(node.thisKeyword, element); |
+ computer._addRegionForNode(node.constructorName, element); |
+ // process arguments |
+ _safelyVisit(node.argumentList); |
+ } |
+ |
+ @override |
visitSimpleIdentifier(SimpleIdentifier node) { |
if (node.parent is ConstructorDeclaration) { |
return; |
@@ -258,12 +271,8 @@ class _DartNavigationComputerVisitor extends RecursiveAstVisitor { |
element = element.enclosingElement; |
} |
// add region |
- SimpleIdentifier name = node.constructorName; |
- if (name != null) { |
- computer._addRegion_nodeStart_nodeEnd(node, name, element); |
- } else { |
- computer._addRegionForToken(node.superKeyword, element); |
- } |
+ computer._addRegionForToken(node.superKeyword, element); |
+ computer._addRegionForNode(node.constructorName, element); |
// process arguments |
_safelyVisit(node.argumentList); |
} |