Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » PropertyTesters Tiutorial please(.propertyTesters)
PropertyTesters Tiutorial please [message #641831] Sun, 28 November 2010 15:43 Go to next message
ash is currently offline ashFriend
Messages: 142
Registered: July 2010
Senior Member
HI,
Can any provide nice tutorial for to implement "org.eclipse.core.expressions.propertyTesters"
and when to use property testers and when to use
"org.eclipse.core.expressions.definitions"

Thank
ashok
Re: PropertyTesters Tiutorial please [message #643924 is a reply to message #641831] Wed, 08 December 2010 17:29 Go to previous messageGo to next message
eshvar60  is currently offline eshvar60 Friend
Messages: 51
Registered: March 2010
Member
org.eclipse.core.expressions.definition is for creating expressions using Command Core Expressions.

org.eclipse.core.expressions.propertyTesters is for creating a java class that can be referenced from a visibleWhen/enabledWhen block.

1. To define a propertyTester extend the PropertyTester class with your own and implement the test method.
2. In the plugin.xml extend the propertyTesters point and add a propertyTester with your new class defined in there.
3. In the enabledWhen/visibleWhen part of the handler/menu definition do a "with" -> "test" where the with defines the element that you want to test on (activeEditor, activeMenu, selection and etc...) and the test specifies the propertyTest you defined in step 2.

Re: PropertyTesters Tiutorial please [message #644248 is a reply to message #641831] Fri, 10 December 2010 08:55 Go to previous messageGo to next message
Alexandra Niculai is currently offline Alexandra NiculaiFriend
Messages: 84
Registered: July 2009
Member
Hi

I hope this will help:
http://wiki.eclipse.org/Command_Core_Expressions#Property_Testers
http://blog.richclientgui.com/?p=50

Greetings
Alexandra.
Re: PropertyTesters Tiutorial please [message #644368 is a reply to message #641831] Fri, 10 December 2010 17:27 Go to previous message
ash is currently offline ashFriend
Messages: 142
Registered: July 2010
Senior Member
Check out The code and test the example

Observer the delete button in toolbar ... button is enabled only when any row in table is checked if == 0 then disabled.

https://jobsleaf.googlecode.com/svn/trunk/com.jobsleaf.comma nd.propertytester
Previous Topic:How to identify the selected column in a FULL_SELECTION TableViewer
Next Topic:Disable Installed Software & Installation History tab on Help | About | Installation Details
Goto Forum:
  


Current Time: Fri Apr 26 07:05:24 GMT 2024

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

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

Back to the top