Command [message #655800] |
Tue, 22 February 2011 11:39  |
Eclipse User |
|
|
|
I'm testing seriously the command framework, to get rid of Actions, and having just one way of doing things.
The problem I have is that I have a command with a toggle state:
<command
categoryId="com.jobisjob.crud"
id="com.jobisjob.crud.lock"
name="Bloquear cambios">
<state
class="org.eclipse.ui.handlers.RegistryToggleState:false"
id="org.eclipse.ui.commands.toggleState">
</state>
</command>
with a binding.
It appears in a toolbar and in a menu item in the main menu.
The problem is that when the toggle state changes, it isn't reflected on the other GUI items, i.e. when I click the toolbar, the menu item doesn't appear checked, and when I click the menu item, the toolbar icon doesn't appear checked.
My hanlder implements the IElementUpdater interface :
public void updateElement(UIElement element, Map parameters) {
element.setChecked(....);
}
How can this be solved?
Any suggestions will be very welcome.
David.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09850 seconds