X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPContentOutlinePage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPContentOutlinePage.java index bdc86d8..78afe4e 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPContentOutlinePage.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPContentOutlinePage.java @@ -18,9 +18,7 @@ import java.util.Comparator; import java.util.List; import java.util.TreeSet; -import net.sourceforge.phpdt.internal.compiler.parser.PHPOutlineInfo; -import net.sourceforge.phpdt.internal.compiler.parser.PHPSegment; -import net.sourceforge.phpdt.internal.compiler.parser.PHPSegmentWithChildren; +import net.sourceforge.phpdt.internal.compiler.parser.*; import net.sourceforge.phpdt.internal.ui.viewsupport.ImageDescriptorRegistry; import net.sourceforge.phpeclipse.PHPeclipsePlugin; @@ -61,7 +59,7 @@ public class PHPContentOutlinePage extends ContentOutlinePage { if (o2 instanceof PHPSegmentWithChildren && !(o1 instanceof PHPSegmentWithChildren)) { return -1; } - return ((PHPSegment) o1).toString().compareToIgnoreCase(((PHPSegment) o2).toString()); + return ((Outlineable) o1).toString().compareToIgnoreCase(((Outlineable) o2).toString()); } } @@ -106,14 +104,13 @@ public class PHPContentOutlinePage extends ContentOutlinePage { PHPOutlineInfo outlineInfo = parser.parseInfo(fInput, text); fVariables = outlineInfo.getVariables(); - PHPSegmentWithChildren declarations = outlineInfo.getDeclarations(); - PHPSegment temp; + OutlineableWithChildren declarations = outlineInfo.getDeclarations(); + Outlineable temp; for (int i = 0; i < declarations.size(); i++) { temp = declarations.get(i); fContent.add(temp); } Collections.sort(fContent, new SegmentComparator()); - } /* @@ -194,8 +191,8 @@ public class PHPContentOutlinePage extends ContentOutlinePage { * @see ITreeContentProvider#getParent(Object) */ public Object getParent(Object element) { - if (element instanceof PHPSegment) { - return ((PHPSegment) element).getParent(); + if (element instanceof Outlineable) { + return ((Outlineable) element).getParent(); } return null; } @@ -225,8 +222,8 @@ public class PHPContentOutlinePage extends ContentOutlinePage { * override. */ public Image getImage(Object element) { - if (element instanceof PHPSegment) { - ImageDescriptor descriptor = ((PHPSegment) element).getImage(); + if (element instanceof Outlineable) { + ImageDescriptor descriptor = ((Outlineable) element).getImage(); return fRegistry.get(descriptor); } return null;