Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Annotations
Annotations [message #414805] Wed, 21 November 2007 18:59 Go to next message
Eclipse UserFriend
Originally posted by: andrew_steady.hotmail.com

Hi,

Is it possible to add custom annotation information to classes and
features such that they are accessible via the EClass/EStructuralFeature
instances?

e.g.

/**
* @model foo="baa" ?
*/

I've tried if obviously and I'm guessing this just isn't possible but
wanted to double check!

Cheers with beers,

Andy
Re: Annotations [message #414809 is a reply to message #414805] Thu, 22 November 2007 00:01 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040704030400090409000108
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Andy,

In any @model annotation you can express an EAnnotation like this:

@model annotation="sourceURI a='b'"

So it's of the form annotation="{<source-URI> {<key>='<value>' }*}*"
and it will be converted to an EAnnotation on the corresponding
EModelElement with source set to the give source-URI and with details
containing the key/value pairs. Special characters can be escaped with \
and " and ' are interchangeable.

It's better then whine with wine. :-P


Andy Steady wrote:
> Hi,
>
> Is it possible to add custom annotation information to classes and
> features such that they are accessible via the
> EClass/EStructuralFeature instances?
>
> e.g.
> /**
> * @model foo="baa" ?
> */
>
> I've tried if obviously and I'm guessing this just isn't possible but
> wanted to double check!
>
> Cheers with beers,
>
> Andy
>


--------------040704030400090409000108
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Andy,<br>
<br>
In any @model annotation you can express an EAnnotation like this:<br>
<blockquote>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Annotations [message #414822 is a reply to message #414809] Fri, 23 November 2007 02:23 Go to previous message
Eclipse UserFriend
Originally posted by: andrew_steady.hotmail.com

Fantastic, many thanks.
Previous Topic:OCL query of EMF models across multiple XMI resources
Next Topic:Possiblity of splitting a generator description
Goto Forum:
  


Current Time: Fri Mar 29 01:57:37 GMT 2024

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

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

Back to the top