Community
Participate
Working Groups
Found while testing 4.3.2.M20140129-0800... To Repro: Have two perspectives open In on of the perspectives drag a stack out to make a Detached Window Drag another stack into the DW beside the first one Minimize one of the stacks Now switch to the other perspective and back...The minimized stack is no longer showing in the trim. This is almost certainly a mismatch in the code for showing / hiding minimized stacks on perspective switches; we're obviously hiding the trim stacks in the DW for the old perspective and not showing it on the switch back. Since the DW's themselves are going to be hidden the fix may well be to remove the code that's hiding them now rather than adding more code to show them again (but this will have to be tested.)
This turns out to be a layout issue, resizing the DW causes trim stacks to appear. There is already code that lays out the main shell after processing so I think I should be making a list from any shells affected and laying out any shell for which a trim stack has been either shown or hidden.
Gerrit patch: https://git.eclipse.org/r/21389 Where we used to only lay out the 'main' shell after showing trim stacks this patch maintains a list of shells for which trim visibility has been changed and performs layouts where necessary.
This is quite a corner case and broken since 4.2.1 (worked in 4.2). At this point I would not touch this code.
I'd re-direct this fix to 4.4 M6 then please. PW
(In reply to Paul Webster from comment #4) > I'd re-direct this fix to 4.4 M6 then please. > > PW Can you test on 4.4 M5? The whole MinMax code changed in 4.4 and it looks like this bug here is fixed.
(In reply to Dani Megert from comment #5) > (In reply to Paul Webster from comment #4) > > I'd re-direct this fix to 4.4 M6 then please. > > > > PW > > Can you test on 4.4 M5? The whole MinMax code changed in 4.4 and it looks > like this bug here is fixed. I tested again on N20140205-2000 and the bug is gone in 4.4, hence marking as WONTFIX for 4.3.2.
There is a much simpler fix than Gerrit patch https://git.eclipse.org/r/21389 Merely check that the immediate window parent of the MToolControl is equal to the window of the perspectiveStack before setting ToolControl.setToBeRendered(false) in subscribeTopicSelectedElement method. The Gerrit patch is a reactive fix to what was broken when the perspective was deselected. It is better that we prevent breaking the perspective detached window in the first place, as we see here... ... subscribeTopicSelectedElement(...) { ... // Hide any minimized stacks from the old perspective if (event.getProperty(EventTags.OLD_VALUE) instanceof MPerspective) { MPerspective oldPersp = (MPerspective) event.getProperty(EventTags.OLD_VALUE); String perspId = '(' + oldPersp.getElementId() + ')'; for (MToolControl tc : tcList) { if (tc.getObject() instanceof TrimStack && tc.getElementId().contains(perspId) && getWindowOfElement(tc) == window) { TrimStack ts = (TrimStack) tc.getObject(); ts.showStack(false); tc.setToBeRendered(false); } } } ... } private MWindow getWindowOfElement(MUIElement e) { while (e != null && !(e instanceof MWindow)) { e = modelService.getContainer(e); } return (MWindow)e; } (In reply to Eric Moffatt from comment #2)