| Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/info/DartVariableInfo.java
|
| diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/info/DartVariableInfo.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/info/DartVariableInfo.java
|
| index 68ff9255836427b8fc0dced96bb0a48c9ec974c5..7a6040cb260f63475f130398f8a8efb9bbcfc9cf 100644
|
| --- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/info/DartVariableInfo.java
|
| +++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/info/DartVariableInfo.java
|
| @@ -13,6 +13,9 @@
|
| */
|
| package com.google.dart.tools.core.internal.model.info;
|
|
|
| +import com.google.dart.tools.core.internal.model.SourceRangeImpl;
|
| +import com.google.dart.tools.core.model.SourceRange;
|
| +
|
| /**
|
| * Instances of the class <code>DartVariableInfo</code> maintain the cached data shared by all equal
|
| * variables.
|
| @@ -29,6 +32,9 @@ public class DartVariableInfo extends DeclarationElementInfo {
|
| */
|
| private boolean isParameter;
|
|
|
| + private int visibleStart;
|
| + private int visibleEnd;
|
| +
|
| /**
|
| * Return the name of the declared type of this variable, or <code>null</code> if this variable
|
| * does not have a declared type.
|
| @@ -40,6 +46,13 @@ public class DartVariableInfo extends DeclarationElementInfo {
|
| }
|
|
|
| /**
|
| + * @return the {@link SourceRange} in which this variable is visible.
|
| + */
|
| + public SourceRange getVisibleRange() {
|
| + return new SourceRangeImpl(visibleStart, visibleEnd - visibleStart + 1);
|
| + }
|
| +
|
| + /**
|
| * Return <code>true</code> if this variable is a parameter.
|
| *
|
| * @return <code>true</code> if this variable is a parameter
|
| @@ -65,4 +78,18 @@ public class DartVariableInfo extends DeclarationElementInfo {
|
| public void setTypeName(char[] name) {
|
| typeName = name;
|
| }
|
| +
|
| + /**
|
| + * Sets the end of source range in which this variable is visible.
|
| + */
|
| + public void setVisibleEnd(int visibleEnd) {
|
| + this.visibleEnd = visibleEnd;
|
| + }
|
| +
|
| + /**
|
| + * Sets the start of source range in which this variable is visible.
|
| + */
|
| + public void setVisibleStart(int visibleStart) {
|
| + this.visibleStart = visibleStart;
|
| + }
|
| }
|
|
|