One editor for multiple ecore models [message #988575] |
Fri, 30 November 2012 14:56  |
Eclipse User |
|
|
|
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
Attachment: maping.PNG
(Size: 10.22KB, Downloaded 753 times)
|
|
|
Re: One editor for multiple ecore models [message #988602 is a reply to message #988575] |
Fri, 30 November 2012 16:32   |
Eclipse User |
|
|
|
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
>
|
|
|
Re: One editor for multiple ecore models [message #988638 is a reply to message #988602] |
Fri, 30 November 2012 19:27   |
Eclipse User |
|
|
|
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 
Thanks!
|
|
|
|
Re: One editor for multiple ecore models [message #988997 is a reply to message #988863] |
Tue, 04 December 2012 08:59   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04131 seconds