Ecore model instance to Eugenia [message #1793230] |
Wed, 01 August 2018 20:23 |
Maude Sabourin Messages: 11 Registered: May 2018 |
Junior Member |
|
|
I need to have the Eugenia GMF Editor open up with a programatically given diagram.
So far I've been able to do the following
- From XText grammar, generate Ecore
- Create an Emfatic file (and regen Ecore)
- Generate GenModel
- Generate a GMF Editor with Eugenia
The next step is to
- In the diagram editor, with the mouse, select entities, make links, etc.
Ex : I could create 2 entities A and B and have a link between each.
However, I would like the diagram editor to show up with this configuration already.
I'm looking for guides, tutorials, information on how I could code this configuration prior to generating the GMF Editor.
I currently have an ecore model instance that has something similar to
Entity A
Entity B
Link (A,B)
So I could just pull the information from that file and code the diagram. I still need the editor because the end user could afterwards modify this diagram.
Note : I am very new to these tools so beginner explanations or references are preferred.
Thanks a lot
|
|
|
Re: Ecore model instance to Eugenia [message #1793258 is a reply to message #1793230] |
Thu, 02 August 2018 09:15 |
|
Hi Maude,
Assuming I understand your question, if you right-click on your model file in the package/project explorer, you should find an "Initialize ... diagram" menu item which does what you're asking for.
Cheers,
Dimitris
|
|
|
|
|
Re: Ecore model instance to Eugenia [message #1793281 is a reply to message #1793278] |
Thu, 02 August 2018 22:41 |
|
Hi Maude,
> 1. The diagram obtained is the Ecore diagram. I need a diagram for an instance of the Ecore model.
To initialise a diagram for your model (My.canNoEx) you should right-click on it and select "Initialize ... diagram"
> 3. You can find the code that initialises a diagram from a model (i.e. the code behind the "Initialize ... diagram" menu item) in the generated .diagram plugin. I don't remember the name of the class off the top of my head but if you can't find it, please let me know and I'll have a look.
Cheers,
Dimitris
|
|
|
Powered by
FUDForum. Page generated in 0.03116 seconds