Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Annotations not functional?
Annotations not functional? [message #427916] Thu, 05 March 2009 16:14 Go to next message
Dirk Hoffmann is currently offline Dirk HoffmannFriend
Messages: 163
Registered: July 2009
Senior Member
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"
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.

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?

Regards,
Dirk
Re: Annotations not functional? [message #427918 is a reply to message #427916] Thu, 05 March 2009 18:14 Go to previous message
Ed Merks is currently offline Ed MerksFriend
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/
Previous Topic:launching wizard
Next Topic:[CDO]What query language CDO Supported?
Goto Forum:
  


Current Time: Thu Apr 25 01:25:43 GMT 2024

Powered by FUDForum. Page generated in 0.02954 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top