Changes:
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / MethodDeclaration.java
index 6934c07..f556cc8 100644 (file)
@@ -1,18 +1,17 @@
 package net.sourceforge.phpdt.internal.compiler.ast;
 
-import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
-import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
+import java.util.ArrayList;
+import java.util.List;
+
 import net.sourceforge.phpdt.internal.compiler.ast.declarations.VariableUsage;
+import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
+import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
 import net.sourceforge.phpdt.internal.ui.PHPUiImages;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+
+import org.eclipse.core.runtime.CoreException;
 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;
 
 import test.PHPParserSuperclass;
 
@@ -24,7 +23,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 +44,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 +131,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 +174,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));
       }
     }