Problem with EFeatureMapEntry [message #417652] |
Thu, 20 March 2008 13:50 |
Eclipse User |
|
|
|
Originally posted by: nima.mazloumi.gmx.de
Hi,
I have defined the following model. Basically a Container may contain
Element1, Element2 and Element3 elements in any order. After gernerating
the editor I am not able to add any Element1-3 children. When I add them
manually in the XML and open it with the editor they are displayed in
the outline tree view.
Any idea what might be missing?
Thanks,
Nima
<eClassifiers xsi:type="ecore:EClass" name="Container"
eSuperTypes="#//UniqueElement">
<eStructuralFeatures xsi:type="ecore:EAttribute"
name="ContainerNodes" upperBound="-1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="group"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="Element1"
upperBound="-1"
eType="#//Element1" volatile="true" transient="true"
containment="true">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="group" value="#ContainerNodes"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="Element2"
upperBound="-1"
eType="#//Element2" volatile="true" transient="true"
containment="true">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="group" value="#ContainerNodes"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="Element3"
upperBound="-1"
eType="#//Element3" volatile="true" transient="true"
containment="true">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="group" value="#ContainerNodes"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
|
|
|
|
|
|
|
|
Re: Problem with EFeatureMapEntry [message #417694 is a reply to message #417673] |
Fri, 21 March 2008 13:22 |
Eclipse User |
|
|
|
Originally posted by: nima.mazloumi.gmx.de
Hello Ed,
I tried this:
<eClassifiers xsi:type="ecore:EClass" name="Container">
...
<eStructuralFeatures xsi:type="ecore:EReference" name="Element1" upperBound="-1"
eType="#//Element1" volatile="true" transient="true" containment="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="group" value="#ContainerNodes"/>
<details key="kind" value="element"/>
</eAnnotations>
</eStructuralFeatures>
...
</eClassifiers>
as well as:
<eClassifiers xsi:type="ecore:EClass" name="Container">
...
<eStructuralFeatures xsi:type="ecore:EReference" name="Element1" upperBound="-1"
eType="#//Element1" volatile="true" transient="true" containment="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="group" value="#ContainerNodes"/>
</eAnnotations>
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
</eAnnotations>
</eStructuralFeatures>
...
</eClassifiers>
as well as:
<eClassifiers xsi:type="ecore:EClass" name="Element1">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
</eAnnotations>
</eClassifiers>
But none of them works. Something must have changed from EMF 2.1.x to 2.3.x.
Generating a new editor with my old model results to the same problem, that now no children can be created.
Any idea? I would like to avoid redefining everything now using XML Schema.
Thanks,
Nima
|
|
|
Re: Problem with EFeatureMapEntry [message #417697 is a reply to message #417694] |
Fri, 21 March 2008 15:31 |
Ed Merks Messages: 33145 Registered: July 2009 |
Senior Member |
|
|
Nima,
It definitely won't be necessary to redefine in schema, but defining an
analogous example in schema and comparing the annotations would help.
Just glancing at XMI serialized Ecore snippets it's hart to see problems
jump out. If you care to send me the complete Ecore model, I can have a
look using the tools, to try to reproduce the problem.
Nima Mazloumi wrote:
> Hello Ed,
>
> I tried this:
>
> <eClassifiers xsi:type="ecore:EClass" name="Container">
> ...
> <eStructuralFeatures xsi:type="ecore:EReference" name="Element1"
> upperBound="-1"
> eType="#//Element1" volatile="true" transient="true"
> containment="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="group" value="#ContainerNodes"/>
> <details key="kind" value="element"/>
> </eAnnotations>
> </eStructuralFeatures>
> ...
> </eClassifiers>
>
> as well as:
>
> <eClassifiers xsi:type="ecore:EClass" name="Container">
> ...
> <eStructuralFeatures xsi:type="ecore:EReference" name="Element1"
> upperBound="-1"
> eType="#//Element1" volatile="true" transient="true"
> containment="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="group" value="#ContainerNodes"/>
> </eAnnotations>
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> </eAnnotations>
> </eStructuralFeatures>
> ...
> </eClassifiers>
>
> as well as:
>
> <eClassifiers xsi:type="ecore:EClass" name="Element1">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> </eAnnotations>
> </eClassifiers>
>
> But none of them works. Something must have changed from EMF 2.1.x to
> 2.3.x.
> Generating a new editor with my old model results to the same problem,
> that now no children can be created.
>
> Any idea? I would like to avoid redefining everything now using XML
> Schema.
>
> Thanks,
> Nima
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03174 seconds