Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » One editor for multiple ecore models
One editor for multiple ecore models [message #988575] Fri, 30 November 2012 14:56 Go to next message
Spiros S is currently offline Spiros SFriend
Messages: 7
Registered: November 2012
Junior Member
Hi, I have a question about multiple ecores.
Is it possible for an editor to represent elements from multiple ecore models?
I have to make an editor that uses a ecore which maps elements from two other ecores. A sample of the mapping ecore is on the picture.
index.php/fa/12559/0/

My intention is to use shortcuts to make elements from the other two ecores appear on the canvas and then relate them to each other.

My main problem so far is that while I am able to load more than one ecore to my gmfmap file, I cannot create the generator because I can only set one ecore on the creation wizard.
Is it possible what I am trying to do or it is not supported by GMF?

Thank you very much
Spiros
  • Attachment: maping.PNG
    (Size: 10.22KB, Downloaded 707 times)
Re: One editor for multiple ecore models [message #988602 is a reply to message #988575] Fri, 30 November 2012 16:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Spiros,

I'm not sure the right answer, but isn't it possible to create a gmfmap
file for each of the models and generate the infrastructure for each of
them? Doesn't the third "combining" model then reuse the generated GMF
things from the other two models?

On 30/11/2012 3:56 PM, Spiros S wrote:
> Hi, I have a question about multiple ecores.
> Is it possible for an editor to represent elements from multiple ecore models?
> I have to make an editor that uses a ecore which maps elements from two other ecores. A sample of the mapping ecore is on the picture.
>
>
> My intention is to use shortcuts to make elements from the other two ecores appear on the canvas and then relate them to each other.
>
> My main problem so far is that while I am able to load more than one ecore to my gmfmap file, I cannot create the generator because I can only set one ecore on the creation wizard.
> Is it possible what I am trying to do or it is not supported by GMF?
>
> Thank you very much
> Spiros
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: One editor for multiple ecore models [message #988638 is a reply to message #988602] Fri, 30 November 2012 19:27 Go to previous messageGo to next message
Spiros S is currently offline Spiros SFriend
Messages: 7
Registered: November 2012
Junior Member
Well in my case I have already the other editors for logical and deployment. So what you say is right. When I drag something from another model, it uses the notation that I have made for the element in the other editors.
My problem is that the mapping editor(image) needs to know what to store for example in the attribute pc of the PCtoProcessMap. So that means that I need to map my shortcut(from the deployment and logical) to the mapping model.
I read that to do this I need a fake node in the mapping gmfgraph to map the shortcut to it. But I cannot use more than one ecores in the gmfmap to do that.
So I do not know how to make the elements from the 2 other models, interact with elements from the mapping model in the mapping editor.

I hope I made my situation more clear and I did not confuse you more Smile
Thanks!
Re: One editor for multiple ecore models [message #988863 is a reply to message #988638] Mon, 03 December 2012 13:45 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

did you try to right-click in the gmfmap editor and select "Load Resource ...". This should load a second ecore model into the gmfmap editor.

Hope that helps!

Ralph
Re: One editor for multiple ecore models [message #988997 is a reply to message #988863] Tue, 04 December 2012 08:59 Go to previous messageGo to next message
Spiros S is currently offline Spiros SFriend
Messages: 7
Registered: November 2012
Junior Member
Hi Ralph,
well I do not have a problem of loading the other ecores in the gmfmap file. I do the Load Resource and find them in my workspace.
But on the next step, when I have to generate the gmfgen file, the wizard allows me to set only one ecore and so it complains about the elements that belong to other editors.
Any ideas on that?
Thanks
Spiros
Re: One editor for multiple ecore models [message #1065183 is a reply to message #988997] Mon, 24 June 2013 15:57 Go to previous message
V Set is currently offline V SetFriend
Messages: 20
Registered: November 2012
Junior Member
I need to implement a similar model with different ecores. I would like to know about the solution to this issue. Or, the best way of implementing this. I have an ecore in package 'aPackage' that creates a model A. In a different diagram B, I have a bPackage that creates a model B. I need to have a shortcut to model aPackage.A and links from and to aPackage.A in bPackage.B. What is the best way of implementing this? I created shortcuts in ecore_diagram, generated the genModel, loaded the resources in gmfMap and generated gmfGen. However, I cannot create the diagrams. So I would like some help with this.

Thanks,

V
Previous Topic:Multiple diagrams from single plugin
Next Topic:Resizing of nodes
Goto Forum:
  


Current Time: Tue Apr 23 10:16:28 GMT 2024

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

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

Back to the top