Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Generic EMF Annotations
Generic EMF Annotations [message #524622] Thu, 01 April 2010 15:35 Go to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
Hi there,

we are looking for a generic way to add arbitrary data to EMF model
objects that also get persistently stored.

I understand that EAnnotation does the job for the ecore metamodel but
we are discouraged by EMF chiefs to use that in other metamodels.

One requirement would be to enable adding annotations to all kinds of
existing metamodels and hence adding custom Annotation classes to our
own metamodel is no option.

I've seen similar requests multiple times in the group and there are
some feature requests. Are there any plans to implement this? Is there
anything one could do to assist an implementation in order to make such
thing happen eventually?

Cheers,
Hauke
Re: Generic EMF Annotations [message #524648 is a reply to message #524622] Thu, 01 April 2010 16:27 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Hauke,

Comments below.

Hauke Fuhrmann wrote:
> Hi there,
>
> we are looking for a generic way to add arbitrary data to EMF model
> objects that also get persistently stored.
>
> I understand that EAnnotation does the job for the ecore metamodel but
> we are discouraged by EMF chiefs to use that in other metamodels.
Yes, it's best to define an annotation mechanism specific to your model.
>
> One requirement would be to enable adding annotations to all kinds of
> existing metamodels and hence adding custom Annotation classes to our
> own metamodel is no option.
One can always define a decorator model, much like the GenModel, where
you have objects that reference the thing being annotated and then
contain the annotations for it.
>
> I've seen similar requests multiple times in the group and there are
> some feature requests. Are there any plans to implement this?
One might argue that the Mapping model already implements this. The
input of each mapping could be the think being annotated and the output
could be the annotation information.
> Is there anything one could do to assist an implementation in order to
> make such thing happen eventually?
Defining an Annotation EClass with an EObject-typed EReference to the
thing being annotated and perhaps a containment reference also of type
EObject for the annotation information would be a simple generic way.
It's not entirely clear the best design or that everyone would be happy
with a one-size-fits-all design.
>
> Cheers,
> Hauke


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:EMF for non-Java languages
Next Topic:Why is resourceSet.createResource(fileURI) always returning null ?
Goto Forum:
  


Current Time: Fri Apr 19 20:57:55 GMT 2024

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

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

Back to the top