Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 317203

Summary: [Compatibility] Perspective customize/save does not work
Product: [Eclipse Project] e4 Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: major    
Priority: P3 CC: bokowski, ob1.eclipse, pwebster, susan
Version: 1.0Flags: pwebster: review+
bokowski: review+
Target Milestone: 1.0 RC3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch that cleans up minimized stacks / detached windows on a perspective close
none
Implement WorkbenchPage#closePerspective and resetPerspective
none
Disable perspective manipulation patch v1 none

Description Dani Megert CLA 2010-06-17 11:23:23 EDT
http://download.eclipse.org/e4/sdk/drops/I20100616-2127/index.php.

Customize Perspective
Save Perspective As
Reset Perspective

are not working (nothing happens).
Comment 1 Eric Moffatt CLA 2010-06-17 14:24:09 EDT
Dani, thanks (a lot!) for taking the time to do this...

while Save and Customize are not wired up (should be removed?) the 'Reset' seems to work for me...I'm currently working some edge conditions on a Reset when you have Detached or Minimized stacks but it should be doing something.

At this point I think that 'Customize' (at least) will have to go in post-release since there are too many unknowns.
Comment 2 Eric Moffatt CLA 2010-06-17 16:04:18 EDT
Created attachment 172153 [details]
Patch that cleans up minimized stacks / detached windows on a perspective close


There are likely still edge conditions...
Comment 3 Eric Moffatt CLA 2010-06-17 16:05:07 EDT
Committed in >20100617. Applied the patch.
Comment 4 Dani Megert CLA 2010-06-18 02:04:33 EDT
>he 'Reset' seems to work for me...
Not here with the build indicated in comment 0 and these steps:

1. download the build from comment 0
2. install it
3. start with new workspace
4. close Outline view (or any other view)
5. Window > Reset Perspective
   ==> confirmation dialog comes up
6. click OK
   ==> BUG: closed views don't come back
