Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » PivotEObjectValidator with existing validator
PivotEObjectValidator with existing validator [message #1371263] Wed, 21 May 2014 09:39 Go to next message
Dominique Marcadet is currently offline Dominique MarcadetFriend
Messages: 18
Registered: January 2013
Junior Member
Hi,

I need to augment with OCL the validator generated by EMF from regex in my XMLSchema, I am using CompleteOCLEObjectValidator.
The PivotEObjectValidator is said to take care of this existing evaluator.

In this class, the validate(EDataType, Object, ...) method takes care of this existing evaluator, but this is not the case for validate(EClass, EObject, ...) method which only calls validatePivot().
Therefore, the EObjectValidator.validate_EveryDefaultConstraint() method is not called, and in turn, my regex are not checked.

I'm using OCL Pivot 3.3.2 in Kepler.
Is this expected behavior ?

Regards,
Dominique

Re: PivotEObjectValidator with existing validator [message #1371460 is a reply to message #1371263] Wed, 21 May 2014 11:33 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7670
Registered: July 2009
Senior Member
Hi

It doesn't sound right. Your use case seems like exactly what is
intended to work.

The number of different validate(...) methods in EValidator and derived
classes makes it almost impossible to understand this without an
executable example.

Quite a few improvements have occurred while getting UML support to be
more comprehensive for Luna. You could try installing the latest Luna
N-build which is installable on Kepler. You might need to upgrade to
Xtext 2.6 too if the editor refuses to start.

http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/ocl/downloads/drops/5.0.0/N201405210640/mdt-ocl-Update-N201405210640.zip

http://www.eclipse.org/modeling/download.php?file=/modeling/tmf/xtext/downloads/drops/2.6.0/N201405200756/tmf-xtext-Update-N201405200756.zip

Regards

Ed Willink

On 21/05/2014 10:39, Dominique Marcadet wrote:
> Hi,
>
> I need to augment with OCL the validator generated by EMF from regex
> in my XMLSchema, I am using CompleteOCLEObjectValidator.
> The PivotEObjectValidator is said to take care of this existing
> evaluator.
>
> In this class, the validate(EDataType, Object, ...) method takes care
> of this existing evaluator, but this is not the case for
> validate(EClass, EObject, ...) method which only calls validatePivot().
> Therefore, the EObjectValidator.validate_EveryDefaultConstraint()
> method is not called, and in turn, my regex are not checked.
>
> I'm using OCL Pivot 3.3.2 in Kepler.
> Is this expected behavior ?
>
> Regards,
> Dominique
>
>
Re: PivotEObjectValidator with existing validator [message #1371908 is a reply to message #1371460] Wed, 21 May 2014 15:42 Go to previous message
Dominique Marcadet is currently offline Dominique MarcadetFriend
Messages: 18
Registered: January 2013
Junior Member
Hi,

I've done a small project that exhibit the problem in Kepler, and it works after updating OCL and XText with your links. I think the reason is in the change in PivotEObjectValidator.install(EPackage) which uses now a ComposedEValidator.

Thanks,
Dominique

Ed Willink wrote on Wed, 21 May 2014 07:33
Hi

It doesn't sound right. Your use case seems like exactly what is
intended to work.

The number of different validate(...) methods in EValidator and derived
classes makes it almost impossible to understand this without an
executable example.

Quite a few improvements have occurred while getting UML support to be
more comprehensive for Luna. You could try installing the latest Luna
N-build which is installable on Kepler. You might need to upgrade to
Xtext 2.6 too if the editor refuses to start.

http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/ocl/downloads/drops/5.0.0/N201405210640/mdt-ocl-Update-N201405210640.zip

http://www.eclipse.org/modeling/download.php?file=/modeling/tmf/xtext/downloads/drops/2.6.0/N201405200756/tmf-xtext-Update-N201405200756.zip

Regards

Ed Willink

On 21/05/2014 10:39, Dominique Marcadet wrote:
> Hi,
>
> I need to augment with OCL the validator generated by EMF from regex
> in my XMLSchema, I am using CompleteOCLEObjectValidator.
> The PivotEObjectValidator is said to take care of this existing
> evaluator.
>
> In this class, the validate(EDataType, Object, ...) method takes care
> of this existing evaluator, but this is not the case for
> validate(EClass, EObject, ...) method which only calls validatePivot().
> Therefore, the EObjectValidator.validate_EveryDefaultConstraint()
> method is not called, and in turn, my regex are not checked.
>
> I'm using OCL Pivot 3.3.2 in Kepler.
> Is this expected behavior ?
>
> Regards,
> Dominique
>
>

Previous Topic:EssentialOCL->Pivot->Ecore conversion
Next Topic:EssentialOCL creation, loading and parsing
Goto Forum:
  


Current Time: Mon Sep 23 19:49:51 GMT 2024

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

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

Back to the top