Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] Strange behaviour of polymorphism when using stereotypes
[Xpand] Strange behaviour of polymorphism when using stereotypes [message #665332] Thu, 14 April 2011 11:08
Thomas  is currently offline Thomas Friend
Messages: 1
Registered: April 2011
Junior Member
Hi all,

i have encountered a strange problem when using polymorphism to resolve stereotypes applied to class properties or to association ends.

There is a stereotype "Generic", which is applicable to UML::Element.

This is the Xpand fragment in question:

«DEFINE typeArguments FOR xxx::Generic»
«do something»

«DEFINE typeArguments FOR uml::Property»
«IF xxx::Generic.isInstance(this)»
/* ?! */

The /* ?! */ marker indeed appears in the generated source code. When trying to EXPAND something requiring a xxx:Generic instead, an exception is thrown indicating the lack of a matching definition, however:

No Definition 'something for uml::Property' found!

Explicitly checking for the "Generic" stereotype and its tagged values can be used instead. Did i miss something about Xpand polymorphism or is this a bug in the interpreter?

Any help appreciated.

- Thomas
Previous Topic:Re: [Xtend / Check] using multiple check files
Next Topic:[Acceleo3] Strange template invocation error
Goto Forum:

Current Time: Thu Nov 30 18:57:27 GMT 2023

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

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

Back to the top