Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Undo command description
Undo command description [message #933675] Fri, 05 October 2012 08:27
Martin  odloucký is currently offline Martin odlouckýFriend
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.
Previous Topic:Bundle Resolved before Fragment
Next Topic:Problem with key bindings
Goto Forum:
  


Current Time: Thu Apr 25 05:33:41 GMT 2024

Powered by FUDForum. Page generated in 0.02499 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top