+++ /dev/null
-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;
-
-/**
- * A GlobalStatement statement in php.
- * @author Matthieu Casanova
- */
-public class GlobalStatement extends Statement implements Outlineable {
-
- /** An array of the variables called by this global statement. */
- public String[] variables;
-
- private Object parent;
-
- private Position position;
-
- public GlobalStatement(Object parent, String[] variables, int sourceStart, int sourceEnd) {
- super(sourceStart, sourceEnd);
- this.variables = variables;
- this.parent = parent;
- position = new Position(sourceStart, sourceEnd);
- }
-
- public String toString() {
- StringBuffer buff = new StringBuffer("global ");
- for (int i = 0; i < variables.length; i++) {
- if (i != 0) {
- buff.append(", ");
- }
- buff.append(variables[i]);
- }
- return buff.toString();
- }
-
- public String toString(int tab) {
- return tabString(tab) + toString();
- }
-
- /**
- * This will return the image for the outline of the object.
- * @return an image
- */
- public ImageDescriptor getImage() {
- return PHPUiImages.DESC_INC;
- }
-
- public Object getParent() {
- return parent;
- }
-
- public Position getPosition() {
- return position;
- }
-}