Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsEMF Live Validation
https://www.eclipse.org/forums/index.php/mv/msg/1088545/1771689/#msg_1771689
I am using Library Validation General example for the reference to develope validation plug-in to my model.
I have already added one constraint (as per the example) . It works for the batch validation (as it gives an message to wrong attribute values as per the constraint).
For live validation, it does notify the changes and also determines the client context but does not finds the constraints binding to the clientContext.
I only have one client context.
What could be the problem ?]]>Kunal Chandmare2017-08-29T14:16:49-00:00Re: EMF Live Validation
https://www.eclipse.org/forums/index.php/mv/msg/1088545/1772089/#msg_1772089
Did you specify mode="Live" in your <constraintProvider> in the extension XML? Note that live constraints are also included in batch validation.
With this, you can further refine the triggering of your constraint with <event> and <customEvent> elements in the <target> specifications of your constraint provider.
HTH,
Christian]]>Christian Damus2017-09-05T12:15:21-00:00Re: EMF Live Validation
https://www.eclipse.org/forums/index.php/mv/msg/1088545/1773735/#msg_1773735
Felix Dorner2017-10-03T20:03:04-00:00Re: EMF Live Validation
https://www.eclipse.org/forums/index.php/mv/msg/1088545/1773736/#msg_1773736
Yes, the idea was that batch validation shouldn't miss out any rules and the developer shouldn't have to repeat herself. The triggering event business for live validation was meant primarily to let the system find and evaluate only rules relevant to a particular edit. There are probably many better ways to do this that we've learned in the intervening fifteen years or however long it's been. In any case, the constraint is expected to understand that when there's no event, then it's running in the batch context. Of course, if it's specified in OCL or some other more abstract language, then it's a moot point.