Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » editing more than one instance of a model with shared editing domain
editing more than one instance of a model with shared editing domain [message #226656] Sat, 18 April 2009 11:32 Go to next message
Eclipse UserFriend
I've implemented the approach identified in the following article.
http://wiki.eclipse.org/GMF_Tips#Sharing_single_EditingDomai n_instance_across_several_diagrams.

I noticed if you open an editor on a second (instance of the) model that
all of the resources for both model instances are now in the shared
editingDomain resource set. Is there a way to implement the shared
editingDomain approach above so that each instance of the model has it's
own shared editingDomain? I thought that you might be able to use a
unique (editingDomain) ID based on the model instance, but the
plugin.xml have references to that ID:

<extension
point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings ">
<?gmfgen generated="true"?>
<clientContext id="com.datria.DVA.dpj.prjDiagram.TypeContext">
<enablement>
<test
property="org.eclipse.gmf.runtime.emf.core.editingDomain"
value="sharedEditingDomain"/>
and

<extension point="org.eclipse.emf.transaction.editingDomains">
<editingDomain
factory="org.eclipse.emf.workspace.WorkspaceEditingDomainFactory "
id="sharedEditingDomain"/>

I'm not sure how to overcome these, is there a way to dynamically set
these values in the editors?
Re: editing more than one instance of a model with shared editing domain [message #226710 is a reply to message #226656] Mon, 20 April 2009 08:16 Go to previous message
Eclipse UserFriend
Hello John,

I think the simple way will be to not use GMF EdingDomain registry at all
and just implement your own one + modify all the places in the code (you
have modified already to make use of GMF EditingDomain registry) to call
your custom implementation instantiating one editing domain per EditorInput/other
editor ID.

-----------------
Alex Shatalin
Previous Topic:Using XPand from Java
Next Topic:Wrong palette displayed in partitioned diagram
Goto Forum:
  


Current Time: Sat May 10 11:24:56 EDT 2025

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

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

Back to the top