*** empty log message ***
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / ClassDeclaration.java
index 91378a0..18f52c1 100644 (file)
@@ -5,6 +5,7 @@ import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
 import net.sourceforge.phpdt.internal.ui.PHPUiImages;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.text.Position;
 
 import java.util.ArrayList;
 
@@ -37,6 +38,7 @@ public class ClassDeclaration extends Statement implements OutlineableWithChildr
   /** The outlineable children (those will be in the node array too. */
   private ArrayList children = new ArrayList();
 
+  private Position position;
   /**
    * Create a class giving starting and ending offset
    * @param sourceStart starting offset
@@ -51,6 +53,7 @@ public class ClassDeclaration extends Statement implements OutlineableWithChildr
     this.parent = parent;
     this.name = name;
     this.superclass = superclass;
+    position = new Position(sourceStart, name.length);
   }
 
   /**
@@ -165,4 +168,8 @@ public class ClassDeclaration extends Statement implements OutlineableWithChildr
   public String toString() {
     return toStringHeader();
   }
+
+  public Position getPosition() {
+    return position;
+  }
 }