Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320756 - Minimizing a previously minimized stack on restart doesn't minimize to trim
Summary: Minimizing a previously minimized stack on restart doesn't minimize to trim
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 blocker (vote)
Target Milestone: 1.0 RC3   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-23 13:24 EDT by Remy Suen CLA
Modified: 2010-07-27 13:24 EDT (History)
2 users (show)

See Also:


Attachments
MinMaxAddon patch v1 (2.09 KB, patch)
2010-07-23 16:21 EDT, Remy Suen CLA
no flags Details | Diff
Patch that duplicates the fix from the previous patch for this case (1.09 KB, patch)
2010-07-26 11:00 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 Remy Suen CLA 2010-07-23 13:24:42 EDT
1. Delete your deltas
2. Launch your inner.
3. Minimize the stack of the 'Package Explorer'.
4. Restore it
5. Shutdown.
6. Restart your inner.
7. Minimize the stack of the 'Package Explorer'.
8. Oh look, it's not in the trim.
Comment 1 Remy Suen CLA 2010-07-23 15:01:20 EDT
If we rollback the change from bug 320243 for the MinMaxAddon so that line 303 goes back from...

trimStack.setToBeRendered(true);

...to...

trimStack.setVisible(true);

...then the problem goes away. Why that is, I am not quite sure yet.
Comment 2 Remy Suen CLA 2010-07-23 15:04:27 EDT
(In reply to comment #1)
> If we rollback the change from bug 320243 for the MinMaxAddon

Scratch that. My target workspace wasn't setup properly.
Comment 3 Remy Suen CLA 2010-07-23 16:21:14 EDT
Created attachment 175103 [details]
MinMaxAddon patch v1

The trim bar is not rendered when the workbench is restored, so asking the trim stack to be rendered does nothing (because its parent hasn't been rendered).
Comment 4 Remy Suen CLA 2010-07-23 16:57:33 EDT
Neither resetting the 'Java' perspective or closing it and reopening it helps. If you try to minimize the view stack after the perspective comes back, it _will_ just disappear.
Comment 5 Boris Bokowski CLA 2010-07-23 18:32:02 EDT
Will look at this tomorrow.
Comment 6 Eric Moffatt CLA 2010-07-24 10:12:48 EDT
+1 the patch looks fine to me (I'd add a ref to this bug so that we can fix this properly (i.e. setting the bar's TBR to true *should* have rendered it)...
Comment 7 Boris Bokowski CLA 2010-07-24 10:32:56 EDT
+1.

Patch committed to HEAD.
Comment 8 Remy Suen CLA 2010-07-24 12:59:41 EDT
(In reply to comment #6)
> (i.e. setting the bar's TBR to true *should* have rendered it)...

Opened bug 320816 for this. I believe the TBR was set to false by the clean-up addon.
Comment 9 Eric Moffatt CLA 2010-07-26 10:59:46 EDT
Re-opening because a new scenario has been found:

Clean WS, minimize Outline, *reset* the perspective
shutdown / restart
minimize the Outline again...it disappears

The difference is that in the 'reset' case we end going through the code path that creates/adds the trimstack rather than the one that 'found' it.
Comment 10 Eric Moffatt CLA 2010-07-26 11:00:49 EDT
Created attachment 175225 [details]
Patch that duplicates the fix from the previous patch for this case
Comment 11 Eric Moffatt CLA 2010-07-26 11:13:07 EDT
Note that the correct fix for this would be to change the PRE to handle the TrimBar's TBR correctly (which will involve fixing WBWRenderer's 'getUIContainer' code.
Comment 12 Remy Suen CLA 2010-07-26 11:55:48 EDT
(In reply to comment #10)
> Created an attachment (id=175225) [details]
> Patch that duplicates the fix from the previous patch for this case

Looks good to me.

(In reply to comment #11)
> Note that the correct fix for this would be to change the PRE to handle the
> TrimBar's TBR correctly (which will involve fixing WBWRenderer's
> 'getUIContainer' code.

Indeed, this particular case would not have manifested itself if we didn't have bug 320816.
Comment 13 Boris Bokowski CLA 2010-07-26 12:08:13 EDT
+1 for "Patch that duplicates the fix from the previous patch"
Comment 14 Eric Moffatt CLA 2010-07-26 12:55:04 EDT
Committed in >20100726. Applied the patch.
Comment 15 Eric Moffatt CLA 2010-07-26 12:55:37 EDT
Re-marking as FIXED.
Comment 16 Eric Moffatt CLA 2010-07-27 13:24:32 EDT
Works on XP in I20100726-2152...