1

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>
Jasperan
  • 2,154
  • 1
  • 16
  • 40
  • Are you using the GUI to make the tool bar? If you click on extensions, you should be able to create the toolbar without touching the code. – Chris Bolton Apr 28 '15 at 13:59
  • 1
    Are you creating the RCP application using an ApplicationWorkbenchAdvisor? If so you need to create the toolbar in the ApplicationActionBarAdvisor. – greg-449 Apr 28 '15 at 14:02
  • @greg-449 I have ApplicationWorkBenchAdvisor class, but i don't touch it. All menus, parts and editors described in plugin.xml – Aleksandr Korotkov Apr 28 '15 at 14:28

1 Answers1

0

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.

Adam Taras
  • 1,403
  • 1
  • 13
  • 15