@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ExecutionNodeUsage other = (ExecutionNodeUsage) obj; if (theNode.getLine() == null) { if (other.theNode.getLine() != null) { return false; } } else if (!theNode.getLine().equals(other.theNode.getLine())) { return false; } return true; }
private void processChildrenForCallHierarchy(final List children) { for (final Object obj : children) { final IExecutionNode node = (IExecutionNode) obj; addToCallHierarchy(node); log.trace("looking at node description: " + node.getDescription() + " line: " + node.getLine()); if (NodeWithChildren.class.isAssignableFrom(node.getClass())) { final NodeWithChildren nodeWithChildren = (NodeWithChildren) node; log.trace("proccessing children..."); processChildrenForCallHierarchy(nodeWithChildren.getChildren()); } } }
/** * @param node */ private void addToCallHierarchy(final IExecutionNode node) { final ExecutionNodeUsage usage = new ExecutionNodeUsage(node); log.trace("building usage for desc: " + node.getDescription() + " line: " + node.getLine()); List<ExecutionNodeUsage> immediateParents = callerHierarchy.get(usage); if (immediateParents == null) { log.trace("no uses already for node..."); immediateParents = new ArrayList<ExecutionNodeUsage>(); callerHierarchy.put(usage, immediateParents); } log.trace("adding used by descr: " + node.getParent().getDescription() + " line: " + node.getParent().getLine()); immediateParents.add(new ExecutionNodeUsage(node.getParent())); }
/** * */ private void processChildrenForCallHierarchy(final List children){ for (final Object obj : children){ final IExecutionNode node = (IExecutionNode)obj; addToCallHierarchy(node); log.trace("looking at node description: " + node.getDescription() + " line: " + node.getLine()); if (NodeWithChildren.class.isAssignableFrom(node.getClass())){ final NodeWithChildren nodeWithChildren = (NodeWithChildren)node; log.trace("proccessing children..."); processChildrenForCallHierarchy(nodeWithChildren.getChildren()); } } }
/** * @param node */ private void addToCallHierarchy(final IExecutionNode node) { final ExecutionNodeUsage usage = new ExecutionNodeUsage(node); log.trace("building usage for desc: " + node.getDescription() + " line: " + node.getLine()); List<ExecutionNodeUsage> immediateParents = callerHierarchy.get(usage); if (immediateParents == null){ log.trace("no uses already for node..."); immediateParents = new ArrayList<ExecutionNodeUsage>(); callerHierarchy.put(usage, immediateParents); } else { log.trace("got existing usages of node: "); for (final ExecutionNodeUsage u : immediateParents){ log.trace("already found: " + u.toString()); } } log.trace("adding used by descr: " + node.getParent().getDescription() + " line: " + node.getParent().getLine()); immediateParents.add(new ExecutionNodeUsage(node.getParent())); }