Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Undoable Operation Not Working
Undoable Operation Not Working [message #331068] Fri, 22 August 2008 19:45 Go to next message
Philippe Sabourin is currently offline Philippe SabourinFriend
Messages: 28
Registered: July 2009
Junior Member
I've made an operation that extends AbstractOperation then executed it
like so:

Operation o = new Operation();

o.addContext(Workbench.getInstance().getOperationSupport().g etUndoContext());

Workbench.getInstance().getOperationSupport().getOperationHi story().execute(o,
monitor, null);

This doesn't seem to add it into the Undo chain, as the undo action icon
doesn't become enabled after I perform the operation.

Is there something wrong with this approach? Is the proper way detailed
somewhere in a tutorial? I have looked at the eclipse help on Undoable
Operations but it seems that I have done everything that's in there.

Thanks,
Philippe
Re: Undoable Operation Not Working [message #331230 is a reply to message #331068] Thu, 28 August 2008 14:40 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Philippe Sabourin wrote:
> This doesn't seem to add it into the Undo chain, as the undo action icon
> doesn't become enabled after I perform the operation.

Are you saying that Undo becomes enabled after the execute(*) call?
That sounds correct, no? You can only undo it after you've executed it
once.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm


Previous Topic:Suppressing lazy loading of a plugin?
Next Topic:Is there any way to control the visibility or enablement of a wizard?
Goto Forum:
  


Current Time: Wed Jul 17 20:25:33 GMT 2024

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

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

Back to the top