Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Transaction] Using ChangeCommand with EMF Transaction
[Transaction] Using ChangeCommand with EMF Transaction [message #1274524] Fri, 21 March 2014 15:40 Go to next message
Scott Dybiec is currently offline Scott DybiecFriend
Messages: 148
Registered: July 2009
Senior Member
My RCP-based application uses ChangeCommand quite a bit and now I would
like to convert my application from base EMF (EditingDomain, etc) to
using EMF Transaction (TransactionalEditingDomain, etc).

1. Is the use of ChangeCommand supported?
2. If so, what are the pros/cons for using EMF Transaction's
RecordingCommand vs. ChangeCommand?

Thanks,

Scott
Re: [Transaction] Using ChangeCommand with EMF Transaction [message #1274637 is a reply to message #1274524] Fri, 21 March 2014 19:17 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Scott,

See some replies in-line, below.

HTH,

Christian


On 2014-03-21 15:40:33 +0000, scott@xxxxxxxx said:

> My RCP-based application uses ChangeCommand quite a bit and now I would
> like to convert my application from base EMF (EditingDomain, etc) to
> using EMF Transaction (TransactionalEditingDomain, etc).
>
> 1. Is the use of ChangeCommand supported?

It should be, yes. EMF Transaction will treat this as it does any
other Command that isn't a RecordingCommand: it will expect it to know
how to undo and redo itself, which of course it does.


> 2. If so, what are the pros/cons for using EMF Transaction's
> RecordingCommand vs. ChangeCommand?

Not much, except perhaps most significantly that using RecordingCommand
ties your code to a TransactionalEditingDomain: you wouldn't be able
to reuse it in a core EMF context.

You should be able to create ChangeCommands with the
TransactionChangeRecorder already attached to the
TransactionalEditingDomain to avoid the necessity of the command
creating its own on-the-fly, which for large resource sets could
perhaps produce some performance drag. best of both worlds:
reusability and performance!

>
> Thanks,
>
> Scott
Previous Topic:Is it possible to generate @Override annotations in the Impl-Classes?
Next Topic:[CDO] Help with "rollback" approach, advice/best practices needed
Goto Forum:
  


Current Time: Thu Apr 25 15:43:22 GMT 2024

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

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

Back to the top