From 029314dfb6b557d178164db7c3ada9e7691d086d Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Mon, 2 Nov 2020 21:22:50 +0100 Subject: [PATCH] SBSE is now on per default --- .../src/net/mograsim/plugin/views/SimulationView.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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); } } -- 2.17.1