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

Bug 318847

Summary: Toolbar misses separators
Product: [Eclipse Project] e4 Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Boris Bokowski <bokowski>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: bokowski, emoffatt, susan
Version: 1.0   
Target Milestone: 1.0 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
screenshot on win7, Build id: I20100706-2130
none
fix idea 1
none
fix idea 2
none
refactoring of fixZOrder
none
close to what I want
none
screenshot when running with "close to what I want" patch
none
fix none

Description Dani Megert CLA 2010-07-05 05:10:35 EDT
I20100701-1105.

1. start with new workspace
==> the toolbar has many empty groups ==> many useless separators

As per bugzilla terms this is 'normal' severity but marking as 'major' because this gives a very bad first impression of Eclipse 4.0.
Comment 1 Susan McCourt CLA 2010-07-07 17:27:20 EDT
Created attachment 173712 [details]
screenshot on win7, Build id: I20100706-2130

adding screenshot since I had it for another bug
Comment 2 Dani Megert CLA 2010-07-08 05:19:21 EDT
See bug 318850 comment 2:
    "This also gets rid of the many extra separators in the toolbar."

However, that fix now removes too many: some groups (e.g. Debug and JDT UI) are no longer separated in the toolbar.
Comment 3 Boris Bokowski CLA 2010-07-08 09:14:41 EDT
I attempted a fix yesterday but it looks like I need your help, Eric. I'd like to add a separator toolbar item at the beginning of each non-empty MToolBar.
Comment 4 Dani Megert CLA 2010-07-13 10:17:52 EDT
>However, that fix now removes too many: some groups (e.g. Debug and JDT UI) are
>no longer separated in the toolbar.
I've adjusted the summary.
Comment 5 Boris Bokowski CLA 2010-07-14 00:26:26 EDT
Created attachment 174253 [details]
fix idea 1

Just to capture this code because it works in theory and might be useful somewhere else. Unfortunately it doesn't work in practice ;-)
Comment 6 Boris Bokowski CLA 2010-07-14 00:43:42 EDT
Created attachment 174254 [details]
fix idea 2

Another idea that didn't work (using an addon to change the toBeRendered flag in the model based on whether the toolbar contains items that are not just separators). Leads to an endless loop of toolbars appearing and disappearing,
Comment 7 Boris Bokowski CLA 2010-07-14 00:47:50 EDT
Created attachment 174255 [details]
refactoring of fixZOrder

This belongs to fix idea 1. I had to move the fixZOrder logic to the renderer in order to add separator widgets between the actual children widgets. These changes are now no longer necessary but may be interesting should the need for rendering separator widgets arise somewhere else.
Comment 8 Boris Bokowski CLA 2010-07-14 00:51:21 EDT
Created attachment 174256 [details]
close to what I want

This patch is going in the right direction but isn't pixel perfect yet. I hope to achieve pixel-perfectness tomorrow.
Comment 9 Boris Bokowski CLA 2010-07-14 00:53:26 EDT
Created attachment 174257 [details]
screenshot when running with "close to what I want" patch

As you can see in this screenshot, there's too much space between the separator and the next toolbar item to the right.
Comment 10 Boris Bokowski CLA 2010-07-14 16:20:52 EDT
Created attachment 174341 [details]
fix

Looks like it's working now.
Comment 11 Boris Bokowski CLA 2010-07-14 16:21:55 EDT
last patch ("fix") committed to HEAD.
Comment 12 Dani Megert CLA 2010-07-20 10:52:01 EDT
Verified in SDK 4.0 - I20100718-2237.