|Re: [OCLinEcore] Generating OCLinEcoreEObjectValidator supertype for the validator [message #1031120 is a reply to message #1029161]
||Mon, 01 April 2013 03:51
| Ed Willink
Registered: July 2009
I don't think there is an easy solution.
Ideally the validation API would be extended to support custom messages
making the use of OCLinEcoreEObjectValidator redundant. Unfortunately
https://bugs.eclipse.org/bugs/show_bug.cgi?id=337792 is not progressing.
Even better the whole EValidator API might be generalized to support
customization in the same way as all the other EMF registries. Any
It would be possible to add a GenModel annotation to specify the
EValidator base; just needs coding and acceptance that yet another
GenModel option is necessary.
You could use a custom JET script, which may become a major maintenance
nightmare when the standard EMF scripts evolve.
You could write a custom script (one sed command) to zap the generated
Or you just live with the manually inserted @extends/@generated not.
Or, just an idea, you have a custom validator that extends/delegates to
the auto-generated functionality and adds the missing
On 29/03/2013 08:35, Cedric Moonen wrote:
> Currently, if we want to make use of custom messages or custom
> severity levels for OCL constraints, we have to change the generated
> code for our XXXXValidator class: it should extend
> OCLinEcoreEObjectValidator and not EObjectValidator.
> I was wondering if there is a way to somehow specify that in the model
> (ecore model or genmodel file) in any way (annotations or properties) ?
> The reason is that we would like to avoid having to version generated
Powered by FUDForum
. Page generated in 0.01598 seconds