Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to update Save and Undo menus after model change in GEF?
How to update Save and Undo menus after model change in GEF? [message #242335] Thu, 10 April 2008 21:24
Gerrit  is currently offline Gerrit Friend
Messages: 30
Registered: July 2009
Member
I am trying to implement a GEF based editor, subclassing GraphicalEditor.
A subclass of AbstractTransferDropTargetListener reacts to drop events,
and issues a new Command:

viewer.getEditDomain().getCommandStack().execute(myCommand);


The model is changed, but the menus are not. Currently, I have to manually
call forceFocus() on the viewer's Control to enable the "Save" menu item,
and firePropertyChange(PROP_DIRTY) on the editor itself to have the little
change indicator asterisk (*) appear in the editor's title. I haven't yet
found a way to enable the "Undo" menu item, even though my command
overrides undo() and canUndo().


Shouldn't these menus and widgets get activated automatically when a
command is executed?

Which class would normally be responsible for this? Maybe I missed out
something in the setup...


Thanks in advance!
Gerrit
Previous Topic:[Announce] GEF 3.4.0 I200804081830 is available
Next Topic:How do I use the AbstractTreeEditPart
Goto Forum:
  


Current Time: Fri Dec 19 13:04:36 GMT 2014

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

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