X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassDeclaration.java index bbc9775..18f52c1 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassDeclaration.java @@ -5,9 +5,9 @@ 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; -import java.util.Enumeration; /** @@ -38,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 @@ -52,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); } /** @@ -70,7 +72,7 @@ public class ClassDeclaration extends Statement implements OutlineableWithChildr public void addMethod(MethodDeclaration method) { methods.add(method); - children.add(method); + add(method); if (method.name.equals(name)) { constructor = method; } @@ -159,6 +161,15 @@ public class ClassDeclaration extends Statement implements OutlineableWithChildr } public int size() { + PHPeclipsePlugin.log(1,"class size : "+children.size()); return children.size(); } + + public String toString() { + return toStringHeader(); + } + + public Position getPosition() { + return position; + } }