Comment 5 Dani Megert CLA 2010-06-18 02:15:14 EDT
>Committed in >20100617. Applied the patch.
Eric, in which build will this be available for verification?
Comment 6 Paul Webster CLA 2010-06-18 06:03:40 EDT
(In reply to comment #5)
> >Committed in >20100617. Applied the patch.
> Eric, in which build will this be available for verification?

http://download.eclipse.org/e4/sdk/drops/I20100617-2238/  It should be visible in about 15 minutes.  It might take a while to show up in the IBM internal mirrors, you might have to use http://www.eclipse.org/external to access it.

PW
Comment 7 Dani Megert CLA 2010-06-18 09:13:39 EDT
Tried I20100617-2238: steps from comment 4 still apply.
Comment 8 Eric Moffatt CLA 2010-06-18 10:12:23 EDT
I think I understand. I use the context menu on the PerspectiveSwitcher (my main menu items were disabled originally). What needs to happen is that the 'openPerspective' and 'closePerspective' code from the Perspective Switcher has to be moved into the WorkbenchPage and used from both menus...
Comment 9 Eric Moffatt CLA 2010-06-21 13:19:27 EDT
We need to merge the code from the PS into the WorkbenchPage code and then change the PS to use 'page' calls.
Comment 10 Eric Moffatt CLA 2010-06-22 14:24:22 EDT
Created attachment 172447 [details]
Implement WorkbenchPage#closePerspective and resetPerspective


Also switches the PerspectiveSwitcher over to using WorkbenchPage to perform its operations.
Comment 11 Eric Moffatt CLA 2010-06-22 14:30:27 EDT
Committed in >20100622. Applied the patch.

Reset and Close now work from both the perspective switcher and the main menu.

We still have to figure out what to do with Save, Close All Perspectives and Customize.

Now that the most relevant functionality is there can we move this to post-release ? I've changed the severity to reflect this but feel free to change it again if we think that the remaining functionality is required...
Comment 12 Eric Moffatt CLA 2010-06-22 14:57:25 EDT
*** Bug 317461 has been marked as a duplicate of this bug. ***
Comment 13 Dani Megert CLA 2010-07-05 06:13:22 EDT
>Reset and Close now work from both the perspective switcher and the main menu.
Not for me using I20100701-1105. Still looks pretty broken:

1. start new workspace
2. close 'Outline' view (or any other)
3. Window > Reset Perspective
==> BUMMER: it's disabled!
Comment 14 Dani Megert CLA 2010-07-05 06:18:27 EDT
There seems to be other issues when using the main menu, e.g. if I close the perspective ('Java' out of the box) and then reopen it via main menu, it opens a new window instead of opening it in the current window (as done by the perspective switcher).
Comment 15 Susan McCourt CLA 2010-07-14 11:24:49 EDT
(In reply to comment #13)
> >Reset and Close now work from both the perspective switcher and the main menu.
> Not for me using I20100701-1105. Still looks pretty broken:
> 
> 1. start new workspace
> 2. close 'Outline' view (or any other)
> 3. Window > Reset Perspective
> ==> BUMMER: it's disabled!

I'm seeing different behavior on I20100713-2016.
I closed the outline view, chose Window->Reset Perspective, and the perspective was restored, *except* that all my open editors closed.  

(In reply to comment #14)
> There seems to be other issues when using the main menu, e.g. if I close the
> perspective ('Java' out of the box) and then reopen it via main menu, it opens
> a new window instead of opening it in the current window (as done by the
> perspective switcher).

This is not happening for me on I20100713-2016.

We need to figure out what we are going to tackle on this bug.
I tried closing all perspectives and got into a state where the content of all my views is gone (ie, nothing showing in the package explorer).  At that point I couldn't switch workspaces or shutdown due to NPE's.

I think we are going to have to live with shipping some "not implemented" but we need to see which perspective operations are putting us in an unrecoverable state and try to block those.
Comment 16 Susan McCourt CLA 2010-07-14 12:19:16 EDT
> I think we are going to have to live with shipping some "not implemented" but
> we need to see which perspective operations are putting us in an unrecoverable
> state and try to block those.

I opened bug 319870 for the NPE, can't close workbench scenario.
Comment 17 Boris Bokowski CLA 2010-07-15 09:19:14 EDT
This was targeted at a milestone in the past.
Comment 18 Dani Megert CLA 2010-07-20 11:44:02 EDT
Tested again on : the 'Reset' scenarios now seem to work but 
- Customize Perspective
- Save Perspective As
Still do nothing.

>while Save and Customize are not wired up (should be removed?) 
Yes, I think we either need to wire or remove them for 4.0.
Comment 19 Dani Megert CLA 2010-07-20 11:44:43 EDT
>Tested again on :
==> I20100718-2237.
Comment 20 Paul Webster CLA 2010-07-20 12:55:07 EDT
We planned to wire it off for 4.0

PW
Comment 21 Remy Suen CLA 2010-07-20 14:46:16 EDT
Created attachment 174778 [details]
Disable perspective manipulation patch v1

Wire off the incoming actions from the WAB. And also get rid of the context menu items from the perspective switcher.
Comment 22 Remy Suen CLA 2010-07-20 14:46:46 EDT
(In reply to comment #21)
> Created an attachment (id=174778) [details]
> Disable perspective manipulation patch v1

Paul, please review and assess.
Comment 23 Remy Suen CLA 2010-07-20 14:47:15 EDT
Boris, need a +1 for RC3 candidate. This was a "safe fix" candidate.
Comment 24 Paul Webster CLA 2010-07-20 15:17:42 EDT
If you also remove that MenuDetect sysout from PerspectiveSwitcher while you're there :-)

PW
Comment 25 Boris Bokowski CLA 2010-07-20 16:40:41 EDT
+1
Comment 26 Remy Suen CLA 2010-07-20 16:51:36 EDT
Fix released to HEAD. Also took out the "Menu Detect" sysout.
Comment 27 Dani Megert CLA 2010-07-21 05:28:14 EDT
Verified in SDK 4.0 - I20100720-2028. Filed bug 320478 for the missing perspective customization.