[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.ocl] Re: OCLExpressions

Hi Ed,

Please find my answers in-line..

Thanks,

Ed Willink wrote:

Hi Mary

You should ask this question on the M2M newsgroup with a [QVTo] subject prefix.

Actually I did ask in the M2M newsgroup and they provided help but then i had this question about OCL and i thought its better to ask it here.



What you are doing does not seem to make sense. OCL is built-in to all the QVT languages so you do not have to construct OCL expressions from their AST elements. You appear to be working at what seems like two extra levels of encoding.

I would have thought that

if (self.name=Class1) then 'true'.dump() else 'false'.dump() endif

would have met your requirements.

Actually you are right.. this would meet my requirement. However, my problem is that the expression inside the if statement is not static. It should depend on an elemnet in the user model. So, i need to read this element from the user model and then test it. Thats why i had to build the OCL expression !


	Regards
	Ed Willink