Skip to main content


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 09:06 Go to next message
adotor is currently offline adotorFriend
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 12: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: Fri Apr 19 23:15:55 GMT 2024

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

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

Back to the top