| Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/index/contributor/IndexContributor.java
|
| diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/index/contributor/IndexContributor.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/index/contributor/IndexContributor.java
|
| index e6f7d5ec9a2bbc444f43a9b690ba6c6013522bf8..dff859c7b2e5b783723555975f3ac084e1c8237b 100644
|
| --- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/index/contributor/IndexContributor.java
|
| +++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/index/contributor/IndexContributor.java
|
| @@ -29,9 +29,11 @@ import com.google.dart.compiler.ast.DartFunctionObjectInvocation;
|
| import com.google.dart.compiler.ast.DartFunctionTypeAlias;
|
| import com.google.dart.compiler.ast.DartIdentifier;
|
| import com.google.dart.compiler.ast.DartImportDirective;
|
| +import com.google.dart.compiler.ast.DartInvocation;
|
| import com.google.dart.compiler.ast.DartLabel;
|
| import com.google.dart.compiler.ast.DartMethodDefinition;
|
| import com.google.dart.compiler.ast.DartMethodInvocation;
|
| +import com.google.dart.compiler.ast.DartNamedExpression;
|
| import com.google.dart.compiler.ast.DartNewExpression;
|
| import com.google.dart.compiler.ast.DartNode;
|
| import com.google.dart.compiler.ast.DartParameterizedTypeNode;
|
| @@ -484,6 +486,25 @@ public class IndexContributor extends ASTVisitor<Void> {
|
| }
|
|
|
| @Override
|
| + public Void visitNamedExpression(DartNamedExpression node) {
|
| + if (node.getParent() instanceof DartInvocation
|
| + && node.getParent().getElement() instanceof MethodElement) {
|
| + MethodElement methodElement = (MethodElement) node.getParent().getElement();
|
| + Object parameterId = node.getInvocationParameterId();
|
| + if (parameterId instanceof VariableElement) {
|
| + String name = ((VariableElement) parameterId).getName();
|
| + try {
|
| + Element indexElement = ElementFactory.getParameterElement(methodElement, name);
|
| + Location location = createLocation(node.getName());
|
| + recordRelationship(indexElement, IndexConstants.IS_REFERENCED_BY, location);
|
| + } catch (DartModelException exception) {
|
| + }
|
| + }
|
| + }
|
| + return super.visitNamedExpression(node);
|
| + }
|
| +
|
| + @Override
|
| public Void visitNewExpression(DartNewExpression node) {
|
| com.google.dart.compiler.resolver.Element element = node.getElement();
|
| if (element instanceof MethodElement) {
|
|
|