Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » context menu visibleWhen package selected and nature correspond
context menu visibleWhen package selected and nature correspond [message #1403031] Sun, 20 July 2014 11:00
Sébastien Vermeille is currently offline Sébastien VermeilleFriend
Messages: 1
Registered: July 2014
Junior Member
Hello guys,

I am working on a eclipse plugin and I would like to add some specials items to context menu.

I would like to do this :
When user right click on a package in project explorer -> if the project containing this package has nature "MyNature" AND selection is a package -> then display the custom menu. Else not.

I wrote this :

					<with variable="activeMenuSelection">
							<test property="org.eclipse.core.resources.projectNature" value="com.sbeex.plugin.eclipse.sbeexNature" />
								<adapt type="org.eclipse.jdt.core.IJavaProject"/>
								<adapt type="org.eclipse.jdt.core.IPackageFragment"/>

It doesnt show any more. And if I remove "<test property="org.eclipse.core.resources.projectNature" value="com.sbeex.plugin.eclipse.sbeexNature" />" the menu appears. If I remove the part <or> ... </or> menu appear only in project right click

Do you have some tips about how to do it ?

Thanks in advance for your attention

Previous Topic:windowBuilder freeze
Next Topic:An internal error occurred during: Building JPA Project:
Goto Forum:

Current Time: Mon Jun 24 08:04:07 GMT 2024

Powered by FUDForum. Page generated in 0.03931 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top