*** empty log message ***
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / PHPDocument.java
index b2f523d..e2d2fc5 100644 (file)
@@ -7,6 +7,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.text.Position;
 
 import java.util.ArrayList;
+import java.util.List;
 
 /**
  * It's a php document.
@@ -22,18 +23,22 @@ public class PHPDocument implements OutlineableWithChildren {
    */
   public AstNode[] nodes;
 
+  public char[] name;
   /** The parent of the object. */
   public Object parent;
 
   /** The outlineable children (those will be in the node array too. */
   private ArrayList children = new ArrayList();
 
+  private Position position;
   /**
    * Create the PHPDocument.
    * @param parent the parent object (it should be null isn't it ?)
    */
-  public PHPDocument(Object parent) {
+  public PHPDocument(Object parent, char[] name) {
     this.parent = parent;
+    this.name = name;
+    position = new Position(1,name.length);
   }
 
   /**
@@ -51,6 +56,7 @@ public class PHPDocument implements OutlineableWithChildren {
           break;
         }
         buff.append(node.toString(0));
+        buff.append(";\n");
       }
     }
     return buff.toString();
@@ -99,7 +105,10 @@ public class PHPDocument implements OutlineableWithChildren {
   }
 
   public Position getPosition() {
-    //todo : check this
-    return null;
+    return position;
+  }
+
+  public List getList() {
+    return children;
   }
 }
\ No newline at end of file