diff --git a/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowModelingStage.java b/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowModelingStage.java index 6547563..feea075 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowModelingStage.java +++ b/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowModelingStage.java @@ -98,6 +98,17 @@ }; } + /** + * Creates and returns a mouse event listener for the given editor. + * The listener monitors mouse events such as `mousePressed` and `mouseReleased` + * to display context menus and handle shortcut creation when certain + * conditions are met on the selected graph elements. + * + * @param editor The editor instance for which the mouse event listener is created. + * It is used to access the editor's context and operations. + * @return A `MouseListener` that adds custom behavior for mouse events, including + * showing popup actions and handling shortcut creation on selected graph edges. + */ @Override public MouseListener createMouseEventListener(final Editor editor) { return new MouseAdapter() { @@ -261,6 +272,12 @@ }; } + /** + * Reconstructs the control flow graph by clearing the current graph structure + * and rebuilding it using the provided mapping of nodes and channels to cells. + * This method resets the existing graph and generates a new one based on + * the current state of the mappings. + */ public void reconstructGraph() { clearControlFlowGraphCells(graph); graph = constructGraph(graph, resNodeToCell, channelToCell);