X-Git-Url: https://mograsim.net/gitweb/?p=Mograsim.git;a=blobdiff_plain;f=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Fviews%2FSimulationView.java;fp=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Fviews%2FSimulationView.java;h=179843b943e6c6092823d5dde2dab3f26078a542;hp=0dffceb7cb26b01b0afebf382be92b2de076d10b;hb=029314dfb6b557d178164db7c3ada9e7691d086d;hpb=23fb7dadc2737703b4277139144d351ee5a3c946 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); } }