[jbosstools-dev] Question about Common Validation

Xavier Coulon xcoulon at redhat.com
Tue Sep 25 03:52:06 EDT 2012


Hi Alexey,

Yes, I use the ValidationErrorManager.addProblem(..) methods and I remove the existing markers when running a new validation on a resource. 
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...

Thanks.

Best regards, 
/Xavier



On Sep 24, 2012, at 10:43 PM, Alexey Kazakov wrote:

> Hi,
> 
> 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)
> 
> We use these methods in our CDI validator.
> 
> 
> On 09/24/2012 12:26 PM, Xavier Coulon wrote:
>> Hello Alexey,
>> 
>> I have another question common-validation that I use for the JAX-RS tooling. This is in relation with https://issues.jboss.org/browse/JBIDE-12595 ("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.
>> 
>> 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 ?
>> Or, how do you handle that case in the CDI tooling ?
>> 
>> 
>> Thanks
>> Best regards,
>> /Xavier
>> 
>> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jbosstools-dev/attachments/20120925/e9855706/attachment.html 


More information about the jbosstools-dev mailing list