Undo command description [message #933675] |
Fri, 05 October 2012 08:27 |
Martin odloucký Messages: 49 Registered: July 2010 |
Member |
|
|
Hi, I am getting a bit frustrated by command framework in Eclipse 3.8. What I would like to have is a simple 'undo' command displayed in menu and toolber. The menu item should change its text based on the last performed operation. (e.g. Undo: insert new element). But after two dayes of googling I could not find a proper way to do this. I found that I can attach a TextState to a command which can be used as menu label. Great! However, when I change the state value, nothing happens in the UI unless I explicitely call ICommandService.updateElements. Moreover, this only works when the command has been executed at least once. If the command has not been executed even updateElements does not work. It probebly has to do something with Eclipse lazy-loading policy.
Does anyone now a clean solution to this problem? I must admit that am I already getting a bit angry on the command framework because this seems too simple problem to make me spend two days on it.
|
|
|
Powered by
FUDForum. Page generated in 0.02499 seconds