Unpredicted Close behavior on Generic Editor
The Generic Editor is sometimes closing in an unpredictable.
This happens in the CEF version of Virtual Satellite. Usually when adding e.g. SubSystemMass parameters to an Equipment.
In this case the editor receives an update and checks all UI snippets for validity for the given model. The hierarchy che3cker now detects a subsystem but used to have System snippets before. Now the editor is told to close.
The unpredicted behavior can often be seen in the SWTBot tests
A Null Pointer Exception in the SWTBot tests leads to code shutting down the editor.
This code is getting called twice. The big issue here is, that the closing of the editor is executed in an async job in display thread. This job in turn is calling the super method of the FormEditor which is also running the close in an async job.
This can create the situation where the SWTBot tests ask the editor to close. after that the tests are waiting for the Display thread to finish. This is done by placing a blocking job into the job queue. Now the close job is executing, but could potentially place the close from the inner job behind the blocking one from the SWTBot tests. This would make the test continue to execute before the editor is actually closed.