| Index: pkg/analysis_server/lib/src/computer/computer_navigation.dart
|
| diff --git a/pkg/analysis_server/lib/src/computer/computer_navigation.dart b/pkg/analysis_server/lib/src/computer/computer_navigation.dart
|
| index a21ec59adb80314b1c29f5216ab18da69c590a92..faf949d5580092d902701ed99bb625e3e7c1df87 100644
|
| --- a/pkg/analysis_server/lib/src/computer/computer_navigation.dart
|
| +++ b/pkg/analysis_server/lib/src/computer/computer_navigation.dart
|
| @@ -163,29 +163,25 @@ class _DartUnitNavigationComputerVisitor extends RecursiveAstVisitor {
|
| Element element = node.staticElement;
|
| ConstructorName constructorName = node.constructorName;
|
| if (element != null && constructorName != null) {
|
| - ClassElement classElement = element.enclosingElement;
|
| + // if a synthetic constructor, navigate to the class
|
| if (element.isSynthetic) {
|
| + ClassElement classElement = element.enclosingElement;
|
| element = classElement;
|
| - computer._addRegion_nodeStart_nodeStart(
|
| - node,
|
| - node.argumentList,
|
| + }
|
| + // "new ", excluding last character
|
| + computer._addRegion_nodeStart_nodeStart(
|
| + node,
|
| + constructorName.type,
|
| + element,
|
| + excludeLastChar: true);
|
| + // "ClassName<TypeA, TypeB>"
|
| + _safelyVisit(constructorName.type);
|
| + // optional ".name"
|
| + if (constructorName.period != null) {
|
| + computer._addRegion_tokenStart_nodeEnd(
|
| + constructorName.period,
|
| + constructorName,
|
| element);
|
| - } else {
|
| - // "new ", excluding last character
|
| - computer._addRegion_nodeStart_nodeStart(
|
| - node,
|
| - constructorName.type,
|
| - element,
|
| - excludeLastChar: true);
|
| - // "ClassName"
|
| - computer._addRegionForNode(constructorName.type, classElement);
|
| - // optional ".name"
|
| - if (constructorName.period != null) {
|
| - computer._addRegion_tokenStart_nodeEnd(
|
| - constructorName.period,
|
| - constructorName,
|
| - element);
|
| - }
|
| }
|
| }
|
| _safelyVisit(node.argumentList);
|
|
|