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

Bug 318498

Summary: Many toolbars on top of one another
Product: [Eclipse Project] e4 Reporter: Boris Bokowski <bokowski>
Component: UIAssignee: Project Inbox <e4.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: emoffatt, remy.suen
Version: unspecified   
Target Milestone: 1.0 RC2   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
screen shot
none
Screenshot depicting the horror in question.
none
Patch to dispose the existing TopRight control before setting the new one none

Description Boris Bokowski CLA 2010-06-30 12:27:55 EDT
I don't know how to reproduce this. I'll attach a screenshot.
Comment 1 Boris Bokowski CLA 2010-06-30 12:28:34 EDT
Created attachment 173122 [details]
screen shot
Comment 2 Remy Suen CLA 2010-06-30 12:29:43 EDT
That looks a lot scarier than how it looks on XP.
Comment 3 Remy Suen CLA 2010-06-30 16:40:47 EDT
Created attachment 173155 [details]
Screenshot depicting the horror in question.

1. Wipe your deltas.xml.
2. Ctrl+3 > JUnit. It should appear in the same stack as the 'Package Explorer'.
3. Ctrl+3 > Switch to the 'Debug' perspective
4. Ctrl+3 > JUnit. It should appear in the bottom stack.
5. Ctrl+3 > Package Explorer It should appear in the same stack as the 'Debug' view in the top.
6. Ctrl+3 > Switch to the 'Java' perspective
7. Activate the 'Package Explorer' view. See that the toolbar is still the 'JUnit' view's toolbar.
8. Activate the 'JUnit' view.

Depending on how squished your stack is, you may see some pretty strange stuff.
Comment 4 Remy Suen CLA 2010-07-06 18:34:45 EDT
Eric, the bug is in LazyStackRenderer's showElementRecursive(MUIElement, List<MUIElement>) method.

Around line 234, the toolbar of the view from the other perspective is reparented appropriate to the correct CTabFolder, however, that CTabFolder's prior 'topRight' control is not disposed which explains why there's still a phantom toolbar lying around.
Comment 5 Eric Moffatt CLA 2010-07-07 09:17:51 EDT
Created attachment 173646 [details]
Patch to dispose the existing TopRight control before setting the new one
Comment 6 Eric Moffatt CLA 2010-07-07 09:21:06 EDT
Committed in >20100707. Applied the patch.