Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » RCP e4 undo - redo(Any examples ?)
RCP e4 undo - redo [message #1446269] Thu, 16 October 2014 15:49 Go to next message
Thomas Elskens is currently offline Thomas ElskensFriend
Messages: 159
Registered: September 2014
Location: Brussels - Belgium
Senior Member
Hello,

I wondered I've there were any examples on how to implement undo - redo functionality in an RCP - application. On the web I've found lots of references to eclipse 3, but very little for e4.

In the eclipse docs, I find some explanations in the package org.eclipse.core.commands.operations, but I really don't see how I can put this together with declarative commands and handlers?

Any tutorial or source code example available for this... ?

Thanks a lot,

Thomas Elskens
Re: RCP e4 undo - redo [message #1448617 is a reply to message #1446269] Mon, 20 October 2014 07:27 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6587
Registered: July 2009
Senior Member
Hi,

The question is in what context you want to do undo/redo. E.g. in our
applications most undo/redo is coming from EMF hence we don't even need
to the core.commands support for it.

In my understanding undo/redo concept is fairly easy to accomplish:
a) you have a Stack of Commands
b) A command is a duple of the command and its reverse operation

Tom

On 16.10.14 17:49, Thomas Elskens wrote:
> Hello,
>
> I wondered I've there were any examples on how to implement undo - redo
> functionality in an RCP - application. On the web I've found lots of
> references to eclipse 3, but very little for e4.
> In the eclipse docs, I find some explanations in the package
> org.eclipse.core.commands.operations, but I really don't see how I can
> put this together with declarative commands and handlers?
> Any tutorial or source code example available for this... ?
>
> Thanks a lot,
>
> Thomas Elskens
Re: RCP e4 undo - redo [message #1448757 is a reply to message #1448617] Mon, 20 October 2014 11:55 Go to previous message
Thomas Elskens is currently offline Thomas ElskensFriend
Messages: 159
Registered: September 2014
Location: Brussels - Belgium
Senior Member
Err, does this mean I'd rather implement undo-redo myself and not use commands.operations?

I agree it's not difficult, but as RCP-Commands are great in unifying keybindings-menuitems-UI-buttons action handling, I was wondering if I couldn't "append" undo/redo to them with a e4 productivity-tool?

As for defining my business model in EMF, it's on the list of things I would like to test, but I'm new to all Eclipse products and I would like to proceed step by step.

Thomas
Previous Topic:eclipse 4 rcp workspace version
Next Topic:Using MinMaxAddon without others
Goto Forum:
  


Current Time: Tue Mar 02 11:30:29 GMT 2021

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

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

Back to the top