I am using EMF validation framework and need to validate two variables in the same validator class. I am not able to set 2 error messages in the IValidationContext object i.e.,
I tried:
IValidationContext ctx;
ctx.createFailureMessage(new String[]{a,b});
This did not work. I also tried setting a list of IStatus in ctx.createFailureMessage(). This also doesn’t work.
Is it not possible to add multiple failure messages in the same validation context?
You need to return a
MultiStatuscontaining all the status messages in thecreateFailureStatusmethod