Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [OCLinEcore] Validation of OCL constraints
[OCLinEcore] Validation of OCL constraints [message #1008654] Wed, 13 February 2013 12:44 Go to next message
Cedric Moonen is currently offline Cedric MoonenFriend
Messages: 274
Registered: August 2009
Senior Member
Hello,

I am creating some OCL validation rules on my meta-model using OCLinEcore. I followed what is described on this page but the @extends annotation described there doesn't do exactly what it is "supposed" to do: it doesn't make the generated class extend OCLinEcoreEObjectValidator but instead it makes implement it (although it is a class and not an interface), which ends up in a compilation error (you have to manual correct the file to fix the problem at each generation of the model code).

Additionally, I was trying to have custom error messages when my OCL rule fails and followed the syntax described here. This works fine, since my custom message is displayed but the error is now a warning. Is this normal ?
On a side note, I am using GMF to create instances of my domain model.

Thanks.
Re: [OCLinEcore] Validation of OCL constraints [message #1008662 is a reply to message #1008654] Wed, 13 February 2013 13:43 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

[Please use the OCL newsgroup for OCL discussions.]

Thanks for pointing out the @extends problem. I forgot the subtle
dufference here for "@generated NOT" and "@generated not". See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=338507.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=400683 raised to correct
the example and documentation.

See
http://help.eclipse.org/juno/topic/org.eclipse.ocl.doc/help/CompleteOCLTutorial.html?cp=46_3_2_3_5#custommessages
for details on message severity.

Regards

Ed Willink

On 13/02/2013 12:44, Cedric Moonen wrote:
> Hello,
>
> I am creating some OCL validation rules on my meta-model using
> OCLinEcore. I followed what is described on
> http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.ocl.doc%2Fhelp%2FPivotProgrammersGuide.html&anchor=OCLinEcoreEObjectValidator
> but the @extends annotation described there doesn't do exactly what it
> is "supposed" to do: it doesn't make the generated class extend
> OCLinEcoreEObjectValidator but instead it makes implement it (although
> it is a class and not an interface), which ends up in a compilation
> error (you have to manual correct the file to fix the problem at each
> generation of the model code).
>
> Additionally, I was trying to have custom error messages when my OCL
> rule fails and followed the syntax described
> http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.ocl.doc%2Fhelp%2FIntegration.html&cp=42_1_7_1&anchor=Integration-Messages..
> This works fine, since my custom message is displayed but the error is
> now a warning. Is this normal ?
> On a side note, I am using GMF to create instances of my domain model.
>
> Thanks.
Previous Topic:[Texo] Charset conversion errors inside xpt and xtend files
Next Topic:Texo: Auditing feature
Goto Forum:
  


Current Time: Thu Apr 25 20:00:43 GMT 2024

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

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

Back to the top