SBSE is now on per default
authorDaniel Kirschten <daniel.kirschten@gmx.de>
Mon, 2 Nov 2020 20:22:50 +0000 (21:22 +0100)
committerDaniel Kirschten <daniel.kirschten@gmx.de>
Mon, 2 Nov 2020 20:24:01 +0000 (21:24 +0100)
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/views/SimulationView.java

index 0dffceb..179843b 100644 (file)
@@ -75,6 +75,7 @@ public class SimulationView extends ViewPart
                controlsToDisableWhenNoMachinePresent = new HashSet<>();
                memCellListener = a -> instPreview.refresh();
                // TODO use Step Over instead
+               // TODO this should not be managed by the Simulation View
                clockObserver = o ->
                {
                        if (((CoreClock) o).isOn())
@@ -142,7 +143,7 @@ public class SimulationView extends ViewPart
                        else
                                cl.deregisterObserver(clockObserver);
                });
-               sbseButton.setSelection(false);
+               sbseButton.setSelection(true);
 
                Label simSpeedLabel = new Label(c, SWT.NONE);
                controlsToDisableWhenNoMachinePresent.add(simSpeedLabel);
@@ -283,6 +284,9 @@ public class SimulationView extends ViewPart
                        // update preview
                        contentProvider.setMachine(machine);
 
+                       // enable SBSE
+                       machine.getClock().registerObserver(clockObserver);
+
                        // initialize executer
                        debugTarget.addExecutionSpeedListener(executionSpeedListener);
                        speedFactorChanged(debugTarget.getExecutionSpeed());
@@ -303,7 +307,7 @@ public class SimulationView extends ViewPart
                        debugTarget.getMachine().getMicroInstructionMemory().deregisterCellModifiedListener(memCellListener);
                        debugTarget.getMachine().getClock().deregisterObserver(clockObserver);
                        if (sbseButton != null && !sbseButton.isDisposed())
-                               sbseButton.setSelection(false);
+                               sbseButton.setSelection(true);
                }
        }