Single editor for multiple editor files [message #900044] |
Fri, 03 August 2012 15:34  |
Eclipse User |
|
|
|
Hello,
Sorry if this has been answered elsewhere, I've searched for some time but couldn't find an answer.
I am working on quite large metamodel, defined in two ecore files:
A.ecore
<eClassifiers xsi:type="ecore:EClass" name="HeadOfA">
...
</eClassifiers>
...
B.ecore
<eClassifiers xsi:type="ecore:EClass" name="HeadOfB">
<eStructuralFeatures xsi:type="ecore:EReference" name="myA" eType="ecore:EClass A#//HeadOfA"
containment="true"/>
...
</eClassifiers>
...
Even if I used two ecore files, I wish to have a single editor for both. Everything works well with the default EMF editor and XText: whenever I create an instance of HeadOfB, I can create a child which is an instance of HeadOfA in the same editor. Of course, I only have one genmodel for both files.
Now I would like to create a graphical editor with GMF. Is there a way to create a single editor to work with both ecore files? If I try what is written in every tutorial, when I try to create the gmfgraph file I can only see the classes of metamodel B. Is there a guide or tutorial for this specific use case somewhere?
Thanks in advance for any help!
Alexis
|
|
|
|
Re: Single editor for multiple editor files [message #900163 is a reply to message #900136] |
Sat, 04 August 2012 19:51  |
Eclipse User |
|
|
|
Hi Ralph, thank you for your answer,
I was talking about the wizard from the GMF dashboard that helped me creating my gmfgraph file: in that wizard, I selected my metamodel B, and it created a bunch of figures corresponding to the classes in metamodel B. After reading your answer, I tried to create manually some figures in the gmfgraph for the classes in metamodel A, and move to the gmfmap file.
There, I tried a load ressource as you suggested, and I created a Top Node Reference, but when I tried to set its containment feature, I could not see any class from metamodel A, only the classes from metamodel B. Thus, I could not link the figures I created manually in the gmfgraph file to the classes in metamodel A to their corresponding semantic classes, even after loading the ressource for metamodel A.
I'm really thinking about creating a single file for both metamodels, even if the result will be a huge ugly metamodel.
|
|
|
Powered by
FUDForum. Page generated in 0.03404 seconds