Reputation: 75
I want to add submenu to existing file menu. I tried below:
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="menu:org.eclipse.ui.file?after=additions ">
<command
commandId="com.my.home.handler.MyHandler"
id="myTrams"
label="TRAMS"
style="push">
</command>
</menuContribution>
</extension>
Can someone help to add submenu to existing file menu using plugin.xml? Thanks in advance.
Upvotes: 2
Views: 1889
Reputation: 8849
Correct you locationURI as locationURI="menu:file?after=additions".
Upvotes: 0
Reputation: 111142
The menu id for the File menu is just file
not 'org.eclipse.ui.file'
For example this is the menu contribution for 'File > Restart':
<menuContribution
locationURI="menu:file?after=open.ext">
<command
commandId="org.eclipse.ui.file.restartWorkbench"
id="org.eclipse.ui.file.restartWorkbench"
style="push">
</command>
</menuContribution>
Upvotes: 3