|
Re: XCore Annotation Support [message #1534860 is a reply to message #1530522] |
Mon, 29 December 2014 10:44 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Martin,
Comments below.
On 27/12/2014 12:44 AM, Martin Taal wrote:
> Hi,
> I will start with a question: is it possible to create/define my own
> Annotations model (like xcore lang) to define annotations which can be
> used in an xcore file?
Yes. As you can see they're just declarations of a named namespace URI.
> My idea is to somehow make it possible to specify JPA annotations
> directly in xcore.
>
> I noticed that XCore has some way to declare an annotation. But I only
> see them in the form of:
> annotation "http://namespace" as NameSpace
Yes.
>
> For Ecore and GenModel.
Yes or for any namespace.
>
> So it seems possible to define our own annotation. But how are these
> mapped to the EAnnotations?
The namespace becomes the EAnnotation's source URI and they key/value
pairs become the details.
> Do you have some more examples?
It's pretty much trivial...
> Also is it possible to define an annotation with number, boolean and
> string efeatures (and ereferences), so more structured annotations?
No, just key-value pairs that mapping to the details of an EAnnotation.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03052 seconds