Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Adding variable-value bindings to queries
Adding variable-value bindings to queries [message #42099] Wed, 31 October 2007 05:06 Go to next message
adotor is currently offline adotor
Messages: 46
Registered: July 2009
Member
Hello,

is it possible to add variable-value-pairs to a query before it is parsed?

The idea is that I want to use other bound variables than 'self' in my
OCL expression. I want to reference existing objects directly. In OCL
this would have been solved by a let-expression. I don't want to use the
let-expression and OCL do the binding but I want to directly assign it
(maybe by some environment?).

Is this possible and if it is, how do I achieve this?

Cheers,
Alexander Dotor
Re: Adding variable-value bindings to queries [message #42198 is a reply to message #42099] Wed, 31 October 2007 08:38 Go to previous message
Eclipse User
Originally posted by: cdamus.ca.ibm.com

Hi, Alexander,

Yes, you can inject variables into your OCL parsing and evaluation
environment. Have a look at the

OCL Developer Guide
Programmer's Guide
Advanced Topics
Customizing the Environment

topic in the SDK documentation (Eclipse Help viewer). The first heading
"Defining Global Variables" is what you need.

HTH,

Christian


Alexander Dotor wrote:

> Hello,
>
> is it possible to add variable-value-pairs to a query before it is parsed?
>
> The idea is that I want to use other bound variables than 'self' in my
> OCL expression. I want to reference existing objects directly. In OCL
> this would have been solved by a let-expression. I don't want to use the
> let-expression and OCL do the binding but I want to directly assign it
> (maybe by some environment?).
>
> Is this possible and if it is, how do I achieve this?
>
> Cheers,
> Alexander Dotor
Previous Topic:setContext doesn't find RuleAction
Next Topic:automatic code generation
Goto Forum:
  


Current Time: Sat Aug 30 08:27:52 EDT 2014

Powered by FUDForum. Page generated in 0.02001 seconds