]> source.dussan.org Git - aspectj.git/commitdiff
Fixed bad cast.
authormkersten <mkersten>
Fri, 8 Aug 2003 14:30:56 +0000 (14:30 +0000)
committermkersten <mkersten>
Fri, 8 Aug 2003 14:30:56 +0000 (14:30 +0000)
ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java
ajde/src/org/aspectj/ajde/ui/swing/SwingTreeViewNodeRenderer.java

index 4473dc1e93c86d26888897a3f0b73a0c66682aac..35417834a697e8264de4b723099a45217f553230 100644 (file)
@@ -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;
     }
 
index 9f19770b40b925a01e16bea85118bcf9fc57c378..907843544c9951efdfd26c3a33d0413842e7fc5a 100644 (file)
@@ -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;
     }
 }