X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/InclusionStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/InclusionStatement.java index 0f18233..1cc212c 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/InclusionStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/InclusionStatement.java @@ -1,8 +1,12 @@ package net.sourceforge.phpdt.internal.compiler.ast; +import java.util.List; + 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; /** * @author Matthieu Casanova @@ -20,14 +24,18 @@ 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, + final int sourceEnd) { + super(sourceStart, sourceEnd); this.keyword = keyword; this.expression = expression; this.parent = parent; + position = new Position(sourceStart, sourceEnd); } public String keywordToString() { @@ -49,7 +57,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 +85,29 @@ public class InclusionStatement extends Statement implements Outlineable { public Object getParent() { return parent; } + + public Position getPosition() { + return position; + } + + /** + * Get the variables from outside (parameters, globals ...) + */ + public void getOutsideVariable(final List list) { + expression.getOutsideVariable(list); + } + + /** + * get the modified variables. + */ + public void getModifiedVariable(final List list) { + expression.getModifiedVariable(list); + } + + /** + * Get the variables used. + */ + public void getUsedVariable(final List list) { + expression.getUsedVariable(list); + } }