Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » ITraversalStrategy breaking 'validation.constraintBindings' ?
ITraversalStrategy breaking 'validation.constraintBindings' ? [message #567038] Wed, 15 February 2006 17:38
Radomil Dvorak is currently offline Radomil DvorakFriend
Messages: 249
Registered: July 2009
Senior Member
Hi,



I have a usecase declaring constraints targeted to a particular EClass but
requiring additional target refinement

based on the EObject instance state. In other words, not every instance of
that type is the appropriate target.



I have tried to use 'validation.constraintBindings' extension point to

define a <clientContext> with <enablement> or custom <selector> enforcing my
specific condition.

This works, but only partly.



It stops working in case I declare multiple constraints bound in different
client contexts and

these constraints are targeted on EClasses whose instances are in the same
validated sub-tree.

The reason is that the default strategy used by IBatchValidator assumes that
only the root elements of the traversal

may be in different client contexts.



I have found all this clearly described in ITraversalStrategy interface and
I understand the reasons for introducing

these 'optimistic' strategies. What only confused me a bit was that my
EObject was checked

during the validation step but no applicable constraints were found.



Of course, I can provide my own 'pessimistic' strategy and everything works
fine, just with the cost of frequent

re-computing of the client context.

But I still have a feeling that this is not the right solution.



Is there any better way how to achieve this?



Regards,

/Radek
Previous Topic:Definition of OCL-Queries
Next Topic:Using the OCL parser
Goto Forum:
  


Current Time: Thu Oct 06 19:46:48 GMT 2022

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

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

Back to the top