Add menu item for Import/Export context menu in Eclipse

225 Views Asked by At

I'm trying to add a submenu to Import and Export items in Project-Explorer's context menu. But, I can't find the menuid/locationURI of those items on the menu.

enter image description here

Can someone please help me to add items to these Import/Export menu items in Eclipse. I'm using Oxygen version. I tried the below segment, but it adds the item under the import/export items.

   <extension
        point="org.eclipse.ui.menus">
        <menuContribution

        locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=addition">
        <command
        commandId="myplugin.command.mycommand"
        icon="icons/etool16/mycommand.png"
        label="Run mycommand"
        mnemonic="M1+P"
        tooltip="Do something with this project">
        </command>
        </menuContribution>
</extension>
1

There are 1 best solutions below

1
nitind On

You don't add your own actions because they're not menus. Instead, Import and Export Wizards have their own extension points so that you can start them via the main Import/Export wizards.

I'm a bit confused how you have an Import menu in your context menu.