From: kpouer Date: Sun, 14 Sep 2003 20:37:04 +0000 (+0000) Subject: the parameters are in an arraylist not an hashtable anymore X-Git-Url: http://git.phpeclipse.com the parameters are in an arraylist not an hashtable anymore --- diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MethodDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MethodDeclaration.java index 6934c07..ad18c19 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MethodDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/MethodDeclaration.java @@ -9,8 +9,6 @@ import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.text.Position; import org.eclipse.core.runtime.CoreException; -import java.util.Hashtable; -import java.util.Enumeration; import java.util.ArrayList; import java.util.List; @@ -24,7 +22,7 @@ public class MethodDeclaration extends Statement implements OutlineableWithChild /** The name of the method. */ public String name; - public Hashtable arguments; + public ArrayList arguments; public Statement[] statements; @@ -45,7 +43,7 @@ public class MethodDeclaration extends Statement implements OutlineableWithChild public MethodDeclaration(final Object parent, final String name, - final Hashtable arguments, + final ArrayList arguments, final boolean reference, final int sourceStart, final int sourceEnd, @@ -132,15 +130,12 @@ public class MethodDeclaration extends Statement implements OutlineableWithChild buff.append(name).append("(");//$NON-NLS-1$ if (arguments != null) { - final Enumeration values = arguments.elements(); - int i = 0; - while (values.hasMoreElements()) { - final VariableDeclaration o = (VariableDeclaration) values.nextElement(); + for (int i = 0; i < arguments.size(); i++) { + VariableDeclaration o = (VariableDeclaration) arguments.get(i); buff.append(o.toStringExpression()); if (i != (arguments.size() - 1)) { buff.append(", "); //$NON-NLS-1$ } - i++; } } buff.append(")"); //$NON-NLS-1$ @@ -178,9 +173,8 @@ public class MethodDeclaration extends Statement implements OutlineableWithChild private void getParameters(final List list) { if (arguments != null) { - final Enumeration vars = arguments.elements(); - while (vars.hasMoreElements()) { - final VariableDeclaration variable = (VariableDeclaration) vars.nextElement(); + for (int i = 0; i < arguments.size(); i++) { + VariableDeclaration variable = (VariableDeclaration) arguments.get(i); list.add(new VariableUsage(variable.name(), variable.sourceStart)); } }