-1

I am working on eclipse 3.7.2 (indigo release 2 version). Related to my work I need to add one new button to the eclipse toolbar. I have googled a lot. In all documents mentioned that "Create a new menu contribution to the extension point "org.eclipse.ui.menus" with the locationURI:..... " But if I do right click on org.eclipse.ui.menus--> New there is only one option generic. The option "menucontribute" is not present in org.eclipse.ui.menus--> New--> . Please suggest some solution for this.

Best Regards.

ziga
  • 109
  • 10

1 Answers1

1

Here is an example:

<extension
            point="org.eclipse.ui.menus">
<menuContribution
               locationURI="toolbar:org.eclipse.ui.main.toolbar">
            <toolbar
                  id="toolbar_id">
               <command
                     commandId="command_id"
                     id="toolbarId"
                     label="%toolbar.new"
                     style="push"
                     tooltip="%toolbar.tooltip">
               </command>
            </toolbar>
</extension>

You will need to provide command handler to react to toolbar item selection.

Alex K.
  • 3,294
  • 4
  • 29
  • 41