Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF Parsley » Executing RecordingCommand using InjectableAdapterFactoryEditingDomain
Executing RecordingCommand using InjectableAdapterFactoryEditingDomain [message #1424303] Mon, 15 September 2014 19:51 Go to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 526
Registered: November 2009
Senior Member
How can I execute RecordingCommand on InjectableAdapterFactoryEditingDomain? When I try to do it I get ClassCastException. Is there way I can get TransactionalEditingDomain for an object that was loaded using Parsley?
Re: Executing RecordingCommand using InjectableAdapterFactoryEditingDomain [message #1424623 is a reply to message #1424303] Tue, 16 September 2014 07:33 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1742
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 15/09/2014 21:51, Alex Kravets wrote:
> How can I execute RecordingCommand on
> InjectableAdapterFactoryEditingDomain? When I try to do it I get
> ClassCastException. Is there way I can get TransactionalEditingDomain
> for an object that was loaded using Parsley?

Hi Alex

if I understand correctly you're using EMF transactions, right?
I don't know much about EMF transactions, but I seem to understand that
RecordingCommand needs a TransactionalEditingDomain, so you should
inject your own Provider<AdapterFactoryEditingDomain>

the default implementation is

public class DefaultAdapterFactoryEditingDomainProvider implements
Provider<AdapterFactoryEditingDomain>

and the default Guice binding is

public Class<? extends Provider<AdapterFactoryEditingDomain>>
provideAdapterFactoryEditingDomain() {
return DefaultAdapterFactoryEditingDomainProvider.class;
}

so that you create a TransactionalEditingDomain

please keep me posted
cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Re: Executing RecordingCommand using InjectableAdapterFactoryEditingDomain [message #1435642 is a reply to message #1424623] Wed, 01 October 2014 19:47 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 526
Registered: November 2009
Senior Member
Thanks Lorenzo, this was what I needed.
Re: Executing RecordingCommand using InjectableAdapterFactoryEditingDomain [message #1435907 is a reply to message #1435642] Thu, 02 October 2014 05:47 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1742
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 01/10/2014 21:47, Alex Kravets wrote:
> Thanks Lorenzo, this was what I needed.

Good! :)

Could you please share the code (in case that's an open source project
of course :)

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Re: Executing RecordingCommand using InjectableAdapterFactoryEditingDomain [message #1604357 is a reply to message #1435907] Fri, 06 February 2015 20:28 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 526
Registered: November 2009
Senior Member
Hi Lorenzo,

I started doing implementation for TransactionalEditingDomain but haven't had time to finish it as I got sidetracked on other projects. Was any work done on this by someone else?

Thanks,
Alex
Re: Executing RecordingCommand using InjectableAdapterFactoryEditingDomain [message #1613044 is a reply to message #1604357] Thu, 12 February 2015 11:19 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1742
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 06/02/2015 21:28, Alex Kravets wrote:
> Hi Lorenzo,
>
> I started doing implementation for TransactionalEditingDomain but
> haven't had time to finish it as I got sidetracked on other projects.
> Was any work done on this by someone else?
>
> Thanks,
> Alex

Hi Alex

I personally never dealt with transactional editing domain, so for the
moment I haven't worked on transactional editing domain in parsley, but
if you have any initial code I'd be more than happy to help.

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Re: Executing RecordingCommand using InjectableAdapterFactoryEditingDomain [message #1631096 is a reply to message #1613044] Mon, 23 February 2015 15:39 Go to previous message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 526
Registered: November 2009
Senior Member
Sounds good. I'll be starting to work on it soon and will collaborate on any issues.
Previous Topic:Master-Detail Form Editor using Parsley
Next Topic:Can't create a Parsley Project
Goto Forum:
  


Current Time: Wed Feb 21 08:12:17 GMT 2018

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

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