Skip to main content


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.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic: failed oracle connection - not a valid base URI
Next Topic:File opened in two edtiors.
Goto Forum:
  


Current Time: Wed Sep 25 14:42:45 GMT 2024

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

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

Back to the top