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

Bug 337485

Summary: e4 should use shell toolbar where possible
Product: [Eclipse Project] e4 Reporter: Brian de Alwis <bsd>
Component: UIAssignee: Project Inbox <e4.ui-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: bhunt, emoffatt, remy.suen
Version: 0.9   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard: stalebug
Attachments:
Description Flags
Work in progress none

Description Brian de Alwis CLA 2011-02-17 15:14:33 EST
Created attachment 189224 [details]
Work in progress

Bug 222859 introduced the notion of a shell's toolbar (Shell#getToolBar()).  On MacOS X, this is the native toolbar, which is seamless with the titlebar.  e4 should support using this toolbar.

I've tried a few experiments to adapt the e4.swt renderers to use this toolbar.  Although the toolbar is an instance of o.e.swt.widgets.ToolBar, it's not a fully functional TB: it doesn't support embedding composites.  This means we can't embed ToolBars within the shell ToolBar.

I tried two approaches:

1. Changing the TrimBarRenderer to return the shell ToolBar if the trim side is TOP.  This approach didn't work well as the actual toolbars are instantiated against the shell ToolBar and never displayed.

2. Changing the ToolBarRenderer to return the shell ToolBar if the MToolBar's parent is a MTrimBar and the trim side is TOP.  This approach works for simple examples (e.g., the e4 Contacts demo).  The patch isn't sufficient for the 4.1 SDK IDE though: although the platform toolbar appears, nothing appears and there is a second ToolBar with the quick-access search and the perspective switcher.

Given the restrictions on the shell toolbar, I wondered if it might make sense to only use the platform toolbar for MToolBars with a particular ID.

The experiments required patching SWT to avoid NPEs on startup (bug 337484).
Comment 1 Brian de Alwis CLA 2011-02-18 14:05:17 EST
SWT is reworking these APIs.  Their work is being discussed in bug 222859#c135 and bug 325795.
Comment 2 Eclipse Genie CLA 2019-05-05 13:57:39 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Lars Vogel CLA 2019-06-05 07:44:36 EDT
This is a mass change to close all e4 bugs marked with "stalebug" whiteboard.

If this bug is still valid, please reopen and remove the "stalebug" keyword.