Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » EMF validation with several OCL documents
EMF validation with several OCL documents [message #1721742] Fri, 29 January 2016 16:38 Go to next message
Dominique Marcadet is currently offline Dominique MarcadetFriend
Messages: 9
Registered: January 2013
Junior Member
Hi,

I need to programmatically validate some EMF data with several OCL files. I am using Eclipse Mars.

I use a CompleteOCLEObjectValidator for each OCL document, they are added to a ComposedEValidator which is the main validator.

When there is only one OCL document, it is OK.
When there are several OCL documents, some or all constraints are checked several times, therefore identical diagnostics messages are printed several times.

I've done a small project which exhibit this unwanted behavior, it is attached. main is in library.ocl.CompleteOCLTest.java

Is there something that I have done wrong ?

Regards,
Dominique Marcadet
Re: EMF validation with several OCL documents [message #1721762 is a reply to message #1721742] Fri, 29 January 2016 21:44 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 5422
Registered: July 2009
Senior Member
Hi

Thank you. Excellent repro. Saves so much time.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=486872

Workaround: create tests.ocl

import 'test1.ocl'
import 'test2.ocl'

and use tests.ocl for your validation instead.

Regards

Ed Willink


On 29/01/2016 16:38, Dominique Marcadet wrote:
> Hi,
>
> I need to programmatically validate some EMF data with several OCL files. I am using Eclipse Mars.
>
> I use a CompleteOCLEObjectValidator for each OCL document, they are added to a ComposedEValidator which is the main validator.
>
> When there is only one OCL document, it is OK.
> When there are several OCL documents, some or all constraints are checked several times, therefore identical diagnostics messages are printed several times.
>
> I've done a small project which exhibit this unwanted behavior, it is attached. main is in library.ocl.CompleteOCLTest.java
>
> Is there something that I have done wrong ?
>
> Regards,
> Dominique Marcadet
>
Previous Topic:Customized Helper Methods in EmbeddedXtextEditor
Next Topic:Parsing error in a UML::Constraint
Goto Forum:
  


Current Time: Wed Oct 18 04:02:21 GMT 2017

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

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