Toolbar item's not visible in addition menu (>>) of toolbar [message #555830] |
Sun, 29 August 2010 06:10  |
Eclipse User |
|
|
|
Steps to recreate:
1. Create toolbar. For example add it manual:
ApplicationActionBarAdvisor
@Override
protected void fillCoolBar(ICoolBarManager coolBar) {
final ToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.LEFT);
coolBar.add(new ToolBarContributionItem(toolbar, "main"));
toolbar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
}
ApplicationWorkbenchWindowAdvisor
public void preWindowOpen() {
...
configurer.setShowCoolBar(true);
...
}
2. In plugin.xml add extension point menu and add commands to toolbar
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="toolbar:main?after=additions">
<command
commandId="org.eclipse.ui.perspectives.showPerspective"
style="push">
</command>
<command
commandId="org.eclipse.ui.perspectives.showPerspective"
style="push">
</command>
<command
commandId="org.eclipse.ui.perspectives.showPerspective"
style="push">
</command>
</menuContribution>
</extension>
3. Now if you launch app and reduce size of main window then you can see addition menu (>>) of toolbar wich is empty.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03848 seconds