Changes:
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / WhileStatement.java
index 24d668b..22edcc6 100644 (file)
@@ -1,7 +1,6 @@
 package net.sourceforge.phpdt.internal.compiler.ast;
 
 import java.util.List;
-import java.util.ArrayList;
 
 /**
  * A While statement.
@@ -49,40 +48,31 @@ public class WhileStatement extends Statement {
 
   /**
    * Get the variables from outside (parameters, globals ...)
-   * @return the variables from outside
    */
-  public List getOutsideVariable() {
-    final ArrayList list = new ArrayList();
-    list.addAll(condition.getOutsideVariable()); // todo: check if unuseful
+  public void getOutsideVariable(final List list) {
+    condition.getOutsideVariable(list); // todo: check if unuseful
     if (action != null) {
-      list.addAll(action.getOutsideVariable());
+      action.getOutsideVariable(list);
     }
-    return list;
   }
 
   /**
    * get the modified variables.
-   * @return the variables from we change value
    */
-  public List getModifiedVariable() {
-    final ArrayList list = new ArrayList();
-    list.addAll(condition.getModifiedVariable());
+  public void getModifiedVariable(final List list) {
+    condition.getModifiedVariable(list);
     if (action != null) {
-      list.addAll(action.getModifiedVariable());
+      action.getModifiedVariable(list);
     }
-    return list;
   }
 
   /**
    * Get the variables used.
-   * @return the variables used
    */
-  public List getUsedVariable() {
-    final ArrayList list = new ArrayList();
-    list.addAll(condition.getUsedVariable());
+  public void getUsedVariable(final List list) {
+    condition.getUsedVariable(list);
     if (action != null) {
-      list.addAll(action.getUsedVariable());
+      action.getUsedVariable(list);
     }
-    return list;
   }
 }