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

Hi, Joel,

If the SDK documentation doesn't provide examples, then your best bet is to look into the JUnit tests.  Search for invocations of the OCLHelper methods in the org.eclipse.ocl.ecore.tests plug-in, for example.  They should all be covered, IIRC.

HTH,

Christian


On Wed, 2009-08-05 at 15:46 +0200, Joel Greenyer wrote:
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