summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ajde/src/org/aspectj/ajde/ui/StructureViewNodeFactory.java22
1 files 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);