Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » check syntax of OCL query
check syntax of OCL query [message #636710] Tue, 02 November 2010 14:20 Go to next message
Carlos  is currently offline Carlos Friend
Messages: 6
Registered: November 2010
Junior Member
Hello.

I want to check the syntax of an OCL query, before its execution:

// Build the select query statement
SELECT statement = new SELECT(SELECT.UNBOUNDED, false,
new FROM(context), new WHERE(condition), monitor);


where "condition" has the type: "BooleanOCLCondition".

I need to check the syntax before because I get empty results with wrong expressions, and I would like to make the distinction between empty result by one right OCL expression, and empty result by an OCL expression with wrong syntax.

Have you got any suggestion?

Thanks in advance.
Best regards.
Carlos.



Re: check syntax of OCL query [message #636790 is a reply to message #636710] Tue, 02 November 2010 19:04 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Carlos

OCL has no 'new' capability. I suspect you are using perhaps EMF Query.
try the EMFT newsgroup.

However if you formulate the problems as OCL, you can do syntax (but
only partial semantic) checking with the OCLinEcore editor. Of course
you can use the Interactive OCL Console to practice OCL queries on models.

Regards

Ed Willink

On 02/11/2010 14:20, Carlos wrote:
> Hello.
>
> I want to check the syntax of an OCL query, before its execution:
>
> // Build the select query statement
> SELECT statement = new SELECT(SELECT.UNBOUNDED, false,
> new FROM(context), new WHERE(condition), monitor);
>
>
> where "condition" has the type: "BooleanOCLCondition".
>
> I need to check the syntax before because I get empty results with wrong
> expressions, and I would like to make the distinction between empty
> result by one right OCL expression, and empty result by an OCL
> expression with wrong syntax.
>
> Have you got any suggestion?
>
> Thanks in advance.
> Best regards.
> Carlos.
>
>
>
>
Previous Topic:Loop on all nodes to check if they are all connected together
Next Topic:Design pattern creation through ocl
Goto Forum:
  


Current Time: Fri Apr 26 09:22:23 GMT 2024

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

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

Back to the top