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ý
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: Sun Sep 21 02:19:07 GMT 2014

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

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