| Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/DartElementLocator.java
|
| diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/DartElementLocator.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/DartElementLocator.java
|
| index 1240c715d46206b6918ed112c5d213a943e1b854..825a1e836c1e8ce9c98146f872b657d790154cd5 100644
|
| --- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/DartElementLocator.java
|
| +++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/DartElementLocator.java
|
| @@ -18,6 +18,8 @@ import com.google.dart.compiler.ast.ASTNodes;
|
| import com.google.dart.compiler.ast.ASTVisitor;
|
| import com.google.dart.compiler.ast.DartArrayAccess;
|
| import com.google.dart.compiler.ast.DartBinaryExpression;
|
| +import com.google.dart.compiler.ast.DartCommentNewName;
|
| +import com.google.dart.compiler.ast.DartCommentRefName;
|
| import com.google.dart.compiler.ast.DartExpression;
|
| import com.google.dart.compiler.ast.DartIdentifier;
|
| import com.google.dart.compiler.ast.DartImportDirective;
|
| @@ -275,6 +277,42 @@ public class DartElementLocator extends ASTVisitor<Void> {
|
| }
|
|
|
| @Override
|
| + public Void visitCommentNewName(DartCommentNewName node) {
|
| + if (foundElement == null) {
|
| + int start = node.getSourceInfo().getOffset();
|
| + int length = node.getSourceInfo().getLength();
|
| + int end = start + length;
|
| + if (start <= startOffset && endOffset <= end) {
|
| + wordRegion = new Region(start, length);
|
| + Element targetElement = node.getConstructorElement();
|
| + if (targetElement != null) {
|
| + resolvedElement = targetElement;
|
| + findElementFor(targetElement);
|
| + }
|
| + }
|
| + }
|
| + return super.visitCommentNewName(node);
|
| + }
|
| +
|
| + @Override
|
| + public Void visitCommentRefName(DartCommentRefName node) {
|
| + if (foundElement == null) {
|
| + int start = node.getSourceInfo().getOffset();
|
| + int length = node.getSourceInfo().getLength();
|
| + int end = start + length;
|
| + if (start <= startOffset && endOffset <= end) {
|
| + wordRegion = new Region(start, length);
|
| + Element targetElement = node.getElement();
|
| + if (targetElement != null) {
|
| + resolvedElement = targetElement;
|
| + findElementFor(targetElement);
|
| + }
|
| + }
|
| + }
|
| + return super.visitCommentRefName(node);
|
| + }
|
| +
|
| + @Override
|
| public Void visitIdentifier(DartIdentifier node) {
|
| if (foundElement == null) {
|
| int start = node.getSourceInfo().getOffset();
|
|
|