Author: scabanovich
Date: 2011-05-31 17:58:57 -0400 (Tue, 31 May 2011)
New Revision: 31701
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
Log:
JBIDE-9028
https://issues.jboss.org/browse/JBIDE-9028
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2011-05-31
21:57:37 UTC (rev 31700)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2011-05-31
21:58:57 UTC (rev 31701)
@@ -29,6 +29,7 @@
public void initializeDefaultPreferences() {
IEclipsePreferences defaultPreferences = ((IScopeContext) new
DefaultScope()).getNode(CDICorePlugin.PLUGIN_ID);
defaultPreferences.putBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
+ defaultPreferences.put(SeverityPreferences.WRONG_BUILDER_ORDER_PREFERENCE_NAME,
CDIPreferences.ERROR);
for (String name : CDIPreferences.SEVERITY_OPTION_NAMES) {
defaultPreferences.put(name, SeverityPreferences.ERROR);
}
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java 2011-05-31
21:57:37 UTC (rev 31700)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java 2011-05-31
21:58:57 UTC (rev 31701)
@@ -305,4 +305,5 @@
public static int getMaxNumberOfProblemMarkersPerFile(IProject project) {
return INSTANCE.getMaxNumberOfProblemMarkersPerResource(project);
}
+
}
\ No newline at end of file
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-05-31
21:57:37 UTC (rev 31700)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-05-31
21:58:57 UTC (rev 31701)
@@ -171,13 +171,21 @@
*/
public boolean shouldValidate(IProject project) {
try {
- return project != null && project.isAccessible() &&
project.hasNature(CDICoreNature.NATURE_ID) && isEnabled(project);
+ return project != null
+ && project.isAccessible()
+ && project.hasNature(CDICoreNature.NATURE_ID)
+ && validateBuilderOrder(project)
+ && isEnabled(project);
} catch (CoreException e) {
CDICorePlugin.getDefault().logError(e);
}
return false;
}
+ private boolean validateBuilderOrder(IProject project) throws CoreException {
+ return ValidatorManager.validateBuilderOrder(project, getBuilderId(), getId(),
CDIPreferences.getInstance());
+ }
+
/*
* (non-Javadoc)
* @see
org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#init(org.eclipse.core.resources.IProject,
org.jboss.tools.jst.web.kb.internal.validation.ContextValidationHelper,
org.jboss.tools.jst.web.kb.validation.IProjectValidationContext,
org.eclipse.wst.validation.internal.provisional.core.IValidator,
org.eclipse.wst.validation.internal.provisional.core.IReporter)