Bug 416235 - [Perspectives] Switching perspective pollutes perspective with additional view
Summary: [Perspectives] Switching perspective pollutes perspective with additional view
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 4.4 M4   Edit
Assignee: Platform UI Triaged CLA
QA Contact: Eric Moffatt CLA
URL:
Whiteboard:
Keywords:
: 317809 422370 424093 (view as bug list)
Depends on:
Blocks: 421104
  Show dependency tree
 
Reported: 2013-08-30 09:27 EDT by Dani Megert CLA
Modified: 2019-06-09 10:01 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2013-08-30 09:27:45 EDT
4.3 and M20130829-1300.


1. start 4.3 or latest 4.3.1 build with a new workspace
2. create a project with two files 'f1' and 'f2' in it
3. open both files, so that 'f2' is active
4. switch to the 'Resource' perspective
5. in the 'Project Explorer' enable 'Link with Editor'
6. in the 'Project Explorer' click on 'f1'
   ==> 'f1' is the active editor but the 'Project Explorer' is the active part
7. switch back to the 'Java' perspective
BUG: 'Project Explorer' sits in the 'Java' perspective!
Comment 1 Ed Willink CLA 2013-08-30 09:39:44 EDT
I presume this is the same bug whereby I have to keep killing the Package Explorer in the GIT perspective and the GIT Repositories View in the Java perspective.
Comment 2 Dani Megert CLA 2013-08-30 09:42:09 EDT
(In reply to comment #1)
> I presume this is the same bug whereby I have to keep killing the Package
> Explorer in the GIT perspective and the GIT Repositories View in the Java
> perspective.

Yes, sounds like that.
Comment 3 Eric Moffatt CLA 2013-08-30 09:51:25 EDT
Yes, I mentioned this in bug 388617 comment #12. That's basically why I tried to do something deeper than I should (the original commit fixes this issue as well).

I've already opened Bug 415987 which can be used to get input on the approach I want to take...

I'll tag this for M3 so it'll be in the same bucket as the other defect and we can figure out the relationship later...
Comment 4 Dani Megert CLA 2013-09-18 06:51:39 EDT
Here's another ugly case (I20130917-2000):

1. add this when launching eclipse:
-perspective org.eclipse.debug.ui.DebugPerspective
2. start with a new workspace
   ==> 'Debug' perspective will be the only perspective
3. open the 'Java' perspective
4. exit
5. start with same workspace again
  ==> OK:  'Debug' perspective will be in front
      BUG: 'Package Explorer' now in the 'Debug' perspective
Comment 5 Eric Moffatt CLA 2013-11-04 14:28:20 EST
*** Bug 317809 has been marked as a duplicate of this bug. ***
Comment 6 Eric Moffatt CLA 2013-11-05 13:23:57 EST

Committed:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=13f2d1cf34cfe0d24042fce9c89486c4a70028db

This ensures that 'setPart' can only activate parts in the current perspective...
Comment 7 Dani Megert CLA 2013-11-06 06:08:10 EST
Using N20131105-2000, I can still reproduce the issue with the steps from comment 4.
Comment 8 Paul Webster CLA 2013-11-25 10:29:41 EST
*** Bug 422370 has been marked as a duplicate of this bug. ***
Comment 9 Eric Moffatt CLA 2013-11-25 10:53:53 EST
Committed:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=f36eec5fa37e88d743e80b2eaffd106f175ef980

This handles the corner case where the active perspective changes on start. The code was re-activating the part that was active when we shut down (which in this case was the PackageExplorer from the Java perspective). I've added checks to ensure that the view is in the correct perspective first.
Comment 10 Randy Hudson CLA 2013-11-25 11:26:53 EST
Since this is a regression from the 3.x version of eclipse, could this fix get ported to 4.3.x?
Comment 11 Dani Megert CLA 2013-11-28 06:59:40 EST
Verified in N20131127-2000.
Comment 12 Robin Stocker CLA 2013-12-16 10:25:36 EST
*** Bug 424093 has been marked as a duplicate of this bug. ***
Comment 13 Ed Willink CLA 2017-03-29 10:32:05 EDT
Bug 514414 may be a REOPEN of this bug more generally.