Domain Model for creating a modelling workbench in Sirius [message #1818174] |
Mon, 09 December 2019 11:43 |
Clever Alves Messages: 101 Registered: August 2019 |
Senior Member |
|
|
Hi!
I'd built the Ecore model below, generated its source code and launched a runtime to use its concepts (A, B, etc). In such a new environment, I've created a modelling project and selected my Ecore model in "Example EMF Model Creation Wizards". However, I'm not able to add elements to such a generated model in the tree editor...The drop-down menu starts with "Undo", rather than "New Child", it happens for all elements taken as root (i.e. A, B, etc. I'd like to see what's illustrated for the element/concept "Family" in the example below). I'd appreciate very much if someone could give me any clue on how to solve it out, I'm a beginner user of EMF's tools...
Thank you for your attention.
Regards,
Clever.
-
Attachment: Untitled.png
(Size: 65.32KB, Downloaded 599 times) -
Attachment: image.png
(Size: 12.98KB, Downloaded 318 times)
|
|
|
Re: Domain Model for creating a modelling workbench in Sirius [message #1818199 is a reply to message #1818174] |
Tue, 10 December 2019 07:40 |
|
Hi,
This is more of an EMF than Sirius question, but it looks like your metamodel does not define any containment relationship. Whichever type you chose as your root element in the model ccreation wizard, the metamodel definition does not allow it to contain anything, so it is normal that the EMF-generated editor and menus do not offer anything.
The simplest workaround if you do not care particularly about containment would be to create a single "wrapper" type to serve as the root of your models which can contain any number of "Element", and create an empty interface/abstract class "Element" that all your other classes inherit from.
Pierre-Charles David - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.04749 seconds