<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Alexey,<div><br></div><div>Yes, I use the ValidationErrorManager.addProblem(..) methods and I remove the existing markers when running a new validation on a resource. </div><div>But my question was: how can I hook into the validation "disablement" to remove all existing markers at the same time ? Because for now, after validation has been disabled, the markers are still in place and there's only one way to remove them: manually...</div><div><br></div><div>Thanks.</div><div><br></div><div>Best regards, </div><div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">/Xavier<br><br><br></span>
</div>
<br><div><div>On Sep 24, 2012, at 10:43 PM, Alexey Kazakov wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,<br><br>It depends on how you create problem markers. If you create markers using ValidationErrorManager.addError(...) then you have to remove the markers before validating the resource. You can use ValidationErrorManager.removeAllMessagesFromResource(IResource)<br><br>We use these methods in our CDI validator.<br><br><br>On 09/24/2012 12:26 PM, Xavier Coulon wrote:<br><blockquote type="cite">Hello Alexey,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I have another question common-validation that I use for the JAX-RS tooling. This is in relation with <a href="https://issues.jboss.org/browse/JBIDE-12595">https://issues.jboss.org/browse/JBIDE-12595</a> ("Disabling JAX-RS validator doesn't affect resources validation"). As Jaroslav reported, when a user disables the JAX-RS validation, the problem markers (which are now persistent) are not removed, which is not the expected behavior. The only way to remove them is to delete them from the "Problems" view.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">When validation is disabled, is there any call to a method that I could override to remove the JAX-RS problem markers on all the resources of the project ?<br></blockquote><blockquote type="cite">Or, how do you handle that case in the CDI tooling ?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks<br></blockquote><blockquote type="cite">Best regards,<br></blockquote><blockquote type="cite">/Xavier<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><br></div></blockquote></div><br></div></body></html>