我正在使用 EMF 验证框架,需要验证同一验证器类中的两个变量。我无法在 IValidationContext 对象中设置 2 条错误消息,即 我尝试过:
IValidationContext ctx;
ctx.createFailureMessage(new String[]{a,b});
这不起作用。我还尝试在 ctx.createFailureMessage() 中设置
这也不起作用。IStatus
列表。
是否无法在同一验证上下文中添加多个失败消息?
最佳答案
您需要在createFailureStatus
方法中返回一个包含所有状态消息的MultiStatus
关于eclipse - 无法在 IValidationContext Eclipse EMF 中设置多个 IStatus 消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11535053/