Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » UNDO lots of stuff in one go -- defining undoable composite operations
UNDO lots of stuff in one go -- defining undoable composite operations [message #289107] Fri, 29 July 2005 11:17 Go to next message
Martin Olsson is currently offline Martin OlssonFriend
Messages: 20
Registered: July 2009
Junior Member
Hi,

I'm implementing a refactoring tool for a custom editor. Currently I
locate all references to a certain variable and use document.replace()
to change the variable name. However, when I try to undo I have to undo
many times to completely undo the entire refactoring rename operation.

Instead I would like the undo menu to say "Undo rename variable" and
when clicked I would like it to change ALL the variable names back in
one go. Is this possible?


regards,
martin
Re: UNDO lots of stuff in one go -- defining undoable composite operations [message #289504 is a reply to message #289107] Fri, 05 August 2005 21:52 Go to previous message
Genady Beryozkin is currently offline Genady BeryozkinFriend
Messages: 410
Registered: July 2009
Senior Member
There are so many ways to do it. Just take a look at the different undo
classes (e.g., undomanager).
You can also look at the HippieCompletionAction class (in the
org.eclipse...texteditor plugin).

Genady

Genady Beryozkin
http://www.genady.net/



Martin Olsson wrote:

> Hi,
>
> I'm implementing a refactoring tool for a custom editor. Currently I
> locate all references to a certain variable and use document.replace()
> to change the variable name. However, when I try to undo I have to
> undo many times to completely undo the entire refactoring rename
> operation.
>
> Instead I would like the undo menu to say "Undo rename variable" and
> when clicked I would like it to change ALL the variable names back in
> one go. Is this possible?
>
>
> regards,
> martin
>
Previous Topic:Can Plugin create a security manager?
Next Topic:Update/refresh/deploy web module?
Goto Forum:
  


Current Time: Thu Apr 25 10:11:20 GMT 2024

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

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

Back to the top