| Where is my editing domain set to null [message #1012106] |
Wed, 20 February 2013 17:05  |
Arto Jarvinen Messages: 32 Registered: May 2010 Location: Sweden |
Member |
|
|
I'm working on integrating EMF and GMF editors. I'm using the same editing domain over all editors and intend to have it active throughout the lifetime of the editors. When I go between a GMF editor, the EMF editor and back to the GMF editor, the editing domain gets deallocated (set to null). I suspect that this happens when the EMF editor loses focus but I haven't been able to track down where that happens. I have modified the GMF editors so that they don't dispose the editing domain when they lose focus.
Any hints as to how I can do the same for the EMF editor (page)? Thanks! -Arto
Blog: http://www.ostrogothia.com/process/
|
|
|
|
| Re: Where is my editing domain set to null [message #1012240 is a reply to message #1012193] |
Thu, 21 February 2013 02:15   |
Arto Jarvinen Messages: 32 Registered: May 2010 Location: Sweden |
Member |
|
|
Thanks Ed. I thought it was somehow disposed as is done in the GMF-generated editors. In the GMF editor the ResourceSetInfo is disposed when the editor loses focus and that disposal in turn disposes the editing domain. I've edited away this piece of code in the GMF editor and so I keep my editing domain when I go between several GMF editors. The fact remains though that when I set the focus GMF -> EMF -> GMF i have lost my editing domain. In my EMF editor I do the following in initializeEditingDomain:
// Use the same editing domain as the GMF editors do.
TransactionalEditingDomain domain = TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain("com.ostrogothia.processmodel.diagram.EditingDomain");
While the EMF editor is open, this works (it shows my GMF notational model also in the EMF editor) but is then somehow set to null when i click on an GMF editor tab.
I will keep on looking...
Cheers, -A
Blog: http://www.ostrogothia.com/process/
|
|
|
|
Powered by
FUDForum. Page generated in 0.01656 seconds