Changes:
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / HTMLBlock.java
index 27d93fa..80e7f40 100644 (file)
@@ -1,7 +1,6 @@
 package net.sourceforge.phpdt.internal.compiler.ast;
 
 import java.util.List;
-import java.util.ArrayList;
 
 /**
  * @author Matthieu Casanova
@@ -11,7 +10,7 @@ public class HTMLBlock extends Statement {
   public AstNode[] nodes;
 
   public HTMLBlock(final AstNode[] nodes) {
-    super(nodes[0].sourceStart, nodes[nodes.length-1].sourceEnd);
+    super(nodes[0].sourceStart, nodes[(nodes.length > 0) ? nodes.length - 1 : 0].sourceEnd);
     this.nodes = nodes;
   }
 
@@ -24,7 +23,7 @@ public class HTMLBlock extends Statement {
     final StringBuffer buff = new StringBuffer(tabString(tab));
     buff.append("?>");
     for (int i = 0; i < nodes.length; i++) {
-      buff.append(nodes[i].toString(tab +1));
+      buff.append(nodes[i].toString(tab + 1));
     }
     buff.append("<?php\n");
     return buff.toString();
@@ -32,25 +31,19 @@ public class HTMLBlock extends Statement {
 
   /**
    * Get the variables from outside (parameters, globals ...)
-   * @return an empty list
    */
-  public List getOutsideVariable() {
-    return new ArrayList();
+  public void getOutsideVariable(final List list) {
   }
 
   /**
    * get the modified variables.
-   * @return an empty list
    */
-  public List getModifiedVariable() {
-    return new ArrayList();
+  public void getModifiedVariable(final List list) {
   }
 
   /**
    * Get the variables used.
-   * @return an empty list
    */
-  public List getUsedVariable() {
-    return new ArrayList();
+  public void getUsedVariable(final List list) {
   }
 }