diff --git a/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowDelegationStage.java b/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowDelegationStage.java index a945573..59542e5 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowDelegationStage.java +++ b/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowDelegationStage.java @@ -464,12 +464,27 @@ ObjectNodeAttribute entryObjAttr = new ObjectNodeAttribute(entryPointObjNode); - mxCell channel = (mxCell)graph.insertVertex(layerCell, null, entryObjAttr, 150, 20, 30, 30); - mxCell port_out = new mxCell(null, outPortGeometry, "shape=ellipse;perimter=ellipsePerimeter"); - port_out.setVertex(true); + // + mxCell dataFlowLayerCell = (mxCell)root.getChildAt(Stage.DATA_FLOW_LAYER); + for(int i = 0; i < dataFlowLayerCell.getChildCount(); i++) { + mxCell channelCell =(mxCell)dataFlowLayerCell.getChildAt(i); - graph.addCell(port_out, channel); // insert the output port of a channel - ioChannelCells.put(entryPointObjNode, channel); + String entryPointObjNodeName = entryPointObjNode.getIoChannelGenerator().getChannelName(); + String channelCellName = ""; + if(channelCell.getValue() instanceof String) channelCellName = (String) channelCell.getValue(); + else continue; + + if(!entryPointObjNodeName.equals(channelCellName))continue; + + mxCell entryPointCelll = (mxCell)graph.insertVertex(layerCell, null, entryObjAttr, + /* scale */ channelCell.getGeometry().getX(), channelCell.getGeometry().getY(), + /* geometry*/channelCell.getGeometry().getWidth(), channelCell.getGeometry().getHeight()); + mxCell port_out = new mxCell(null, outPortGeometry, "shape=ellipse;perimter=ellipsePerimeter"); + port_out.setVertex(true); + + graph.addCell(port_out, entryPointCelll); // insert the output port of a channel + ioChannelCells.put(entryPointObjNode, entryPointCelll); + } } } finally {