I am trying to add a new menu item to Eclipse’s popupmenus. It really seemed straightforward enough in the examples and tutorials but the menu item itself is never visible. I expect this to work in all views and for basically anything that is a file. I am using Eclipse 3.4. This is the my plugin.xml configuration:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
objectClass="org.eclipse.core.resources.IFile"
id="com.willcodejavaforfood.ExploreHere.contribution1">
<action
label="Explore Here"
class="com.willcodejavaforfood.explorehere.popup.actions.ExploreHereAction"
menubarPath="additions"
enablesFor="1"
id="com.willcodejavaforfood.ExploreHere.newAction">
</action>
</objectContribution>
</extension>
</plugin>
Any idea why it is never visible?
—-edit—-
Turns out my plugin works just fine in version 3.4.2 of Ganymede, but not in the older version 3.4.0 that I previously used.
I tried your code in my Eclipse’s installation and I am able to see the action in the contextual menu when I right click one of my .c file in the Project explorer’s view of the C perspective.
Take care that a Project or a project’s sub folder is not a file.