projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'machines-are-launch-configs' into development
[Mograsim.git]
/
plugins
/
net.mograsim.plugin.core
/
src
/
net
/
mograsim
/
plugin
/
editors
/
SimulationViewEditor.java
diff --git
a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/SimulationViewEditor.java
b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/SimulationViewEditor.java
index
6b17dcf
..
651852e
100644
(file)
--- a/
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/SimulationViewEditor.java
+++ b/
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/SimulationViewEditor.java
@@
-72,7
+72,7
@@
public class SimulationViewEditor extends EditorPart
public SimulationViewEditor()
{
public SimulationViewEditor()
{
- activeMachineListener =
m
-> recreateContextDependentControls();
+ activeMachineListener =
(oldM, newM)
-> recreateContextDependentControls();
memCellListener = a -> instPreview.refresh();
clockObserver = o ->
{
memCellListener = a -> instPreview.refresh();
clockObserver = o ->
{
@@
-159,6
+159,9
@@
public class SimulationViewEditor extends EditorPart
canvasParent.layout();
canvasParent.layout();
+ // update preview
+ ((ActiveInstructionPreviewContentProvider) instPreview.getTableViewer().getContentProvider()).setMachine(machine);
+
// initialize executer
exec = new LogicExecuter(machine.getTimeline());
updateSpeedFactorFromInput(simSpeedInput.getValue());
// initialize executer
exec = new LogicExecuter(machine.getTimeline());
updateSpeedFactorFromInput(simSpeedInput.getValue());
@@
-298,9
+301,11
@@
public class SimulationViewEditor extends EditorPart
private void addInstructionPreviewControlWidgets(Composite parent)
{
private void addInstructionPreviewControlWidgets(Composite parent)
{
- instPreview = new InstructionTable(parent, new DisplaySettings());
+ instPreview = new InstructionTable(parent, new DisplaySettings()
, getSite().getWorkbenchWindow().getWorkbench().getThemeManager()
);
instPreview.getTableViewer().getTable().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
instPreview.getTableViewer().getTable().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- instPreview.setContentProvider(new ActiveInstructionPreviewContentProvider(instPreview.getTableViewer()));
+ ActiveInstructionPreviewContentProvider cProv;
+ instPreview.setContentProvider(cProv = new ActiveInstructionPreviewContentProvider(instPreview.getTableViewer()));
+ cProv.setMachine(machine);
}
private static void setPauseText(Button pauseButton, boolean hovered)
}
private static void setPauseText(Button pauseButton, boolean hovered)