Community
Participate
Working Groups
When editing a "instanceModel" of the Hummingbird20 example I click on New Child on "Application" and the "Component" option appears twice in the menu. If we check the "ApplicationItemProvider" of the org.eclipse.sphinx.examples.hummingbird20.edit plugin we could see that it creates a normal child descriptor but then it creates a new child descriptor based on APPLICATION__MIXED @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (InstanceModel20Package.Literals.APPLICATION__COMPONENTS, InstanceModel20Factory.eINSTANCE.createComponent())); [adding more newChildDescriptors] newChildDescriptors.add (createChildParameter (InstanceModel20Package.Literals.APPLICATION__MIXED, FeatureMapUtil.createEntry (InstanceModel20Package.Literals.APPLICATION__COMPONENTS, InstanceModel20Factory.eINSTANCE.createComponent()))); } Once the "Component" is created selecting any of the two options it also appears two children. The "Component" and "<components> Component" but they are the same object and it is serialized as just one element. To solve this undesired behaviour, I modified the hummingBird20.ecore. I changed the "components" EReference of Application of the instanceModel EPackage. Derived -> from true to false Transient -> from true to false Volatile -> from true to false I also removed the ExtendedMetaData annotation After these changes I regenerated the Model Code, Edit Code and Editor Code with the GenModel. And I got the desired behaviour as the one we have with the "typeModel" "Platform" "Component Type".
*** This bug has been marked as a duplicate of bug 392635 ***