[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.modeling.mdt.uml2.ocl] Re: How to change the error message?
|
Hi, Andreas,
No, those messages aren't very useful. I can imagine a number of ways of
customizing the error message, including but not limited to:
- adding another detail to the constraint annotation in the Ecore model
- looking up a string in a properties file, keyed by the constraint ID
(would support localization)
The codegen example in my article is just that: an example. Specifying
error messages wasn't its purpose (only specifying constraints). Of
course, you are free to extend the example to address any concerns that it
doesn't :-)
Cheers,
Christian
Andreas Werner wrote:
> Hi,
>
> is there another way to change the content of an error message (if an
> OCL constraint is violated) than modifying the Jet templates?
> The default messages are not really convenient for end users, are they?
>
> Perhaps something like an Annotation in the EMF model?
>
> Thanks, Andreas