Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Sharing a global model between multiple (independent) diagrams
Sharing a global model between multiple (independent) diagrams [message #129001] Wed, 23 May 2007 16:42 Go to next message
Eclipse UserFriend
Originally posted by: twominutehate.joinpoint.org

Hello,

i have a global (persistent) model, whose elements can be referenced by
the model of the diagrams. The diagrams are independent of each other.
The global model can be modified by a view. How can I share the
EditingDomain/ResourceSet which is used for the global model with the
diagrams? For user convenience i also want to be able to create new
global model elements from within the diagram editor (instead having the
user to switch to the global model view and adding the element from
there). So they have to share the editing domain, I guess?!

Thank you for any help!

Ömer Yildiz
Re: Sharing a global model between multiple (independent) diagrams [message #129335 is a reply to message #129001] Thu, 24 May 2007 07:21 Go to previous messageGo to next message
Eclipse UserFriend
Hello Ömer,

If you are going to share editing domain then "global model" should use instance
produced by "GMFEditingDomainFactory". In addition it could be helpful to
read following page: http://wiki.eclipse.org/index.php/GMF_Tips#Sharing_single_Ed itingDomain_instance_across_several_diagrams

In general I think it's not necessary to share Editing domain across several
diagrams and "global model". For example, generated Diagram/DomainModel content
navigator providers are using separate EditingDomain instance, but still
are in synch with diagram/model contents modified by user from the diagram...

-----------------
Alex Shatalin
Re: Sharing a global model between multiple (independent) diagrams [message #129358 is a reply to message #129335] Thu, 24 May 2007 08:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: oemer.yildiz.semanticedge.com

So it's enough when they share the same ResourceSet?

Thank you very much!


Alex Shatalin schrieb:
> Hello Ömer,
>
> If you are going to share editing domain then "global model" should use
> instance produced by "GMFEditingDomainFactory". In addition it could be
> helpful to read following page:
> http://wiki.eclipse.org/index.php/GMF_Tips#Sharing_single_Ed itingDomain_instance_across_several_diagrams
>
>
> In general I think it's not necessary to share Editing domain across
> several diagrams and "global model". For example, generated
> Diagram/DomainModel content navigator providers are using separate
> EditingDomain instance, but still are in synch with diagram/model
> contents modified by user from the diagram...
>
> -----------------
> Alex Shatalin
>
>
Re: Sharing a global model between multiple (independent) diagrams [message #129383 is a reply to message #129358] Thu, 24 May 2007 08:37 Go to previous messageGo to next message
Eclipse UserFriend
Hello Ömer,

> So it's enough when they share the same ResourceSet?
No. Even resource tets are different - Navigator take care on notification
came from Eclipse Resources subsystem and update the contents..

-----------------
Alex Shatalin
Re: Sharing a global model between multiple (independent) diagrams [message #129396 is a reply to message #129383] Thu, 24 May 2007 08:39 Go to previous messageGo to next message
Eclipse UserFriend
Hello Alex,

See Ecore example, EcoreDomainNavigatorContentProvider, myWorkspaceSynchronizer
field to get an understanding how it's done now.

-----------------
Alex Shatalin
Re: Sharing a global model between multiple (independent) diagrams [message #129536 is a reply to message #129396] Thu, 24 May 2007 11:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: oemer.yildiz.semanticedge.com

Hmm, i'm unable to find the ECore example. Perhaps the example is not
included in EMF 2.2? I'm currently tied to EMF 2.2 and GMF 1.0.3 due to
JVM compatibility issues.


Thanks,
Ömer Yildiz

Alex Shatalin schrieb:
> Hello Alex,
>
> See Ecore example, EcoreDomainNavigatorContentProvider,
> myWorkspaceSynchronizer field to get an understanding how it's done now.
>
> -----------------
> Alex Shatalin
>
>
Re: Sharing a global model between multiple (independent) diagrams [message #129889 is a reply to message #129536] Fri, 25 May 2007 05:27 Go to previous message
Eclipse UserFriend
Hello Ömer,

This example (Ecore diagram editor) is included into "GMF Examples" distribution.
In addition you can checkout the sources from eclipse CVS: dev.eclipse.org
/cvsroot/modeling org.eclipse.gmf/examples/org.eclipse.gmf.ecore.editor.

-----------------
Alex Shatalin
Previous Topic:Problems displaying diagrams with >= 2^12 elements
Next Topic:Creating flexible figure in gmf
Goto Forum:
  


Current Time: Wed Jul 16 20:07:17 EDT 2025

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

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

Back to the top