Reworked some parts of the MachineContext to make its status clear.
authorChristian Femers <femers@in.tum.de>
Thu, 26 Sep 2019 05:08:37 +0000 (07:08 +0200)
committerChristian Femers <femers@in.tum.de>
Thu, 26 Sep 2019 05:08:37 +0000 (07:08 +0200)
commit500771048185ce356aed280970f5ff0f4473a146
treedc45aef06c0ba5c32e0ddbc27b6b38b551e115db
parent3f220100b4be4fa162f33b1434b55ce982be7be3
Reworked some parts of the MachineContext to make its status clear.

While this is much better at tracking the status, Eclipse is still
"greedy" about the information that can be tracked concerning projects.
The current handling allows for more detailed listening to the machine
context status, and detects deleted or closed projects and "deactivates"
their machines. In addition to that, the machines get initialized in a
lazy way, as they are needed. This is currently done be requesting an
active machine, as putting it into getActiveMachine() caused troubles
with the SimulationViewEditor's recreate being called double (once
during get, and then as listener). This is not near an optimal solution
right now, but works reasonably well.
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/SimulationViewEditor.java
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/nature/MachineContext.java
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/nature/MachineContextStatus.java [new file with mode: 0644]
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/nature/ProjectContextEvent.java
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/nature/ProjectMachineContext.java
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionView.java