|How to refresh the enabledwhen status? A question about "IEvaluationService"? [message #526836]
||Tue, 13 April 2010 08:19
Registered: March 2010
I have two commands "Power on" and "Power off" in a toolbar.|
They should be like a switch. When poweron is enabled ,poweroff is disabled, and when poweroff is enabled poweron is disabled.
There are several objects (machines) in a treeviewer. The enabledwhen clause of the handler uses a property tester to test whether the object is "poweron" or "poweroff".
Now When I press the "Power on ", I did change the machine state to "poweron" but I couldn't refresh the enabledwhen status. I have to select another object in the treeviewer and reselect the machine object ,then the enabledwhen status is refreshed.
I tried to google and found the following code:
IEvaluationService service = (IEvaluationService)getSite.getService(IEvaluationService.class);
I want to call these codes after a handler.execute is complete.
The getSite method seem could only be write in a viewer class.
Where should I write these codes?
I'm grateful for any help you can offer
[Updated on: Tue, 13 April 2010 08:42]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02897 seconds