Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » property tester that returns true if a certain file exist on the project
property tester that returns true if a certain file exist on the project [message #325925] Mon, 03 March 2008 13:40 Go to next message
Allan Ramirez is currently offline Allan RamirezFriend
Messages: 14
Registered: July 2009
Junior Member
Hi,

I added a popupmenu and it will only pop out on a project. I added
IProject objectclass.

I wanted also that the popupmenu will only show if my.xml is on that
project.

How will I do that? Is there any existing property tester in eclipse like
jdt.launching.hasNature?
Re: property tester that returns true if a certain file exist on the project [message #325931 is a reply to message #325925] Mon, 03 March 2008 14:30 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

I think the last time through this the most effective way to do this was
to set a persistent property on the project if the file exists. That
way you can easily test the property (assuming core expressions) using
existing org.eclipse.core.resources property tester.

The other alternative is to write your own property tester and when the
project is selected, go looking for your file.

Later,
PW


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


Previous Topic:Disposing listeners added to Selection service
Next Topic:Subclipse vs. WebDAV support?
Goto Forum:
  


Current Time: Thu Jun 27 19:58:14 GMT 2024

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

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

Back to the top