|
Re: Generic EMF Annotations [message #524648 is a reply to message #524622] |
Thu, 01 April 2010 16:27 |
Ed Merks 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/
|
|
|
Powered by
FUDForum. Page generated in 0.02395 seconds