Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Checking if a project was selected(Showing a popup menu entry only if a project is selected)
Checking if a project was selected [message #650725] Wed, 26 January 2011 09:42 Go to next message
geX is currently offline geXFriend
Messages: 6
Registered: July 2010
Junior Member
Hi, I want to show a contribution to the popup menu of, for example, the package explorer only if a project is selected. This can be any project, not only a java project.

How can I do this? There seems to be no common superclass for projects.

For example, JavaProject only inherits from IAdaptable, but all other entries in the package explorer do the same, so I cannot make a distinction based on this class. How can I check (in an extension, i.e. plugin.xml) if the selection is any kind of project.

Thank you in advance for your hepl
Re: Checking if a project was selected [message #650762 is a reply to message #650725] Wed, 26 January 2011 12:48 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

IProject is the project class to check for. You also need to adapt
before you check, that will convert entries like IJavaProject.


Paul Webster .platform.doc.isv/guide/workbench.htm

Previous Topic: failed oracle connection - not a valid base URI
Next Topic:Provisioning Exception - No repository found
Goto Forum:

Current Time: Tue Apr 24 08:48:52 GMT 2018

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

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