Author: vrubezhny
Date: 2012-08-13 15:09:17 -0400 (Mon, 13 Aug 2012)
New Revision: 43004
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java
Log:
JBIDE-10611
As-you-type CDI validation
Number of Java Element validation calls is reduced (because when at least one String is
validated, according Java Element is automatically validated as well)
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java 2012-08-13
17:21:34 UTC (rev 43003)
+++
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java 2012-08-13
19:09:17 UTC (rev 43004)
@@ -427,9 +427,11 @@
fValidatorManager.validateString(
Arrays.asList(fPartitionsToProcess.toArray(new
IRegion[fPartitionsToProcess.size()])),
fHelper, fReporter);
- }
-
- if (isJavaElementValidationRequired()) {
+ } else if (isJavaElementValidationRequired()) {
+ // The 'else' is added here due to not to validate
+ // an element in case of at lease one string is validated,
+ // because the string validation performs the validation of an element
+ // as well
fReporter.clearAlwaysRemoveAnnotations();
fValidatorManager.validateJavaElement(
Arrays.asList(
Show replies by date