Skip to main content



      Home
Home » Modeling » OCL » check syntax of OCL query
check syntax of OCL query [message #636710] Tue, 02 November 2010 10:20 Go to next message
Eclipse UserFriend
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 15:04 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 01:36:46 EDT 2025

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

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

Back to the top