Skip to main content



      Home
Home » Modeling » EMF » create a model instance from a metamodel in EMF
create a model instance from a metamodel in EMF [message #1840099] Tue, 06 April 2021 15:29 Go to next message
Eclipse UserFriend
index.php/fa/40285/0/Hi.
I'm new to EMF. I've created a metamodel in eclipse, and now I want to make a model from it.
I've used this tutorial from vogella.com website.

When I create the model, and I want to edit it like editing a metamodel (section 5.4. of the tutorial) by right-clicking on the model, there isn't any option in the menu for "new child."
I've tried many times, but no result. Does anyone have any idea about it?."

Thank you in advance for your guidance.
Morteza

  • Attachment: EFM.png
    (Size: 48.43KB, Downloaded 939 times)
Re: create a model instance from a metamodel in EMF [message #1840118 is a reply to message #1840099] Wed, 07 April 2021 00:39 Go to previous messageGo to next message
Eclipse UserFriend
Hi

An Ecore metamodel has a *.ecore extension and a Create Dynamic Instance menu option.

You appear to have a model already so an instance does not make much sense.

Regards

Ed Willink
Re: create a model instance from a metamodel in EMF [message #1840119 is a reply to message #1840118] Wed, 07 April 2021 01:41 Go to previous messageGo to next message
Eclipse UserFriend
At least by default, there will only be New Child options for the containment references of the context object. I say "by default" because it's controlled by the options on the GenFeature, i.e., the structural feature wrappers in the *.genmodel that wrap each thing in your *.ecore model. Here there are options such as "Children" and "Create Child".
Re: create a model instance from a metamodel in EMF [message #1840154 is a reply to message #1840119] Wed, 07 April 2021 12:08 Go to previous messageGo to next message
Eclipse UserFriend
Hi. It seems that there is a problem with EMF forms editor. Apparently, the EMF forms editor is not installed and should be installed separately.

Cheers,
Morteza
Re: create a model instance from a metamodel in EMF [message #1840744 is a reply to message #1840154] Fri, 23 April 2021 05:12 Go to previous message
Eclipse UserFriend
Hi again,
Finally, I've found the reason. It is about setting containment references in the model creation phase.
You could find the issue explained here very well:
https://www.eclipse.org/forums/index.php/t/1066459/

Morteza
Previous Topic:[CDO] CDO client app - can I specify where to get the .options file?
Next Topic:[CDO] NPE in SecurityManager$PermissionManager which leads to TimeoutRuntimeException on next commit
Goto Forum:
  


Current Time: Sun May 11 21:49:23 EDT 2025

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

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

Back to the top