Main toolbar is not shown in Eclipse RCP application

592 Views Asked by At

I have an application on Eclipse RCP 3.x and tried to add a main toolbar via plugin.xml.

After running the application I don't see it, the toolbar is not visible. I don't understand what's wrong in the code.

<menuContribution
    allPopups="false"
    locationURI="toolbar:org.eclipse.ui.main.toolbar">
 <toolbar
       id="rcp.toolbar1">
    <command
          commandId="org.eclipse.ui.file.save"
          label="Save"
          style="push">
    </command>
    <command
          commandId="org.eclipse.ui.file.saveAll"
          id="rcp.menu.file.saveall"
          label="Save All"
          style="push">
    </command>
 </toolbar>
</menuContribution>
1

There are 1 best solutions below

0
Adam Taras On

I have ApplicationWorkBenchAdvisor class, but i don't touch it.

Like greg-449 already commented: Beside of defining some toolbar elements within the plugin.xml, you have also to activate the toolbar within your ApplicationWorkbenchWindowAdvisor class - if created.