Chromium Code Reviews| 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 2f73f232c1a5e647ebd14b1846693b839a95afab..fc13d3e80c01de2643500e7fab2a6edfd65490e3 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 |
| @@ -71,12 +71,12 @@ public class DartElementLocator extends ASTVisitor<Void> { |
| /** |
| * The start offset of the range used to identify the element. |
| */ |
| - private final int startOffset; |
| + private int startOffset; |
| /** |
| * The end offset of the range used to identify the element. |
| */ |
| - private final int endOffset; |
| + private int endOffset; |
| /** |
| * A flag indicating whether elements should be returned for declaration sites as well as for |
| @@ -109,6 +109,14 @@ public class DartElementLocator extends ASTVisitor<Void> { |
| private Element resolvedElement; |
| /** |
| + * XXX |
|
Brian Wilkerson
2012/06/26 14:06:20
Were you planning on writing a comment here?
scheglov
2012/06/26 14:35:12
Done.
|
| + */ |
| + public DartElementLocator(CompilationUnit input, Element targetSymbol) { |
| + this(input, 0, 0, false); |
| + findElementFor(targetSymbol); |
| + } |
| + |
| + /** |
| * Initialize a newly created locator to locate one or more {@link DartElement Dart elements} by |
| * locating the node within the given compilation unit that corresponds to the given offset in the |
| * source. |