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;
 
   8  * A GlobalStatement statement in php.
 
   9  * @author Matthieu Casanova
 
  11 public class GlobalStatement extends Statement implements Outlineable {
 
  13   /** An array of the variables called by this global statement. */
 
  14   public String[] variables;
 
  16   private Object parent;
 
  18   public GlobalStatement(Object parent, String[] variables, int sourceStart, int sourceEnd) {
 
  19     super(sourceStart, sourceEnd);
 
  20     this.variables = variables;
 
  24   public String toString() {
 
  25     StringBuffer buff = new StringBuffer("global ");
 
  26     for (int i = 0; i < variables.length; i++) {
 
  30       buff.append(variables[i]);
 
  32     return buff.toString();
 
  35   public String toString(int tab) {
 
  36     return tabString(tab) + toString();
 
  40    * This will return the image for the outline of the object.
 
  43   public ImageDescriptor getImage() {
 
  44     return PHPUiImages.DESC_INC;
 
  47   public Object getParent() {