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

Bug 349118

Summary: 'Outline' view disappeared after maximizing a view
Product: [Eclipse Project] e4 Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Project Inbox <e4.ui-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: emoffatt, Mike_Wilson
Version: 1.0Flags: Mike_Wilson: pmc_approved+
remy.suen: review+
Target Milestone: 4.1 RC4   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Reset the ids of any shared stacks to prevent them from clashing with the ids of stacks in the perspective
none
Updated patch that uses the same logic as new stack creation does none

Description Remy Suen CLA 2011-06-11 07:27:22 EDT
1. Split the shared area vertically into two stacks with the 'Outline' view with the 'Outline' view on the top. You will now have the stack on top and an empty stack on the bottom.
2. Open an editor, it will appear in the same stack as the 'Outline' view (the top stack).
3. Window > Reset Perspective > OK
4. Activate the 'Package Explorer'.
5. Ctrl+M. Notice that the 'Outline' view cannot be seen in the trim. Also note that the shared area's icon is not in the trim. Instead, you will get the icon of the file you opened.
6. Ctrl+M.
7. The 'Outline' view cannot be seen on the right hand side anymore. It seems that its parent part stack is invisible.
Comment 1 Remy Suen CLA 2011-06-11 07:28:20 EDT
6. Click on the icon of your opened editor.
7. Click back in the 'Package Explorer' so that it minimizes again.
8. Ctrl+M.
9. Both the 'Outline' view (described in comment 0) and your editor has now disappeared.
Comment 2 Remy Suen CLA 2011-06-11 14:33:15 EDT
The steps below are more likely to happen in regular use.

1. Open an editor.
2. Window > New Editor.
3. Split the shared area vertically into two stacks with the 'Outline' view with the 'Outline' view on the top. You will now have a stack on top and the stack of editors below.
4. Drag an editor to the top stack.
5. Window > Reset Perspective > OK
6. Activate the 'Package Explorer'.
7. Ctrl+M. You will see the same problems described by comment 0.
Comment 3 Eric Moffatt CLA 2011-06-11 17:06:38 EDT
Created attachment 197848 [details]
Reset the ids of any shared stacks to prevent them from clashing with the ids of stacks in the perspective
Comment 4 Eric Moffatt CLA 2011-06-11 17:12:04 EDT
The basic issue here is with how the minimized stacks locate the PartStack they're representing (which is by id).

This means that non-unique stack ids can cause problems (the scenario ended up with a stack in the shared area with the id "right" via the drag and the reset made a second one in the perspective).

The patch guantees that after a reset the shared stack ids are unique (ok, someone *could* make a perspective stack with the id "SharedStack 1" but it's unlikely).
Comment 5 Eric Moffatt CLA 2011-06-11 17:22:56 EDT
Created attachment 197849 [details]
Updated patch that uses the same logic as new stack creation does
Comment 6 Remy Suen CLA 2011-06-13 09:20:32 EDT
(In reply to comment #5)
> Created attachment 197849 [details]
> Updated patch that uses the same logic as new stack creation does

The id conflict problem and the scenarios described on this bug are resolved by this patch. This should not affect the functions of the compatibility layer as we are generally only concered with the id of the area instead of the ids of the model structure contained within it.
Comment 7 Eric Moffatt CLA 2011-06-13 13:56:15 EDT
Adding McQ for review...
Comment 8 Eric Moffatt CLA 2011-06-14 13:58:03 EDT
Committed in >20110613. Applied the patch.
Comment 9 Eric Moffatt CLA 2011-06-14 15:37:55 EDT
Verified in I20110613-2055.