[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt] Re: Derive constraints

Hi, Kenn,

This has the unhappy side-effect of actually *modeling* the accessor
operation, which is a Java-ism.  This accessor then becomes available to
OCL, resulting in possible confusion and even incompatibility of OCL
expressions with other implementations of the metamodel that don't model
these accessors.

Is it possible that the code generation could elide the accessor operation
from the Ecore representation that results?  This, together with the
ability to use package-merge to include the accessors only for codegen but
not the *.metamodel.uml resource, would make a clean metamodel for clients
such as OCL.

Cheers,

Christian


Kenn Hussey wrote:

> Javi,
> 
> Yes, the current way to do it (as supported by the UML2 code generator) is
> to introduce an operation that has the same signature as the accessor you
> are looking to derive. Ed's also looking at how to provide built-in
> support for feature derivation in EMF - take a look at
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=216701.
> 
> 
> Kenn

-----8<-----