Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMT (Generative Modeling Technologies) » OAW - Type Casting with XTend
OAW - Type Casting with XTend [message #617739] Mon, 16 June 2008 12:25
Eclipse UserFriend
Originally posted by: any.swc.rwth-aachen.de

I have specified the following in my Extension:

cached int getConnectorCount(uml::ConnectorEnd e) :
uml::MultiplicityElement.isInstance(e.role) ?
e.getPartWithPortMultiplicity() * e.upper() *
((uml::MultiplicityElement)e.role).upper()
: e.getPartWithPortMultiplicity() * e.upper()
;

The cast of e.role into MultiplicityElemenet is acknowledged by the OAW
environement with the error "cannot cast from uml::ConnectableElement into
uml::MultiplicityElement". The dynamic type of e.role may however by a
MultiplicityElement. What am I doing wrong?
Previous Topic:[Epsilon] ! Operator
Next Topic:[MOFScript] loading Metamodel
Goto Forum:
  


Current Time: Fri Nov 21 16:48:00 GMT 2014

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

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