*** empty log message ***
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / FieldDeclaration.java
index c64ba6b..69b3616 100644 (file)
@@ -1,5 +1,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;
+
 /**
  * A Field declaration.
  * This is a variable declaration for a php class
@@ -8,20 +13,24 @@ package net.sourceforge.phpdt.internal.compiler.ast;
  * var $toto,$tata;
  * @author Matthieu Casanova
  */
-public class FieldDeclaration extends Statement {
+public class FieldDeclaration extends Statement implements Outlineable {
 
   /** The variables. */
   public VariableDeclaration[] vars;
 
+  private Object parent;
+  private Position position;
   /**
    * Create a new field.
    * @param vars the array of variables.
    * @param sourceStart the starting offset
    * @param sourceEnd   the ending offset
    */
-  public FieldDeclaration(VariableDeclaration[] vars, int sourceStart, int sourceEnd) {
+  public FieldDeclaration(VariableDeclaration[] vars, int sourceStart, int sourceEnd, Object parent) {
     super(sourceStart, sourceEnd);
     this.vars = vars;
+    this.parent = parent;
+    position = new Position(sourceStart, sourceEnd);
   }
 
   /**
@@ -41,4 +50,20 @@ public class FieldDeclaration extends Statement {
     }
     return buff.toString();
   }
+
+  /**
+   * Get the image of a variable.
+   * @return the image that represents a php variable
+   */
+  public ImageDescriptor getImage() {
+      return PHPUiImages.DESC_VAR;
+  }
+
+  public Object getParent() {
+    return parent;
+  }
+
+  public Position getPosition() {
+    return position;
+  }
 }