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 25ae677..17a6e39 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 @@ -1,7 +1,5 @@ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.ast.Expression; -import net.sourceforge.phpdt.internal.compiler.ast.AbstractVariableDeclaration; import net.sourceforge.phpdt.internal.compiler.parser.Outlineable; import net.sourceforge.phpdt.internal.ui.PHPUiImages; import org.eclipse.jface.resource.ImageDescriptor; @@ -35,7 +33,6 @@ public class VariableDeclaration extends AbstractVariableDeclaration implements /** * Create a variable. - * @param initialization the initialization * @param name the name of the variable * @param sourceStart the start point */ @@ -44,7 +41,6 @@ public class VariableDeclaration extends AbstractVariableDeclaration implements int sourceStart, int sourceEnd) { super(name, sourceStart, sourceEnd); - this.initialization = initialization; this.parent = parent; } @@ -64,6 +60,17 @@ public class VariableDeclaration extends AbstractVariableDeclaration implements super(name, sourceStart, initialization.sourceEnd); this.initialization = initialization; } + + /** + * Create a variable. + * @param name the name of the variable + * @param sourceStart the start point + */ + public VariableDeclaration(char[] name, + int sourceStart) { + super(name, sourceStart, sourceStart + name.length); + } + /** * Return the variable into String. * @return a String @@ -71,9 +78,9 @@ public class VariableDeclaration extends AbstractVariableDeclaration implements public String toStringExpression() { final StringBuffer buff; if (reference) { - buff = new StringBuffer('&'); + buff = new StringBuffer("&$"); //$NON-NLS-1$ } else { - buff = new StringBuffer(); + buff = new StringBuffer("$");//$NON-NLS-1$ } buff.append(name); if (initialization != null) {