Reworked some parts of the MachineContext to make its status clear.
[Mograsim.git] / plugins / net.mograsim.plugin.core / src / net / mograsim / plugin / editors / SimulationViewEditor.java
index 0420334..ba3dfd7 100644 (file)
@@ -263,7 +263,8 @@ public class SimulationViewEditor extends EditorPart
                {
                        IFileEditorInput fileInput = (IFileEditorInput) input;
                        context = ProjectMachineContext.getMachineContextOf(fileInput.getFile().getProject());
-                       context.registerObserver(m -> recreateContextDependentControls());
+                       context.activateMachine();
+                       context.addActiveMachineListener(m -> recreateContextDependentControls());
                        recreateContextDependentControls();
 
                        setPartName(fileInput.getName());