|
Re: EMF Generics and QVT-O [message #909761 is a reply to message #909738] |
Fri, 07 September 2012 18:22 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi
I think you're out of luck.
The OCL specification is not yet sufficiently aligned with UML to
support templated types, so templated types are unsupported in OCL and
consequently in OCL-based tooling such as QVT and Acceleo.
The new pivot-based Eclipse OCL prototypes resolution of problems in the
OMG OCL specification. The prototype supports templated types. IN due
course this may be available for QVTo too; but almost certainly not in
Kepler.
Regards
Ed Willink
On 07/09/2012 18:18, Missing name Mising name wrote:
> Hi,
>
> I'm currently writing some transformations using M2M QVTO, and it
> works really nice. However, now I tried to handle some EMF model
> entities that are modeled using Generics, and I ran into the foliowing
> issue:
>
> Let's assume our (simplified) meta-model looks like this:
> class A {}
> class B {}
> abstract class Container<T> {
> property entries : T[*];
> }
> class ConcreteContainerA extends Container<A> {}
> class ConcreteContainerB extends Container<B> {}
>
> Then, e.g., this QVTO code fragment leads to an error:
>
> helper foobar(inout c : ConcreteContainerA) {
> var tempA : A := object A{};
> * c.entries += tempA;
> return;
> }
>
> In the line marked with the asterisk '*', the editor says: "The type
> 'model::A' does not conform to the base type 'ecore::EObject' of the
> multi-valued property 'entries'".
>
> I cannot really interpret that error message, what am I doing wrong?
>
> Thanks for your help!!
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02660 seconds