Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Single editor for multiple editor files
Single editor for multiple editor files [message #900044] Fri, 03 August 2012 15:34 Go to next message
Alexis Marechal is currently offline Alexis MarechalFriend
Messages: 16
Registered: July 2009
Junior Member
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 #900136 is a reply to message #900044] Sat, 04 August 2012 13:10 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

where in the gmfgraph file do you link to your semantic meta-models? Do you mean the gmf-map model? Did you try to do there a right click and choose the load resource option?

Ralph
Re: Single editor for multiple editor files [message #900163 is a reply to message #900136] Sat, 04 August 2012 19:51 Go to previous message
Alexis Marechal is currently offline Alexis MarechalFriend
Messages: 16
Registered: July 2009
Junior Member
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.
Previous Topic:Strange problem
Next Topic:Draw lines on create
Goto Forum:
  


Current Time: Tue Mar 19 04:12:36 GMT 2024

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

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

Back to the top