I want to add popup item for Java projects in my Eclipse plugin. My plugin.xml contains:
<extension point="org.eclipse.ui.popupMenus">
<objectContribution
objectClass="org.eclipse.jdt.core.IJavaProject"
id="com.contribution1">
<action
label="Action"
class="com.actions.NewAction"
enablesFor="1"
id="com.actions.newAction">
</action>
</objectContribution>
However, the menu item is not shown in the popup. If I use IPackageFragment instead, the menu item shows just fine. Please advise.
Ok, the problem was that a Java project is considered an IJavaProject in the Java perspective only and the Eclipse instance used to test the plugin starts with the Resources perspective. If I switch to the Java perspective everything works as expected.