Summary: | [Examples] Incorrect properties of hummingbird20.ecore Application components EReference | ||
---|---|---|---|
Product: | [Automotive] Sphinx | Reporter: | Jabier Martinez <jabimail> |
Component: | Core | Assignee: | Project Inbox <sphinx-inbox> |
Status: | CLOSED DUPLICATE | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | idydieng, stephaneberle9 |
Version: | 0.7.0 | Keywords: | example |
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Jabier Martinez
2012-06-11 10:15:23 EDT
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 *** |