Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 19:29 Go to next message
Morteza Yaqubkhani is currently offline Morteza YaqubkhaniFriend
Messages: 5
Registered: April 2021
Junior Member
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 680 times)
Re: create a model instance from a metamodel in EMF [message #1840118 is a reply to message #1840099] Wed, 07 April 2021 04:39 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
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 05:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
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".

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: create a model instance from a metamodel in EMF [message #1840154 is a reply to message #1840119] Wed, 07 April 2021 16:08 Go to previous messageGo to next message
Morteza Yaqubkhani is currently offline Morteza YaqubkhaniFriend
Messages: 5
Registered: April 2021
Junior Member
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 09:12 Go to previous message
Morteza Yaqubkhani is currently offline Morteza YaqubkhaniFriend
Messages: 5
Registered: April 2021
Junior Member
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: Sat Apr 27 03:52:50 GMT 2024

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

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

Back to the top