From: Daniel Kirschten Date: Mon, 2 Nov 2020 20:22:50 +0000 (+0100) Subject: SBSE is now on per default X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=029314dfb6b557d178164db7c3ada9e7691d086d;p=Mograsim.git SBSE is now on per default --- diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/views/SimulationView.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/views/SimulationView.java index 0dffceb7..179843b9 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/views/SimulationView.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/views/SimulationView.java @@ -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); } }