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 10:43 Go to next message
ash is currently offline ash
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 12:29 Go to previous messageGo to next message
eshvar60  is currently offline eshvar60
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 03:55 Go to previous messageGo to next message
Alexandra Niculai is currently offline Alexandra Niculai
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 12:27 Go to previous message
ash is currently offline ash
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: Sun Jul 13 05:26:45 EDT 2014

Powered by FUDForum. Page generated in 0.01934 seconds