diff --git a/AlgebraicDataflowArchitectureModel/src/models/controlFlowModel/CallGraph.java b/AlgebraicDataflowArchitectureModel/src/models/controlFlowModel/CallGraph.java index fbd3356..954c688 100644 --- a/AlgebraicDataflowArchitectureModel/src/models/controlFlowModel/CallGraph.java +++ b/AlgebraicDataflowArchitectureModel/src/models/controlFlowModel/CallGraph.java @@ -16,19 +16,22 @@ } public void addNode(Node node) { - super.addNode(node); if (node instanceof ResourceNode) { ResourceNode resNode = (ResourceNode) node; StatefulObjectNode objNode = statefulObjMap.get(resNode); if (objNode == null) { objNode = new StatefulObjectNode(resNode); statefulObjMap.put(resNode, objNode); + super.addNode(objNode); } } else if (node instanceof StatefulObjectNode) { StatefulObjectNode objNode = (StatefulObjectNode) node; if (statefulObjMap.get(objNode.getResource()) == null) { statefulObjMap.put(objNode.getResource(), objNode); + super.addNode(objNode); } + } else { + super.addNode(node); } }