Open jrpajr-dev opened 2 months ago
In my project, I just implemented a local solution, which involves changing the order of 2 calls: setVisible and setToBeRendered.
I discovered this while debugging to try to figure out who was responsible for selecting the view's parent.
So I arrived at this line of code, from PartRenderingEngine.safeCreateGui:
Going back to whom called this, I realized that is called when the view's container is setted to be rendered, on CleanupAddon.subscribeRenderingChanged:
In my project, I already have a CustomCleanupAddon, with pretty much the same code as CleanupAddon, but with some changes.
I changed the order of the calls, to set the container's visibility before the to be rendered value, like this:
I don't know if this will have any collateral effects, but, on my tests, everything worked well.
I noticed that if I open a view that was detached in the previous run, and then put focus on the main window, the detached view will be placed behind the main window.
To reproduce:
Now, if you click on the main Eclipse window, the Package Explorer dialog will be placed behind the main window.
If you restart Eclipse again, the detached window will be restored to its normal behavior.
When debugging the view creation, in WBWRenderer.createWidget, we can see that the parent shell of this detached window is the "PartRenderingEngine limbo".
Tested under this environment: