how to define activeWhen for Undo/Redo handlers [message #663613] |
Tue, 05 April 2011 16:46  |
Eclipse User |
|
|
|
Hi,
I've an rcp application with the classic Edit/Undo and Edit/Redo commands.
Their activeWhen clauses look like this (undo case):
<activeWhen>
<test
property="undo.history.canUndo">
</test>
</activeWhen>
where undo.history.canUndo is a propertyTester that returns:
PlatformUI.getWorkbench().getOperationSupport().getOperation History().canUndo(myContext);
The problem is that it seems that the activeWhen clause is only
evaluated when the selection changes, and not each time the Edit menu is
opened!
If I undo an operation without changing the selection, the handler
active-state isn't refreshed and the UI goes out of sync with respect to
the canUndo/canRedo status.
How can I solve this?
How do you guys handle your Undo/Redo commands?
Cheers,
Carlo
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03715 seconds