Custom EvlValidator support [message #1105802] |
Tue, 10 September 2013 09:42 |
Maarten Bezemer Messages: 117 Registered: February 2012 |
Senior Member |
|
|
Hello,
As you might know I am trying to get rid of my customizations of the EvlValidator class.
Last thing that is customized is to support caching of the validation results, preventing revalidating the complete model when a single model element needs to be validated. This speeds up live validation considerable.
My solution is not very stable yet, I suppose, so I'll not try to get it included (further). Unless you guys are interested in this feature, of course.
Therefore, I was wonder whether it is possible to provide a custom EvlValidator (based) class, so one is able to modify the validation steps, without modifying the original plugin/class.
I could provide a patch to extend the extension point with an optional field which allows to provide a custom EvlValidator extending class. This can be used by EValidatorPopulator to optionally create this custom class instead of the default EvlValidator class.
Let me know, and I'll provide the patch.
Cheers,
Maarten
|
|
|
Re: Custom EvlValidator support [message #1106626 is a reply to message #1105802] |
Wed, 11 September 2013 10:44 |
|
I'm normally wary of caching, as it tends to be harder to get right than expected, increases memory usage and may introduce memory leaks and inconsistencies.
I wouldn't mind looking at a patch like the one you'd suggested, but I think it'd be much better to see why it is taking so long and speeding it up.
Perhaps we could try to support live validation for EVL: when object O of EClass C is changed, we could run all the validation rules for C and its superclasses on O. This could be enabled by users on the constraintsBinding extension, for instance. Wouldn't that be better than caching?
|
|
|
|
Re: Custom EvlValidator support [message #1106807 is a reply to message #1106637] |
Wed, 11 September 2013 15:22 |
|
We would probably have to limit the scope of these rechecks, or there would be little point in adding these feature. I don't have time at the moment to work on this, but it'd be great if you could file an enhancement request for it.
As for the extension field for the custom EvlValidator class, it should be fine as long as it doesn't impact current users or the current design too much. Feel free to submit a patch and we'll have a look at it .
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01970 seconds