[jbosstools-commits] JBoss Tools SVN: r44126 - trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Fri Sep 28 17:06:25 EDT 2012
Author: dazarov
Date: 2012-09-28 17:06:25 -0400 (Fri, 28 Sep 2012)
New Revision: 44126
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationContext.java
Log:
Configure Problem Severity should open project settings if they are enabled for the project https://issues.jboss.org/browse/JBIDE-12538
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationContext.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationContext.java 2012-09-28 20:38:00 UTC (rev 44125)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationContext.java 2012-09-28 21:06:25 UTC (rev 44126)
@@ -74,10 +74,6 @@
}
private static IValidator createValidator(IConfigurationElement element, String problemType){
- if(problemType == null){
- CommonPlugin.getDefault().logError("problem type must be not null");
- return null;
- }
try {
IValidator validator = (IValidator)element.createExecutableExtension("class"); //$NON-NLS-1$
validator.setProblemType(problemType);
@@ -99,14 +95,19 @@
List<IValidator> dependentValidators = new ArrayList<IValidator>();
List<IValidator> allValidators = new ArrayList<IValidator>();
for (IConfigurationElement element : ALL_VALIDATORS) {
- IValidator validator = createValidator(element, element.getAttribute("problemType"));
- if(validator != null){
- String dependent = element.getAttribute("dependent"); //$NON-NLS-1$
- if(Boolean.parseBoolean(dependent)) {
- dependentValidators.add(validator);
- } else {
- allValidators.add(validator);
+ String problemType = element.getAttribute("problemType");
+ if(problemType != null){
+ IValidator validator = createValidator(element, problemType);
+ if(validator != null){
+ String dependent = element.getAttribute("dependent"); //$NON-NLS-1$
+ if(Boolean.parseBoolean(dependent)) {
+ dependentValidators.add(validator);
+ } else {
+ allValidators.add(validator);
+ }
}
+ }else{
+ CommonPlugin.getDefault().logError("problemType did not found for validator: "+element.getAttribute("class")+" problemType must be set");
}
}
// We should add all the dependent validators (e.g. EL validator) to the very end of the list.
More information about the jbosstools-commits
mailing list