Community
Participate
Working Groups
Bugzilla – Bug 337485
e4 should use shell toolbar where possible
Last modified: 2011-09-08 16:51:40 EDT
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).
SWT is reworking these APIs. Their work is being discussed in bug 222859#c135 and bug 325795.