*** empty log message ***
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / InclusionStatement.java
index 0f18233..a5abc65 100644 (file)
@@ -3,6 +3,10 @@ package net.sourceforge.phpdt.internal.compiler.ast;
 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
 import net.sourceforge.phpdt.internal.ui.PHPUiImages;
 import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.text.Position;
+
+import java.util.List;
+import java.util.ArrayList;
 
 /**
  * @author Matthieu Casanova
@@ -20,14 +24,17 @@ public class InclusionStatement extends Statement implements Outlineable {
 
   private Object parent;
 
-  public InclusionStatement(Object parent,
-                            int keyword,
-                            Expression expression,
-                            int sourceStart) {
-    super(sourceStart, expression.sourceEnd);
+  private Position position;
+
+  public InclusionStatement(final Object parent,
+                            final int keyword,
+                            final Expression expression,
+                            final int sourceStart) {
+    super(sourceStart, expression.getSourceEnd());
     this.keyword = keyword;
     this.expression = expression;
     this.parent = parent;
+    position = new Position(sourceStart, getSourceEnd());
   }
 
   public String keywordToString() {
@@ -49,7 +56,7 @@ public class InclusionStatement extends Statement implements Outlineable {
    * @param tab how many tabs (not used here
    * @return a String
    */
-  public String toString(int tab) {
+  public String toString(final int tab) {
     final StringBuffer buffer = new StringBuffer(tabString(tab));
     buffer.append(toString());
     return buffer.toString();
@@ -77,4 +84,32 @@ public class InclusionStatement extends Statement implements Outlineable {
   public Object getParent() {
     return parent;
   }
+
+  public Position getPosition() {
+    return position;
+  }
+
+  /**
+   * Get the variables from outside (parameters, globals ...)
+   * @return the variables from outside
+   */
+  public List getOutsideVariable() {
+    return expression.getOutsideVariable();
+  }
+
+  /**
+   * get the modified variables.
+   * @return the variables from we change value
+   */
+  public List getModifiedVariable() {
+    return expression.getModifiedVariable();
+  }
+
+  /**
+   * Get the variables used.
+   * @return the variables used
+   */
+  public List getUsedVariable() {
+    return expression.getUsedVariable();
+  }
 }