From: mkersten Date: Fri, 15 Oct 2004 15:54:50 +0000 (+0000) Subject: Change to prevent "uses-pointcut" nodes from appearing by default X-Git-Tag: V1_2_1~18 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c5ac111c5b5cc2a17d9d094eb7c0032940a4f2ff;p=aspectj.git Change to prevent "uses-pointcut" nodes from appearing by default within the structure views. --- diff --git a/ajde/src/org/aspectj/ajde/ui/StructureViewNodeFactory.java b/ajde/src/org/aspectj/ajde/ui/StructureViewNodeFactory.java index 2e6693d56..54d932589 100644 --- a/ajde/src/org/aspectj/ajde/ui/StructureViewNodeFactory.java +++ b/ajde/src/org/aspectj/ajde/ui/StructureViewNodeFactory.java @@ -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);