From c5ac111c5b5cc2a17d9d094eb7c0032940a4f2ff Mon Sep 17 00:00:00 2001 From: mkersten Date: Fri, 15 Oct 2004 15:54:50 +0000 Subject: [PATCH] Change to prevent "uses-pointcut" nodes from appearing by default within the structure views. --- .../ajde/ui/StructureViewNodeFactory.java | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) 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); -- 2.39.5