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

So, the def-expression is no query and createQuery(String expression) does not work. Instead, I have to use OCLHelper.defineAttribute(String defExpression), right?
The problem is that I can't find any examples of using the OCL API in the right way to handle different cases of expressions (queries and def-expression) that I have in my transformation rules.
Could anyone please provide a snippet how to do that or point me to some example that demonstrates how to do it?


Thanks a lot

Joel

Joel Greenyer wrote:
Hi,
I'm confused whether or how the "def:" expression is supported. My intuition is that I e.g. type


def: s: String = 'Hello'

in the console and that I can use the variable s when evaluating subsequent expressions. However, that doesn't seem to work.

What am I missing?

Joel