Two interfaces added for outlineable objects
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / parser / PHPSegmentWithChildren.java
index 4b1cb81..172b90d 100644 (file)
@@ -7,7 +7,7 @@ import java.util.List;
  * An abstract PHPSegment that can have children.
  * @author khartlage, Matthieu Casanova
  */
-public abstract class PHPSegmentWithChildren extends PHPSegment {
+public abstract class PHPSegmentWithChildren extends PHPSegment implements OutlineableWithChildren {
   private ArrayList children;
 
   /**
@@ -31,7 +31,7 @@ public abstract class PHPSegmentWithChildren extends PHPSegment {
    * @param o function declaration to be appended to this list.
    * @return <tt>true</tt> (as per the general contract of Collection.add).
    */
-  public boolean add(PHPSegment o) {
+  public boolean add(Outlineable o) {
     return children.add(o);
   }
 
@@ -43,8 +43,8 @@ public abstract class PHPSegmentWithChildren extends PHPSegment {
    * @throws    java.lang.IndexOutOfBoundsException if index is out of range <tt>(index
    *      &lt; 0 || index &gt;= size())</tt>.
    */
-  public PHPSegment get(int index) {
-    return (PHPSegment) children.get(index);
+  public Outlineable get(int index) {
+    return (Outlineable) children.get(index);
   }
 
   /**