1 package net.sourceforge.phpdt.internal.compiler.ast;
3 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
4 import net.sourceforge.phpdt.internal.ui.PHPUiImages;
5 import org.eclipse.jface.resource.ImageDescriptor;
6 import org.eclipse.jface.text.Position;
9 * A GlobalStatement statement in php.
10 * @author Matthieu Casanova
12 public class GlobalStatement extends Statement implements Outlineable {
14 /** An array of the variables called by this global statement. */
15 public String[] variables;
17 private Object parent;
19 private Position position;
21 public GlobalStatement(Object parent, String[] variables, int sourceStart, int sourceEnd) {
22 super(sourceStart, sourceEnd);
23 this.variables = variables;
25 position = new Position(sourceStart, sourceEnd);
28 public String toString() {
29 StringBuffer buff = new StringBuffer("global ");
30 for (int i = 0; i < variables.length; i++) {
34 buff.append(variables[i]);
36 return buff.toString();
39 public String toString(int tab) {
40 return tabString(tab) + toString();
44 * This will return the image for the outline of the object.
47 public ImageDescriptor getImage() {
48 return PHPUiImages.DESC_INC;
51 public Object getParent() {
55 public Position getPosition() {