Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gmf-dev] Is it necessary to use shared instance of MEditingDomain?


Hi, Alex,

The intent of the MEditingDomain is that you can create any number of instances to manage resources independently of other diagrams, editors, applications, whatever.  This works at the basic level of programmatic manipulation of EMF resources.  You will run into snags, however, in other areas of the GMF run-time such as the AbstractModelCommand and some of the diagram code, which assume that all work is done in the shared MEditingDomain.  I think that some people have managed to work around this to some degree, but I do not know the details.

For now, perhaps it is best to code defensively, without assuming a shared instance, and to apply that assumption externally to your code.  We have plans afoot to make it easier to use multiple MEditingDomains, and when that's done you should be able to re-work your code with little effort.

Cheers,

Christian



Christian W. Damus
Aurora Core Model Services
IBM Rational Software
Tel: (613) 591-7937
-- If at first you do succeed, try to hide your astonishment.



"Alexander Shatalin" <Alexander.Shatalin@xxxxxxxxxxx>
Sent by: gmf-dev-bounces@xxxxxxxxxxx

10/20/2005 07:21 AM

Please respond to
"GMF Project developer discussions."

To
<gmf-dev@xxxxxxxxxxx>
cc
Subject
[gmf-dev] Is it necessary to use shared instance of MEditingDomain?





Hi!
                I'm sorry for probably stupid question, but I've just started
with IBM runtime, so I'm not a guru in this area. ;-)
                During an implementation of possibility to store user domain
model instances in a separate resource, I came to the question: is it
necessary to share single instance of MEditingDomain across all the
diagrams? I suppose, that it was intentionally implemented this way, and
probably, somebody from IBM team could enumerate an arguments for it.

______________
Alex Shatalin
_______________________________________________
gmf-dev mailing list
gmf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/gmf-dev


Back to the top