From 07ec8f62517b23d08ae060875db3d86ae94d009d Mon Sep 17 00:00:00 2001 From: mkersten Date: Fri, 8 Aug 2003 14:30:56 +0000 Subject: [PATCH] Fixed bad cast. --- .../ui/internal/TreeStructureViewBuilder.java | 33 ++++++++++--------- .../ui/swing/SwingTreeViewNodeRenderer.java | 10 +++--- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java b/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java index 4473dc1e9..35417834a 100644 --- a/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java +++ b/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java @@ -113,14 +113,15 @@ public class TreeStructureViewBuilder { node.setRunnable(false); } } -// if (node.getChildren() != null) { -// for (Iterator it = node.getChildren().iterator(); it.hasNext(); ) { -// IProgramElement IProgramElement = (IProgramElement)it.next(); -// if (acceptNode(IProgramElement, properties)) { -// children.add(createViewNode(IProgramElement, properties)); -// } -// } -// } + if (node.getChildren() != null) { + for (Iterator it = node.getChildren().iterator(); it.hasNext(); ) { + IProgramElement IProgramElement = (IProgramElement)it.next(); + if (acceptNode(IProgramElement, properties)) { + children.add(createViewNode(IProgramElement, properties)); + } + } + } + StructureViewNode viewNode = nodeFactory.createNode(node, children);//new TreeViewNode(root, null, children); return viewNode; } @@ -178,9 +179,9 @@ public class TreeStructureViewBuilder { } } } - } else if (node instanceof IRelationship) { - IRelationship relation = (IRelationship)node; - return properties.getRelations().contains(relation); +// } else if (node instanceof IRelationship) { +// IRelationship relation = (IRelationship)node; +// return properties.getRelations().contains(relation); } else { return true; } @@ -355,11 +356,11 @@ public class TreeStructureViewBuilder { private StructureViewNode getRelations(IRelationship node) { //StructureViewNode treeNode = new StructureViewNode(node); StructureViewNode treeNode = nodeFactory.createNode(node); - for (Iterator it = node.getTargets().iterator(); it.hasNext(); ) { - treeNode.add( - nodeFactory.createNode((IProgramElement)it.next()) - ); - } +// for (Iterator it = node.getTargets().iterator(); it.hasNext(); ) { +// treeNode.add( +// nodeFactory.createNode((IProgramElement)it.next()) +// ); +// } return treeNode; } diff --git a/ajde/src/org/aspectj/ajde/ui/swing/SwingTreeViewNodeRenderer.java b/ajde/src/org/aspectj/ajde/ui/swing/SwingTreeViewNodeRenderer.java index 9f19770b4..907843544 100644 --- a/ajde/src/org/aspectj/ajde/ui/swing/SwingTreeViewNodeRenderer.java +++ b/ajde/src/org/aspectj/ajde/ui/swing/SwingTreeViewNodeRenderer.java @@ -58,7 +58,7 @@ class SwingTreeViewNodeRenderer extends DefaultTreeCellRenderer { } else { setIcon(null); } - + if (node instanceof IProgramElement) { // if (pNode.isRunnable()) { // //setIcon(AjdeUIManager.getDefault().getIconRegistry().getExecuteIcon()); @@ -79,10 +79,10 @@ class SwingTreeViewNodeRenderer extends DefaultTreeCellRenderer { } } - } else if (node instanceof IRelationship) { - this.setFont(new Font(this.getFont().getName(), Font.ITALIC, this.getFont().getSize())); - } - + } +// else if (node instanceof IRelationship) { +// this.setFont(new Font(this.getFont().getName(), Font.ITALIC, this.getFont().getSize())); +// } return this; } } -- 2.39.5