Merge branch 'development' of
authorFabian Stemmler <stemmler@in.tum.de>
Tue, 24 Sep 2019 14:29:34 +0000 (16:29 +0200)
committerFabian Stemmler <stemmler@in.tum.de>
Tue, 24 Sep 2019 14:29:34 +0000 (16:29 +0200)
https://gitlab.lrz.de/lrr-tum/students/eragp-misim-2019.git into
development

Conflicts:
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/views/LogicUIPart.java

1  2 
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/views/LogicUIPart.java

@@@ -93,37 -93,12 +97,41 @@@ public class LogicUIPart extends ViewPa
        private void addSimulationControlWidgets(Composite parent)
        {
                Composite c = new Composite(parent, SWT.NONE);
-               c.setLayout(new GridLayout(5, false));
 -              c.setLayout(new GridLayout(6, false));
++              c.setLayout(new GridLayout(7, false));
+               MograsimProjectCombo projectCombo = MachineContextSwtTools.createMograsimProjectSelector(c, SWT.NONE);
+               MachineCombo machineCombo = MachineContextSwtTools.createMachineSelector(c, SWT.NONE);
 +              Button sbseButton = new Button(c, SWT.CHECK);
                Button pauseButton = new Button(c, SWT.TOGGLE);
 +
 +              LogicObserver clockObserver = o ->
 +              {
 +                      if (((CoreClock) o).isOn())
 +                      {
 +                              exec.pauseLiveExecution();
 +                              Display.getDefault().asyncExec(() ->
 +                              {
 +                                      pauseButton.setSelection(false);
 +                                      setPauseText(pauseButton, false);
 +                              });
 +                      }
 +              };
 +
 +              sbseButton.addListener(SWT.Selection, e ->
 +              {
 +                      String statusString = "disabled";
 +                      CoreClock cl = m.getClock();
 +                      if (sbseButton.getSelection())
 +                      {
 +                              cl.registerObserver(clockObserver);
 +                              statusString = "enabled";
 +                      } else
 +                              cl.deregisterObserver(clockObserver);
 +                      sbseButton.setToolTipText(String.format("Step by step execution: %s", statusString));
 +              });
 +              sbseButton.setSelection(false);
 +
                pauseButton.setSelection(true);
                setPauseText(pauseButton, false);