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;
-import java.util.Enumeration;
+import java.util.List;
/**
/** 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
this.parent = parent;
this.name = name;
this.superclass = superclass;
+ position = new Position(sourceStart, name.length);
}
/**
super(sourceStart, sourceEnd);
this.parent = parent;
this.name = name;
+ position = new Position(sourceStart, name.length);
}
public void addMethod(MethodDeclaration method) {
methods.add(method);
- children.add(method);
+ add(method);
if (method.name.equals(name)) {
constructor = method;
}
}
public int size() {
+ PHPeclipsePlugin.log(1,"class size : "+children.size());
return children.size();
}
+
+ public String toString() {
+ final StringBuffer buff = new StringBuffer(new String(name));//$NON-NLS-1$
+ if (superclass != null) {
+ buff.append(":"); //$NON-NLS-1$
+ buff.append(superclass);
+ }
+ return buff.toString();
+ }
+
+ public Position getPosition() {
+ return position;
+ }
+
+ public List getList() {
+ return children;
+ }
}