Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » EMF Generics and QVT-O
EMF Generics and QVT-O [message #909738] Fri, 07 September 2012 17:18 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 6
Registered: July 2010
Junior Member
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!!

Re: EMF Generics and QVT-O [message #909761 is a reply to message #909738] Fri, 07 September 2012 18:22 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
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!!
>
>
Previous Topic:[Teneo,QVTo] QVTo + Teneo + Javassist -- possible or not?
Next Topic:Strange reference to UCharacter in RunnableQVTParser
Goto Forum:
  


Current Time: Sat Apr 20 03:20:34 GMT 2024

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

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

Back to the top