diff --git a/AlgebraicDataflowArchitectureModel/src/application/editor/stages/DependencyModelingStage.java b/AlgebraicDataflowArchitectureModel/src/application/editor/stages/DependencyModelingStage.java index 8065336..d146e49 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/editor/stages/DependencyModelingStage.java +++ b/AlgebraicDataflowArchitectureModel/src/application/editor/stages/DependencyModelingStage.java @@ -275,11 +275,9 @@ for (StatefulObjectNode statefulObjectNode : dependencyGraph.getRootStatefulObjectNodes()) { mxCell oldCell = statefulObjectNodeToCell.get(statefulObjectNode); if (oldCell != null) { - mxCell newCell = cloneResourceCellHierarchy(oldCell, dependencyLayer, resNodeCells); - resNodeCells.put(statefulObjectNode, newCell); + cloneResourceCellHierarchy(oldCell, dependencyLayer, resNodeCells); } } - return resNodeCells; } @@ -418,40 +416,33 @@ mxCell layerCell = (mxCell) root.getChildAt(DEPENDENCY_LAYER); for (Edge callEdge : dependencyGraph.getEdges()) { - Node srcNode = callEdge.getSource(); Node dstNode = callEdge.getDestination(); mxCell srcCell = null; mxCell dstCell = null; - - // Resource → Resource edges (for layout consistency) boolean srcIsRes = false; boolean dstIsRes = false; - // Determine if the source is an EventChannel or a Resource - if(srcNode instanceof EventChannelObjectNode){ + if (srcNode instanceof EventChannelObjectNode) { srcCell = eventChNodeCells.get(srcNode); - } else if (srcNode instanceof StatefulObjectNode){ + } else if (srcNode instanceof StatefulObjectNode) { srcCell = resNodeCells.get(srcNode); srcIsRes = true; } - // Determine if the destination is an EventChannel or a Resource - if(dstNode instanceof EventChannelObjectNode){ + if (dstNode instanceof EventChannelObjectNode) { dstCell = eventChNodeCells.get(dstNode); - } else if (dstNode instanceof StatefulObjectNode){ + } else if (dstNode instanceof StatefulObjectNode) { dstCell = resNodeCells.get(dstNode); dstIsRes = true; } - // Skip if either side cannot be resolved to a cell if (srcCell == null || dstCell == null) continue; String style = dependencyEdgeStyle; if (srcIsRes && dstIsRes) { - // Compute child index to determine styling direction int childIndex = getChildIndex(srcCell, dstCell); if (childIndex == 0) {