public void addOutputEdge(EclipseCFGEdge edge) {
outputs.add(edge);
}
public Node addToGraph(Graph graph) {
Node thisNode = graph.findNodeByName(myId);
if (thisNode == null) {
thisNode = new Node(graph);
thisNode.setName(myId);
thisNode.setAttribute(Node.LABEL_ATTR, getName());
thisNode.setAttribute(Node.FONTNAME_ATTR, "Helvetica");
thisNode.setAttribute(Node.FONTSIZE_ATTR, new Integer(10));
graph.addNode(thisNode);
for (EclipseCFGEdge eclipseEdge : outputs) {
EclipseCFGNode eclipseNode = eclipseEdge.getSink();
Node source = eclipseNode.addToGraph(graph);
eclipseEdge.addToGraph(graph, thisNode, source);
}
}
return thisNode;
}