Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318363 - [UI] Closing Perspectives changes others
Summary: [UI] Closing Perspectives changes others
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.0 RC1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-29 13:53 EDT by Eric Moffatt CLA
Modified: 2010-06-29 15:26 EDT (History)
2 users (show)

See Also:


Attachments
Patch to have the perspective switcher use the WorkbenchPage to close (10.56 KB, patch)
2010-06-29 13:54 EDT, Eric Moffatt CLA
no flags Details | Diff
Patch for the injection problem (1.20 KB, patch)
2010-06-29 14:15 EDT, Oleg Besedin CLA
no flags Details | Diff
Patch that allows perspectives to be closed/reset (11.39 KB, patch)
2010-06-29 15:17 EDT, Eric Moffatt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Moffatt CLA 2010-06-29 13:53:38 EDT
If you open the Debug perspective and then close it the Package Explorer disappears.

Root cause was that I opened the second perspective using the perspective switcher which performed the operation 'locally' rather than going through the WorkbenchPage#setPerspective code. This meant that the 'openPerspectives' list wasn't updated which meant that the 'closePerspective' call delegated to 'closeAllPerspectives' since it thought there was only one open.
Comment 1 Eric Moffatt CLA 2010-06-29 13:54:59 EDT
Created attachment 173028 [details]
Patch to have the perspective switcher use the WorkbenchPage to close
Comment 2 Eric Moffatt CLA 2010-06-29 13:55:44 EDT
Oleg, to get the NPE start with a clean WS, open the Debug perspective and then close it.
Comment 3 Oleg Besedin CLA 2010-06-29 14:15:56 EDT
Created attachment 173031 [details]
Patch for the injection problem

The patch limits the listeners receiving UNINJECT event to the listeners created from injection, skipping pure #runAndTrack entries.

(After looking at the code, the code doing uninjection processing needs a cleanup. I'll open a separate bug for that, but it is likely to be done after 4.0, unless there turns out to be more issues in it.)
Comment 4 Eric Moffatt CLA 2010-06-29 15:17:24 EDT
Created attachment 173036 [details]
Patch that allows perspectives to be closed/reset
Comment 5 Eric Moffatt CLA 2010-06-29 15:26:00 EDT
Committed in >20100629. Applied the patch (without the changes to the PRE which were checked in under bug 317591).