Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » One metamodel Two Diagrams(Need some tips)
One metamodel Two Diagrams [message #556244] Tue, 31 August 2010 12:57 Go to next message
Fabricio Pellegrini is currently offline Fabricio PellegriniFriend
Messages: 36
Registered: July 2009
Member
Hi,

Im researching what is the best solution to manage two digrams of the same ecore metamodel.

Nowadays we already have this two diagrams using the same metamodel, but we cant exchange elements between it, like Diagram A have a reference of an element of Diagram B.

Any help?


I currently trying to use SharedDomain, but I dont know if It will solve my problem.
Re: One metamodel Two Diagrams [message #556297 is a reply to message #556244] Tue, 31 August 2010 16:06 Go to previous messageGo to next message
masija . is currently offline masija .Friend
Messages: 59
Registered: July 2010
Member
Hi Fabricio,
I had a simmilar problem, so maybe I can help you.
I had to develope two different "perspectives" on the same metamodel. So I developed two gmf-plugins, using the same ecore-model, but provided for each diagram only graphical representations for the needed elements.
After this step i used for both diagrams a shared editing domain, and a semi-canonical diagram behavior.
For these two steps the ressources provided by gmftools (see http://code.google.com/p/gmftools/ ) were very helpfull.

i think for you the following wiki-pages of gmf tools could be interesting:
SharedEditingDomain:
http://code.google.com/p/gmftools/wiki/SharedEditingDomain
The steps here are performed with the gmf M2M-transformation provided by the de.itemis.gmf.tools plug-in as a toolbar button, but I did the most parts manually.

SemiCanonicalDiagramEditPolicy:
http:// code.google.com/p/gmftools/wiki/SemiCanonicalDiagramEditPoli cy
Especially the part "Enable Dropping of Semantic Elements onto the Diagram" where a GenericDiagramDropEditPolicy is used to support drag and drop of the elements, which are currently not part of the diagram.

i hope I could help you. If this could be a solution for your problem, and you need some additional help, pleas feel free to ask again Wink

Best regardy,
Masija

Re: One metamodel Two Diagrams [message #556736 is a reply to message #556297] Thu, 02 September 2010 13:27 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
On 31-08-10 18:06, Masija wrote:
> Hi Fabricio,
> I had a simmilar problem, so maybe I can help you.
> I had to develope two different "perspectives" on the same metamodel. So
> I developed two gmf-plugins, using the same ecore-model, but provided
> for each diagram only graphical representations for the needed elements.
> After this step i used for both diagrams a shared editing domain, and a
> semi-canonical diagram behavior.
> For these two steps the ressources provided by gmftools (see
> http://code.google.com/p/gmftools/ ) were very helpfull.

Be carefull with GMFTools , it breaks with Helios release. (Latest GMF
code templates are not compatible with the GMFTools customized templates).

>
> i think for you the following wiki-pages of gmf tools could be interesting:
> SharedEditingDomain:
> http://code.google.com/p/gmftools/wiki/SharedEditingDomain The steps
> here are performed with the gmf M2M-transformation provided by the
> de.itemis.gmf.tools plug-in as a toolbar button, but I did the most
> parts manually.
>
> SemiCanonicalDiagramEditPolicy:
> http://code.google.com/p/gmftools/wiki/SemiCanonicalDiagramE ditPolicy
> Especially the part "Enable Dropping of Semantic Elements onto the
> Diagram" where a GenericDiagramDropEditPolicy is used to support drag
> and drop of the elements, which are currently not part of the diagram.
> i hope I could help you. If this could be a solution for your problem,
> and you need some additional help, pleas feel free to ask again ;)
>
> Best regardy,
> Masija
>
>
Re: One metamodel Two Diagrams [message #556797 is a reply to message #556736] Thu, 02 September 2010 16:19 Go to previous messageGo to next message
Fabricio Pellegrini is currently offline Fabricio PellegriniFriend
Messages: 36
Registered: July 2009
Member
Hi,

Thanks for the attention.

I'm following the sharingEditingDomain tutorial as you said and it says that I need to import de.itemis.gmf.runtime.extensions. But i didn't find this plugin on my eclipse and on the GMF site.


Where I can find this plugin?
Re: One metamodel Two Diagrams [message #556835 is a reply to message #556797] Thu, 02 September 2010 18:20 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
On 02-09-10 18:19, Fabricio Pellegrini wrote:
> Hi,
>
> Thanks for the attention.
>
> I'm following the sharingEditingDomain tutorial as you said and it says
> that I need to import de.itemis.gmf.runtime.extensions. But i didn't
> find this plugin on my eclipse and on the GMF site.
These plugins are on the itemis svn

svn checkout http://gmftools.googlecode.com/svn/trunk/

>
>
> Where I can find this plugin?
Re: One metamodel Two Diagrams [message #556839 is a reply to message #556835] Thu, 02 September 2010 18:30 Go to previous messageGo to next message
Fabricio Pellegrini is currently offline Fabricio PellegriniFriend
Messages: 36
Registered: July 2009
Member
Christophe Bouhier wrote on Thu, 02 September 2010 14:20
On 02-09-10 18:19, Fabricio Pellegrini wrote:
> Hi,
>
> Thanks for the attention.
>
> I'm following the sharingEditingDomain tutorial as you said and it says
> that I need to import de.itemis.gmf.runtime.extensions. But i didn't
> find this plugin on my eclipse and on the GMF site.
These plugins are on the itemis svn

svn checkout http://gmftools.googlecode.com/svn/trunk/

>
>
> Where I can find this plugin?



Thanks again Very Happy



I've finished this tutorial but I didn't see any change on my Diagrams.



[Updated on: Thu, 02 September 2010 20:25]

Report message to a moderator

Re: One metamodel Two Diagrams [message #556863 is a reply to message #556839] Thu, 02 September 2010 21:00 Go to previous message
Fernando Herrera is currently offline Fernando HerreraFriend
Messages: 49
Registered: January 2010
Member
I tried with gmf tools and I have gotten the same result: The shared domain doesn't work. Try with this: http://wiki.eclipse.org/GMF_Tips. If your diagrams figures(nodes and links) access diferent domain elements and them can be organized in packages like one package for diagram it is a good idea do it before follow the tutorial I have done this work and I can get work!. After finish the tutorial, create a new diagram with the root element of your dsl. After that, you can create aditional elements and if you do right click over the domain file, you will se initialize ... diagram and you have to select wich diagram create and wich element in the domain is the root for that diagram. Regards

Fernando

[Updated on: Thu, 02 September 2010 21:01]

Report message to a moderator

Previous Topic:Custom Connection Anchors
Next Topic:Transparent feature for a Node
Goto Forum:
  


Current Time: Thu Apr 25 09:19:50 GMT 2024

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

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

Back to the top