Reputation: 311
In Eclipse main menu how to contribute to an existing Main Menu for ex need to create a context menu under Main menu "File" . What is the location URI "File"
Upvotes: 1
Views: 1942
Reputation: 2907
Here is an example how to add submenu to File menu:
<extension
point="org.eclipse.ui.actionSets">
<actionSet
id="com.my.plugin.actionSet"
label="My ActionSet"
visible="true">
<menu
id="mymenu"
label="My Menu"
path="file/fileEnd">
<groupMarker
name="start">
</groupMarker>
<separator
name="additions">
</separator>
</menu>
<action
class="com.my.plugin.ActionClass"
id="com.myplugin.action"
label="Action"
menubarPath="file/mymenu/start"
style="push">
</action>
</actionSet>
</extension>
Constants for positioning MyMenu within File menu could be found at org.eclipse.ui.IWorkbenchActionConstants
Cheers, Max
Upvotes: 0
Reputation: 12718
The location URI for the file menu is menu:file
.
See org.eclipse.ui.internal.ide.WorkbenchActionBuilder
for information about the different sections and IDs...
Upvotes: 4