diff --git a/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowDelegationStage.java b/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowDelegationStage.java index 0483b83..db7a99f 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowDelegationStage.java +++ b/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowDelegationStage.java @@ -154,7 +154,7 @@ } // Insert an edge - CallEdgeAttribute newAttr = new CallEdgeAttribute(targetEdgeAttr.getCallEdge(), dstObjNodeCell, dstNodeCell); + CallEdgeAttribute newAttr = new CallEdgeAttribute(targetEdgeAttr.getCallEdge(), targetEdgeAttr.getOriginalSourceObjectNode(),dstObjNodeCell, dstNodeCell); graph.insertEdge(controlLayerCell, "", newAttr, dstObjNodeCell, dstNodeCell, "movable=false;"); resetGraph(); @@ -497,7 +497,7 @@ if(srcNodeCell == null || dstNodeCell == null) continue; - CallEdgeAttribute callEdgeAttr = new CallEdgeAttribute(callEdge, srcNodeCell, dstNodeCell); + CallEdgeAttribute callEdgeAttr = new CallEdgeAttribute(callEdge, (ObjectNode)callEdge.getSource(), srcNodeCell, dstNodeCell); // If "srcResNode" types of "EntryPointObjectNode" (= channel) // then parameter references to geometry of "outPort". diff --git a/AlgebraicDataflowArchitectureModel/src/models/controlFlowModel/CallEdgeAttribute.java b/AlgebraicDataflowArchitectureModel/src/models/controlFlowModel/CallEdgeAttribute.java index 21b9322..2658597 100644 --- a/AlgebraicDataflowArchitectureModel/src/models/controlFlowModel/CallEdgeAttribute.java +++ b/AlgebraicDataflowArchitectureModel/src/models/controlFlowModel/CallEdgeAttribute.java @@ -10,6 +10,7 @@ */ public class CallEdgeAttribute extends EdgeAttribute { private CallEdge callEdge = null; + private ObjectNode orginalSrcObjNode = null; private mxCell srcCell = null; private mxCell dstCell = null; @@ -18,6 +19,19 @@ /************************************************************* * */ + public CallEdgeAttribute(CallEdge callEdge, ObjectNode originalSrcObjNode, final mxCell srcCell, final mxCell dstCell) { + this.callEdge = callEdge; + this.callEdge.setAttribute(this); + + this.orginalSrcObjNode = originalSrcObjNode; + + this.srcCell = srcCell; + this.dstCell = dstCell; + } + + /************************************************************* + * + */ public CallEdgeAttribute(CallEdge callEdge, final mxCell srcCell, final mxCell dstCell) { this.callEdge = callEdge; this.callEdge.setAttribute(this); @@ -25,6 +39,7 @@ this.srcCell = srcCell; this.dstCell = dstCell; } + /************************************************************* * [ *public ] @@ -35,6 +50,10 @@ return callEdge; } + public ObjectNode getOriginalSourceObjectNode() { + return orginalSrcObjNode; + } + public PushPullValue getSelectedOption() { return callEdge.getSelectedOption(); } @@ -67,11 +86,10 @@ @Override public String toString() { String value = ""; - value += callEdge.getSelectedOption().name(); if(2 <= callEdge.getSource().getOutEdges( ).size()) { int order = (((ObjectNode)callEdge.getSource()).getOutEdgeCallOrder(callEdge)+ 1); - value += ":[" + order + "]"; + value += "[" + order + "]"; } return value; diff --git a/AlgebraicDataflowArchitectureModel/src/models/controlFlowModel/ObjectNodeAttribute.java b/AlgebraicDataflowArchitectureModel/src/models/controlFlowModel/ObjectNodeAttribute.java index 9462f7a..0a5efa9 100644 --- a/AlgebraicDataflowArchitectureModel/src/models/controlFlowModel/ObjectNodeAttribute.java +++ b/AlgebraicDataflowArchitectureModel/src/models/controlFlowModel/ObjectNodeAttribute.java @@ -1,7 +1,5 @@ package models.controlFlowModel; -import com.mxgraph.model.mxCell; - import models.NodeAttribute; /*************************************************************