Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » EMF GMF integration
EMF GMF integration [message #220267] Sat, 28 February 2009 12:56 Go to next message
maatari is currently offline maatariFriend
Messages: 74
Registered: July 2009
Member
> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--B_3318674178_622671
Content-type: text/plain;
charset="ISO-8859-1"
Content-transfer-encoding: 8bit

Dear aLL,

There is something I can;t understand when following the classic prodecure
of integrating EMF and GMF. More specifically


I can
Re: EMF GMF integration [message #220913 is a reply to message #220267] Tue, 10 March 2009 13:10 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Daniel,

> Does any one have an idea that explain that? If they use the same
> editing domain, shouldnt the transactional editing domain make use of
> the adapter factory. That should be the way the
Yes, it should. This is current implementation of TransactionalEditingDomainImpl.FactoryImpl.createEditingDoma in()
method (will be executed on calling TransactionalEditingDomain.Factory.INSTANCE.createEditingDom ain()):

public synchronized TransactionalEditingDomain createEditingDomain() {
TransactionalEditingDomain result = new TransactionalEditingDomainImpl(new
ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Reg istry.INSTANCE));
mapResourceSet(result);
return result;
}

So, as you can see, newly created ComposedAdapterFactory will be actually
passed into TransactionalEditingDomainImpl constructor. This ComposedAdapterFactory
will be composed of all the AdapterFactories registered using “org.eclipse.emf.edit.itemProviderAdapterFactories”
ension-point.

In other words, answering your question, created TransactionalEditingDomainImpl
instance will make use of EMF-generated ItemProviders from EMF .edit plugin
indirectly because appropriate AdapterFactory will be registered in EMF-generated
..edit plugin using “org.eclipse.emf.edit.itemProviderAdapterFactories” extension-point.

Here is a javadoc for ComposedAdapterFactory.Descriptor.Registry.INSTANCE:
/**
* The global registry typically populated by plugin registration.
*/

This is my understanding of the situation. And, yes, all the code around
“ComposedAdapterFactory” is useless with TransactionalEditingDomain + you
can file a bugzilla request to create another factory method for TransactionalEditingDomain
like:
TransactionalEditingDomain.Factory.INSTANCE.createEditingDom ain(AdapterFactory
factory)

-----------------
Alex Shatalin
Previous Topic:ShowRelatedElementsRequest & ShowHideRelationshipRequest
Next Topic:gmftool - creation tool sequence
Goto Forum:
  


Current Time: Sat Mar 06 12:23:18 GMT 2021

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

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

Back to the top