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;
import java.util.ArrayList;
+import java.util.List;
/**
* It's a php document.
*/
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);
}
/**
break;
}
buff.append(node.toString(0));
+ if (node instanceof HTMLCode) {
+ buff.append("\n");
+ } else {
+ buff.append(";\n");
+ }
}
}
return buff.toString();
public Object getParent() {
return parent;
}
+
+ public Position getPosition() {
+ return position;
+ }
+
+ public List getList() {
+ return children;
+ }
}
\ No newline at end of file