简体   繁体   中英

use Ecore/XMI editor for instance creation from Ecore metamodel

I have a metamodel in the form of an Ecore file. I saw in some previous projects that is possible to generate an xmi file from which it is possible to edit an instance of the Ecore metamodel.

I have generated the XMI file by clicking a class in the metamodel then " Create Dynamic Instance... " but then when I click nodes in xmi file, I miss the *new Child* command that let me to create the instance fields as in the folowing picture: 在此处输入图像描述

Any idea how to solve this

Well, without your metamodel and more information about exactly from which root object you created your dynamic instance, it's hard to answer properly.

Usually, if the New Child menu doesn't pop up, it's because your metaclass misses containment EReference s. The generic EMF tree editor relies on the EStructuralFeatures of each metaclass to display the various panels/menu to set information of your instances. If there is no containment references, then, no child can be created.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM