X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VariableDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VariableDeclaration.java index 17a6e39..5a709fd 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VariableDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VariableDeclaration.java @@ -3,6 +3,7 @@ package net.sourceforge.phpdt.internal.compiler.ast; import net.sourceforge.phpdt.internal.compiler.parser.Outlineable; import net.sourceforge.phpdt.internal.ui.PHPUiImages; import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.text.Position; /** * A variable declaration. @@ -15,7 +16,7 @@ public class VariableDeclaration extends AbstractVariableDeclaration implements private Object parent; private boolean reference; - + private Position position; /** * Create a variable. * @param initialization the initialization @@ -29,6 +30,7 @@ public class VariableDeclaration extends AbstractVariableDeclaration implements super(name, sourceStart, initialization.sourceEnd); this.initialization = initialization; this.parent = parent; + position = new Position(sourceStart, sourceEnd); } /** @@ -94,11 +96,19 @@ public class VariableDeclaration extends AbstractVariableDeclaration implements return parent; } - /** - * Get the image of a variable. - * @return the image that represents a php variable - */ - public ImageDescriptor getImage() { - return PHPUiImages.DESC_VAR; - } + public String toString() { + return toStringExpression(); + } + + /** + * Get the image of a variable. + * @return the image that represents a php variable + */ + public ImageDescriptor getImage() { + return PHPUiImages.DESC_VAR; + } + + public Position getPosition() { + return position; + } }