In many documents like here it is described, that old extension points org.eclipse.ui.actionSets, org.eclipse.ui.viewActions, org.eclipse.ui.editorActions, and org.eclipse.ui.popupMenus from Eclipse 3.2 were replaced by the new org.eclipse.ui.menus extension point in Eclipse 3.3.
So my simple question:
How do I use the new extension point org.eclipse.ui.menus to contribute to an editorAction toolbar (org.eclipse.ui.editorActions) ?
I tried stuff like the following in many different locationURI values but it never worked.
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="toolbar:my.editor.id">
<command
commandId="my.command.id"
icon="icons/somicon.gif"
label="Do my command"
style="push">
</command>
</menuContribution>
</extension>
My command never shows up and I dont get any feedback in the console. So what is the correct property for locationURI, to get my command in there??
The command works on other toolbars, it also works via the old extension point (with modifications of the command class).
Why I need the new extension piont?
Because it not only supports commands, but also controls, where you can contribute more than a simple button.
Final update
The solution below intended to replace the functionality from editorActions extension point. Due to the bug mentioned in the answers last comment, that replacement is not really useful.
Anyhow accepted…
I managed to contribute to the main toolbar in Eclipse using this locationURI:
So, for example, to contribute my command to the toolbar only when my editor is active:
Where command.id is the id of my command.