Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » enabledWhen: Compare File Name to stored Value
enabledWhen: Compare File Name to stored Value [message #335196] Wed, 25 March 2009 11:32 Go to next message
Eclipse UserFriend
Hello,

I have several files of a custom content type residing within a project.
The project-relative path to one of these files is stored as a
persistentProperty on the project.
I also have a PropertyPage and several command handlers that are enabled
when the user selects a project. I'd also like to have these enabled
when the file whose name was stored on the project is selected.

Is there a way to achieve this declaratively? So far I found no mention
on how to compare two such values in the plugin.xml.

Regards,
Damian
Re: enabledWhen: Compare File Name to stored Value [message #335303 is a reply to message #335196] Tue, 31 March 2009 11:59 Go to previous message
Eclipse UserFriend
There is a property tester for project persistent properties,
org.eclipse.core.resources.projectPersistentProperty. But it can check
for a constant value, not parameterized or work with the current selection.

You would probably have to write your own property tester that looked up
the IResource's projectPersistentProperty and compared it to the
IResource name.

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/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm
Previous Topic:How to make page closable
Next Topic:Update/Install feature from command line
Goto Forum:
  


Current Time: Sun May 04 11:52:24 EDT 2025

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

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

Back to the top