Project: Eclipse_Platform_UI
Bug 202297 [Trim] Toolbars appear in wrong order when using org.eclipse.ui.menus
Reported: 2007-09-05 12:57:22 | Status: verified fixed

Build ID: 3.3 Steps To Reproduce: 1.Add a separator to the toolbar (swb) 2.Add a toolbar with a command before=swb 3.Add a toolbar after=swb but with visibleWhen based on an editor for the command When the editor opens the toolbar appears before the first toolbar even though the location is after the separator. More information: If the first toolbar is before:additions it does not appear at all and the menu bar is triple height and empty. <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar"> <separator name="swb"></separator> </menuContribution> <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?before=swb"> <toolbar id="com.mitel.swb.toolbar"> <command commandId="com.mitel.swb.commands.registrationCommand" icon="icons/home.gif" label="Register Workbench"> </command> </toolbar> </menuContribution> <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=swb"> <toolbar id="com.mitel.swb.pricelist.toolbar"> <command commandId="com.mitel.swb.pricelist.addPart" disabledIcon="icons/partAddX.gif" icon="icons/partAdd.gif" label="Add Part"> <visibleWhen> <with variable="activeEditorId"> <equals value="com.mitel.swb.pricelist.editors.PricelistEditor"> </equals> </with> </visibleWhen> </command> <command commandId="com.mitel.swb.pricelist.delete" disabledIcon="icons/deleteX.gif" icon="icons/delete.gif" label="Delete Part"> <visibleWhen> <with variable="activeEditorId"> <equals value="com.mitel.swb.pricelist.editors.PricelistEditor"> </equals> </with> </visibleWhen> </command> </toolbar> </menuContribution>

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/MenuPersistence.java