Home » Modeling » EMF Parsley » Executing RecordingCommand using InjectableAdapterFactoryEditingDomain
|
Re: Executing RecordingCommand using InjectableAdapterFactoryEditingDomain [message #1424623 is a reply to message #1424303] |
Tue, 16 September 2014 07:33 |
|
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
|
|
| | | | | |
Goto Forum:
Current Time: Thu Jan 09 01:56:40 GMT 2025
Powered by FUDForum. Page generated in 0.05419 seconds
|