|
Re: Annotations not functional? [message #427918 is a reply to message #427916] |
Thu, 05 March 2009 18:14 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Dirk,
Comments below.
Dirk Hoffmann wrote:
> Hi,
>
> I tried to use Ecore Annotations in order to put kind of marks on
> features in the modelling phase which I then want to query inside the
> model code.
>
> The annotation has the following attributes:
>
> Source="TrimRange"
It's generally a good idea to use a URI
> References="#//ReferenceNode/basedOn1Reference
> #//RelationOriginNode/basedOn1RelationOrigin"
>
> The latter correctly referencing two features of one of my classes.
>
> When I queried the annotation with
>
> String source = anno.getSource();
> EList references = anno.getReferences();
>
> the references turned out to be empty.
This sounds like https://bugs.eclipse.org/bugs/show_bug.cgi?id=259078
>
> Looking af the package initialisation code I couldn't find any code
> that sets the references with the EAnnotation objects. I am using EMF
> 2.2.5.
>
> Is that a still missing feature or am I doing something the wrong way?
It was missing function. A work around is to set the GenPackage's
Initialize by Loading property to true.
>
> Regards,
> Dirk
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02954 seconds