Skip to main content



      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
Eclipse UserFriend
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 UserFriend
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: Tue Jul 22 01:52:25 EDT 2025

Powered by FUDForum. Page generated in 0.03033 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top