Community
Participate
Working Groups
I20120502-1800. Closing a perspective first creates all not yet realized parts. This makes no sense and is a regression compared to 3.8.
Just tried this in I20120502-1800 and don't see this effect...started with a fresh window with the Java perspective open, added a breakpoint to ContributedPartRenderer and closed the perspective. The breakpoint never fired... Can you give me the steps you used to determine this ?
I see this now...it's caused by the PartService's 'hidePart' handling. This is the code that tries to select a new tab if you close the one for the currently selected tab. On a perspective close we, of course, call removeGui on the MPerspective which eventually winds its way down to the "Problems' View. There's a widget listener in CompatibilityPart that then fires a 'partClosed' event and eventually leads to the code that selects a new part to show in the same stack as the problems view...leading to the bogus creation of the JavaDoc view...
commit 5a8bcce23595f552332831e75ff921a185623eef This is a HACK !! When 'closePerspective' is called I put a new tag 'PerspClosing' onto the affected perspective...then in the PartService's 'hidePart' handling I check to see if the part being hidden is in a perspective that's 'PerspClosing' and, if so, inhibit the code that was selecting a new element in the stack... The reason I haven't turned the tag into a constant is that we can't really define it in WorkbenchPage because it's used in the PartService and we don't want to link the two... I've opened bug 378408 to track the technical debt we're incurring here...
Note that Close All Perspectives can still exhibit this behavior...at this point the solution to that would be to remove the operation...
In addition, something is very fishy with the fix (4.2-I20120503-1800, Windows 7): sometimes File > Exit shows the dialog and sometimes it doesn't using these steps. 1. start new workspace 2. File > Exit ==> no dialog! (sometimes) 1. start new workspace 2. click 'Link with Editor' in the Package Explorer 3. File > Exit ==> dialog (sometimes)
(In reply to comment #5) > In addition, something is very fishy with the fix (4.2-I20120503-1800, Windows > 7): sometimes File > Exit shows the dialog and sometimes it doesn't using these > steps. > > 1. start new workspace > 2. File > Exit > ==> no dialog! (sometimes) > > 1. start new workspace > 2. click 'Link with Editor' in the Package Explorer > 3. File > Exit > ==> dialog (sometimes) Sorry, this wasn't meant for this bug.
Verified in 4.2-I20120503-1800. > Note that Close All Perspectives can still exhibit this behavior...at this > point the solution to that would be to remove the operation... Filed bug 378440 for that.
As per Dani's comment...