Community
Participate
Working Groups
When using CDT, if I have the View Management enabled with the Debug perspective, the Memory and Registers view keep opening at every launch, although I manually closed them. I have the "Do not open..." option ticked, but it does not help.
I'm not able to reproduce this problem: My steps are: 1) Launch a CDT debug session (mem view opens). 2) While CDT debug session is active, close memory view. 3) Terminate CDT debug session. 4) Start CDT debug session. At this point, the memory view doesn't open. Note, if you terminate debug session, then close mem view. The closing will not be remembered.
(In reply to comment #1) I tried with a brand new workspace, using master from platfrom Debug and CDT. > My steps are: > 1) Launch a CDT debug session (mem view opens). yes > 2) While CDT debug session is active, close memory view. yes > 3) Terminate CDT debug session. > 4) Start CDT debug session. Memory view opens. 5) Terminate CDT session -> memory view closes automatically. I get the feeling I'm not understanding how this feature should work. Do you want to do a quick live session to see exactly what I'm doing? Or I can do some debugging. Can you recommend a file to focus on? Thanks
I've tried my scenario with 3.8M7 and I don't see the problem. So, it looks like it is caused by 4.2
I've debugged this with Marc and found that the ViewContextService is not called when the view is closed. ViewContextService implements IPerspectiveListener2 and expects to be called on IPerspectiveListner2.perspectiveChanged(..., IWorkbenchPartReference, ..). Instead it is being called on IPerspectiveListener.perspectiveChagned(). I'm still not able to reproduce this on my system (4.2 or 3.8), but I did see it on Marc's. Re-assigning to UI to see if there's any known issues with calling IPerspectiveListener2.
Created attachment 216402 [details] Fire the perspectivelistener2 changed event on a hide
The previous patch doesn't seem to fix the issue because WorkbenchPage#hideView is never called. I'll continue to look into this...
(In reply to comment #6) > The previous patch doesn't seem to fix the issue because WorkbenchPage#hideView > is never called. I'll continue to look into this... Thank You. Let us know whether we should be looking at adding a workaround in Debug.
Sorry but I'm going to have to move this out of RC3 and into 4.2.1. The main problem is that we aren't calling the WorkbenchPage 'hideView' at all so the code to fire the perspective change notifications is never invoked. Figuring out the correct way to implement this will take longer than we have and the implementation itself is likely too 'deep' to do at this late a stage... For future reference: The reason is that we use the e4 mechanisms (set the 'toBeRendered' to false) it tear stuff down. What we're missing is enough life-cycle events in e4 to be able to have the workbench page detect what's going on sufficiently enough to fire the events in the proper order. One approach is to have the PartRenderingEngine fire about to events before and after the 'createGui' and 'removeGui' calls. Another approach would be to add a 'TBRChanging' tag when the PRE's toBeRendered handler. We'd add the tag before taking the action (render or unrender, depending), then do the action and then remove the tag.
Review URL: https://git.eclipse.org/r/#/c/22631/ When the e4 lifecycle notification for pre-open/close and post-open/close events is ready, this fix need to be improved. It is worth to mention, that I found one scenario that does not work as I expected, but it behaves in the same way in 3.8. Steps: 1. Start debugger 2. Close Memory view 3. Finish debugging 4. Start debugger (Memory view doesn't open) 5. Open Memory view 6. Finish debugging 7. Close Memory view (surprisingly it is still open) 8. Start debugger 9. Finish debugging Expected behaviour: 1. After step #6 Memory view closes 2. After step #8 Memory view opens 3. After step #9 Memory view closes Current behaviour: 1. After step #6 Memory view remains open 2. After step #8 Memory view opens 3. After step #9 Memory view remains open
Beauty, thanks Wojciech ! This code has already been committed: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=2d9e490d01a99a7ee7801e66d50d1435af00b109 Do you think we should mark this one as fixed and open a separate one for the upgrade to using the new events ?
As the original, reported problem has been fixed, I close this bug. For further improvements I have opened the bug 429563.
Verified in I20140303-2000.