|
Re: EcoreUtil.getAnnotation: multiple annotations with same source [message #431810 is a reply to message #431801] |
Mon, 27 July 2009 16:30 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Kai,
While it's certainly possible to have more than one annotations with the
same source, it's not a good idea and the helper methods for accessing
annotations don't provide help for that pattern of usage. Obviously it
would be possible to have duplicate or conflicting mappings with such an
approach.
Kai Schlamp wrote:
> Hi.
>
> In CDO a structural feature can have multiple annotation with the same
> source, like:
>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="value"
> eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
> <eAnnotations source="http://www.eclipse.org/CDO/DBStore">
> <details key="columnName" value="HOLY"/>
> </eAnnotations>
> <eAnnotations source="http://www.eclipse.org/CDO/DBStore">
> <details key="columnType" value="CLOB"/>
> </eAnnotations>
> </eStructuralFeatures>
>
> The problem with EcoreUtil.getAnnotation() now is that it always only
> checks the first annotation.
> Shouldn't it check all annotations with that source if the key exists?
>
> Regards,
> Kai
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02956 seconds