[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.m2m] Re: [QVTO] How to cast and do a return?
|
- From: Gilbert Mirenque <formatzeh@xxxxxx>
- Date: Wed, 09 Sep 2009 17:48:31 +0200
- Newsgroups: eclipse.modeling.m2m
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.21 (Windows/20090302)
Thanks Radek, the casting thing works. But the return thing doesn't. In
the following mapping
mapping CMM::ConceptualModel::addCommunicationModel(inout rootModel :
CMM::CompositionModel)
{
if(self.container() = rootModel)
then{
if(rootModel.oclIsTypeOf(CompositeComponent))
then{
if(rootModel.oclAsType(CompositeComponent).referencedCompositionModel
= null)
then{
// here I want to just return or at least leave the outer if
return;
}endif;
}endif;
// some computations
} else {
log('container != rootModel (' + self.container().metaClassName() +
',' + rootModel.metaClassName() + ')', self) when true;
}endif;
}
I just want to return or at least leave the outer if after the casting.
How do I achieve this? The editor gives me the following error:
Using ''return'' from mapping operation is not yet supported
best regards,
Gilbert