]> source.dussan.org Git - aspectj.git/commitdiff
Change to prevent "uses-pointcut" nodes from appearing by default
authormkersten <mkersten>
Fri, 15 Oct 2004 15:54:50 +0000 (15:54 +0000)
committermkersten <mkersten>
Fri, 15 Oct 2004 15:54:50 +0000 (15:54 +0000)
within the structure views.

ajde/src/org/aspectj/ajde/ui/StructureViewNodeFactory.java

index 2e6693d56d1fb0f30e428d77f41dba6faf0eb849..54d9325896e2e66ac7d855be7bbd8749d2432edc 100644 (file)
@@ -50,16 +50,18 @@ public abstract class StructureViewNodeFactory {
                                                        rel, 
                                                        iconRegistry.getIcon(rel.getKind())
                                                );
+                                               if (relNode != null) {
                                                svNode.add(relNode, 0);                                 
-                                               for (Iterator it2 = rel.getTargets().iterator(); it2.hasNext(); ) {
-                                                       String handle = (String)it2.next();
-                                                       IProgramElement link = AsmManager.getDefault().getHierarchy().findElementForHandle(handle);
-                                                       if (link != null) {
-                                                               IStructureViewNode linkNode = createLink(
-                                                                       link,   
-                                                                       iconRegistry.getStructureIcon(link.getKind(), link.getAccessibility())  
-                                                               );      
-                                                               relNode.add(linkNode);
+                                                       for (Iterator it2 = rel.getTargets().iterator(); it2.hasNext(); ) {
+                                                               String handle = (String)it2.next();
+                                                               IProgramElement link = AsmManager.getDefault().getHierarchy().findElementForHandle(handle);
+                                                               if (link != null) {
+                                                                       IStructureViewNode linkNode = createLink(
+                                                                               link,   
+                                                                               iconRegistry.getStructureIcon(link.getKind(), link.getAccessibility())  
+                                                                       );      
+                                                                       relNode.add(linkNode);
+                                                               }
                                                        }
                                                }
                                        }
@@ -76,6 +78,8 @@ public abstract class StructureViewNodeFactory {
        
        /**
         * Implementors must override this method in order to create new relationship nodes.
+        * 
+        * If returned node is null it will not be added to the tree.
         */     
        protected abstract IStructureViewNode createRelationship(IRelationship relationship, AbstractIcon icon);