How to add a attribute or property to a EAttribute type? [message #1822505] |
Sun, 08 March 2020 22:22  |
Eclipse User |
|
|
|
I have a EMF ecore model where I have defined a EAttribute to EClass type, let's say EClass type Software and created Commit EAttribute. I made this to use EAnnotation to make Commit always as element using ExtendedMetaData and in xml it looks like this
<Software>
<Commit>blabla</commit>
<Software>
So far so good, but now there is a requirement comes that to add attribute/property lets say [b]repo[b] to be added to Commit type. So I planned to create Commit as EClass type instead of EAttribute and added 2 EAttribute type Commit and Repo. Then the problem arise because commit value is also coming as an attribute/property to Commit tag. it looks like this
<Software>
<Commit repo="blarepo" commit="blabla"/>
<Software>
I want to have the ouput something like this
<Software>
<Commit repo="blarepo">blabla</commit>
<Software>
Could you please tell me how to achieve this case using ecore model.
Thank you very much in advance.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03028 seconds