diff --git a/AlgebraicDataflowArchitectureModel/src/application/editor/Editor.java b/AlgebraicDataflowArchitectureModel/src/application/editor/Editor.java index 63702cd..ab13d4d 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/editor/Editor.java +++ b/AlgebraicDataflowArchitectureModel/src/application/editor/Editor.java @@ -127,7 +127,7 @@ graph.getModel().addListener(mxEvent.CHANGE, curChangeEventListener); } curStage = nextStage; - // notifyStageChangeListeners(); // <- roop? + notifyStageChangeListeners(); return true; } @@ -176,7 +176,6 @@ model = null; ((DataFlowModelingStage) curStage).clear(); - notifyStageChangeListeners(); curFilePath = null; curFileName = null; @@ -218,7 +217,6 @@ // Change to the push/pull selection stage, analyze the data transfer model and construct a data-flow graph. changeStage(STAGE_PUSH_PULL_SELECTION); - notifyStageChangeListeners(); curFilePath = file.getAbsolutePath(); curFileName = file.getName(); @@ -255,7 +253,6 @@ // Change to the push/pull selection stage, analyze the data transfer model and construct a data-flow graph. changeStage(STAGE_PUSH_PULL_SELECTION); - notifyStageChangeListeners(); curFilePath = file.getAbsolutePath(); curFileName = file.getName(); @@ -427,7 +424,6 @@ ((DataFlowModelingStage) curStage).addIdentifierTemplate(res); model = ((DataFlowModelingStage) curStage).getModel(); - notifyStageChangeListeners(); } public void addChannelGenerator(DataTransferChannelGenerator channelGen) { @@ -437,7 +433,7 @@ ((DataFlowModelingStage) curStage).addChannelGenerator(channelGen); model = ((DataFlowModelingStage) curStage).getModel(); - notifyStageChangeListeners(); + } public void addIOChannelGenerator(DataTransferChannelGenerator ioChannelGen) { @@ -447,7 +443,6 @@ ((DataFlowModelingStage) curStage).addIOChannelGenerator(ioChannelGen); model = ((DataFlowModelingStage) curStage).getModel(); - notifyStageChangeListeners(); } public void addFormulaChannelGenerator(FormulaChannelGenerator formulaChannelGen) { @@ -457,7 +452,6 @@ ((DataFlowModelingStage) curStage).addFormulaChannelGenerator(formulaChannelGen); model = ((DataFlowModelingStage) curStage).getModel(); - notifyStageChangeListeners(); } public boolean connectEdge(mxCell edge, mxCell src, mxCell dst) { @@ -466,7 +460,7 @@ if (!stageChanged) return false; boolean isConnected = ((DataFlowModelingStage) curStage).connectEdge(edge, src, dst); - notifyStageChangeListeners(); + return isConnected; } @@ -476,7 +470,6 @@ if (!stageChanged) return; ((DataFlowModelingStage) curStage).delete(); - notifyStageChangeListeners(); } public static class SrcDstAttribute extends EdgeAttribute {