Community
Participate
Working Groups
Same issue exists in 3.2 as in 3.0.5 +++ This bug was initially created as a clone of Bug #320322 +++ Even if he JSP Content Validator and JSP Syntax Validator (both batch validators) are turned off using the Validation preferences page the source validators that those batch validators use are still run as you type. The problem here is a disconnect between batch validators and source validators and the enablement of the batch validators. The ValiatorStrategy checks for the enablement of the batch validators to determine which source validators are enabled but because there is currently no relation between the JSP batch validators and the source validators the ValidatorStrategy never sees the JSP source validators as disabled. The fix for this problem is two fold. First use the existing "sourceid" filed on the batch validator extension point to list all of the source validators related to a given batch validator. In the case of JSP the relations are as follows: JSPBatchValidator: * JSPDirectiveValidator - org.eclipse.jst.jsp.tldsourcevalidator * JSPELValidator - org.eclipse.jst.jsp.jspelsourcevalidator * JSPJavaValidator - org.eclipse.jst.jsp.jspsourcevalidator * JSPActionValidator - org.eclipse.jst.jsp.ui.internal.validation.jspactionvalidator JSPContentValidator: * JSPMarkupValidator - org.eclipse.jst.jsp.ui.internal.validation.markupvalidator * JSPContentSourceValidator - org.eclipse.jst.jsp.ui.internal.validation.htmlsyntaxvalidator * * this is actually a special case because strictly speeking the JSPContentValidator batch validator does not use the JSPContentSourceValidator but the JSPContentSourceValidator is itself checking the enablement of the JSPContentValidator batch validator to determine if its enabled thus establishment a pre-existing relationship between this source validator and this batch validator. The problem with the existing implementation of the relationship is that the JSPContentSourceValidator only checks the enablement of the JSPContentValidator batch validator on document connect which means if the enablement of the JSPContentValidator batch validator changes while a JSP document is open the JSPContentSourceValidator will stay enabled. Thus adding this relationship will ensure the JSPContentSourceValidator never runs if the JSPContentValidator batch validator is disabled. The second fix that is needed is to update ValidatorStrategy to read the "sourceid" field of the batch validators as a comma separated value rather then as a single ID so that multiple source validators can be related to a single batch validator. This is simply done using existing utility methods. Patch to follow.
Created attachment 174675 [details] Fix Patch Fix patch for 3.2.x stream
*** Bug 320324 has been marked as a duplicate of this bug. ***
Looks good. Thanks.