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.
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>
将locationURI更正为locationURI =“ menu:file?after = additions”。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.