[jbosstools-commits] JBoss Tools SVN: r44075 - in trunk: common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker and 10 other directories.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Wed Sep 26 20:26:42 EDT 2012
Author: dazarov
Date: 2012-09-26 20:26:37 -0400 (Wed, 26 Sep 2012)
New Revision: 44075
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityResolutionGenerator.java
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationErrorManager.java
trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/QuickFixTestUtil.java
trunk/common/tests/org.jboss.tools.common.validation.test/src/org/jboss/tools/common/validation/test/TestValidator.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/composite/CompositeComponentValidator.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/validation/StrutsCoreValidator.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/validation/JaxrsMetamodelValidator.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/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 2012-09-27 00:02:00 UTC (rev 44074)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2012-09-27 00:26:37 UTC (rev 44075)
@@ -2705,15 +2705,6 @@
}
}
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.common.validation.ValidationErrorManager#getPreferencePageId()
- */
- @Override
- protected String getPreferencePageId() {
- return PREFERENCE_PAGE_ID;
- }
-
private static final String BUNDLE_NAME = "org.jboss.tools.cdi.internal.core.validation.messages";
/*
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityResolutionGenerator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityResolutionGenerator.java 2012-09-27 00:02:00 UTC (rev 44074)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityResolutionGenerator.java 2012-09-27 00:26:37 UTC (rev 44075)
@@ -155,11 +155,6 @@
return null;
}
- private String getPreferencePageId(IMarker marker)throws CoreException{
- String attribute = marker.getAttribute(ValidationErrorManager.PREFERENCE_PAGE_ID_NAME, null);
- return attribute;
- }
-
private String getPreferenceKey(Annotation annotation){
if(annotation instanceof TemporaryAnnotation){
if(((TemporaryAnnotation)annotation).getAttributes() != null){
@@ -175,21 +170,6 @@
return null;
}
- private String getPreferencePageId(Annotation annotation){
- if(annotation instanceof TemporaryAnnotation){
- if(((TemporaryAnnotation)annotation).getAttributes() != null){
- String attribute = (String)((TemporaryAnnotation)annotation).getAttributes().get(ValidationErrorManager.PREFERENCE_PAGE_ID_NAME);
- return attribute;
- }
- }else if(annotation instanceof TempJavaProblemAnnotation){
- if(((TempJavaProblemAnnotation)annotation).getAttributes() != null){
- String attribute = (String)((TempJavaProblemAnnotation)annotation).getAttributes().get(ValidationErrorManager.PREFERENCE_PAGE_ID_NAME);
- return attribute;
- }
- }
- return null;
- }
-
@Override
public boolean hasProposals(Annotation annotation, Position position) {
String preferenceKey = getPreferenceKey(annotation);
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java 2012-09-27 00:02:00 UTC (rev 44074)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java 2012-09-27 00:26:37 UTC (rev 44075)
@@ -186,10 +186,8 @@
message.setAttribute(MESSAGE_ID_ATTRIBUTE_NAME, quickFixId);
}
messageCounter++;
- String preferencePageId = getPreferencePageId();
- if(preferencePageId != null && preferenceKey != null){
+ if(preferenceKey != null){
message.setAttribute(PREFERENCE_KEY_ATTRIBUTE_NAME, preferenceKey);
- message.setAttribute(PREFERENCE_PAGE_ID_NAME, preferencePageId);
}
String type = getMarkerType();
if(type!=null) {
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationErrorManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationErrorManager.java 2012-09-27 00:02:00 UTC (rev 44074)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationErrorManager.java 2012-09-27 00:26:37 UTC (rev 44075)
@@ -326,8 +326,6 @@
markers.clear();
}
- abstract protected String getPreferencePageId();
-
protected int getSeverity(String preferenceKey, IResource target) {
String preferenceValue = getPreference(target.getProject(), preferenceKey);
int severity = -1;
@@ -354,10 +352,8 @@
}
try {
if(marker!=null) {
- String preferencePageId = getPreferencePageId();
- if(preferencePageId != null && preferenceKey != null){
+ if(preferenceKey != null){
marker.setAttribute(PREFERENCE_KEY_ATTRIBUTE_NAME, preferenceKey);
- marker.setAttribute(PREFERENCE_PAGE_ID_NAME, preferencePageId);
}
}
} catch(CoreException e) {
Modified: trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/QuickFixTestUtil.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/QuickFixTestUtil.java 2012-09-27 00:02:00 UTC (rev 44074)
+++ trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/QuickFixTestUtil.java 2012-09-27 00:26:37 UTC (rev 44075)
@@ -214,7 +214,6 @@
message.setAttribute(TempMarkerManager.AS_YOU_TYPE_VALIDATION_ANNOTATION_ATTRIBUTE, Boolean.TRUE);
message.setAttribute(TempMarkerManager.MESSAGE_ID_ATTRIBUTE_NAME, quickFixId);
message.setAttribute(TempMarkerManager.PREFERENCE_KEY_ATTRIBUTE_NAME, "preferenceKey");
- message.setAttribute(TempMarkerManager.PREFERENCE_PAGE_ID_NAME, "pref_page_id");
message.setAttribute(TempMarkerManager.MESSAGE_TYPE_ATTRIBUTE_NAME, problemType);
TempJavaProblem problem = new TempJavaProblem(message, "origin");
@@ -228,7 +227,6 @@
attributes.put(TempMarkerManager.AS_YOU_TYPE_VALIDATION_ANNOTATION_ATTRIBUTE, Boolean.TRUE);
attributes.put(TempMarkerManager.MESSAGE_ID_ATTRIBUTE_NAME, quickFixId);
attributes.put(TempMarkerManager.PREFERENCE_KEY_ATTRIBUTE_NAME, "preferenceKey");
- attributes.put(TempMarkerManager.PREFERENCE_PAGE_ID_NAME, "pref_page_id");
attributes.put(TempMarkerManager.MESSAGE_TYPE_ATTRIBUTE_NAME, problemType);
annotation.setAttributes(attributes);
Modified: trunk/common/tests/org.jboss.tools.common.validation.test/src/org/jboss/tools/common/validation/test/TestValidator.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.validation.test/src/org/jboss/tools/common/validation/test/TestValidator.java 2012-09-27 00:02:00 UTC (rev 44074)
+++ trunk/common/tests/org.jboss.tools.common.validation.test/src/org/jboss/tools/common/validation/test/TestValidator.java 2012-09-27 00:26:37 UTC (rev 44075)
@@ -102,11 +102,6 @@
}
@Override
- protected String getPreferencePageId() {
- return null;
- }
-
- @Override
protected void registerPreferenceInfo() {
// TODO Auto-generated method stub
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java 2012-09-27 00:02:00 UTC (rev 44074)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java 2012-09-27 00:26:37 UTC (rev 44075)
@@ -356,11 +356,6 @@
return JSFSeverityPreferences.isValidationEnabled(project);
}
- @Override
- protected String getPreferencePageId() {
- return PREFERENCE_PAGE_ID;
- }
-
private Set<IFile> collectFiles(IProject project, Set<IFile> changedFiles, IProjectValidationContext context) {
Set<IFile> files = new HashSet<IFile>();
if(context == null) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/composite/CompositeComponentValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/composite/CompositeComponentValidator.java 2012-09-27 00:02:00 UTC (rev 44074)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/composite/CompositeComponentValidator.java 2012-09-27 00:26:37 UTC (rev 44075)
@@ -383,15 +383,6 @@
/*
* (non-Javadoc)
- * @see org.jboss.tools.common.validation.ValidationErrorManager#getPreferencePageId()
- */
- @Override
- protected String getPreferencePageId() {
- return PREFERENCE_PAGE_ID;
- }
-
- /*
- * (non-Javadoc)
* @see org.jboss.tools.common.validation.TempMarkerManager#getMessageBundleName()
*/
@Override
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java 2012-09-27 00:02:00 UTC (rev 44074)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java 2012-09-27 00:26:37 UTC (rev 44075)
@@ -289,11 +289,6 @@
}
@Override
- protected String getPreferencePageId() {
- return PREFERENCE_PAGE_ID;
- }
-
- @Override
protected void registerPreferenceInfo() {
if(PreferenceInfoManager.getPreferenceInfo(PROBLEM_TYPE) == null){
PreferenceInfoManager.register(PROBLEM_TYPE, new WebXMLPreferenceInfo());
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java 2012-09-27 00:02:00 UTC (rev 44074)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java 2012-09-27 00:26:37 UTC (rev 44075)
@@ -38,7 +38,6 @@
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
import org.eclipse.wst.validation.internal.provisional.core.IValidator;
-import org.jboss.tools.common.CommonPlugin;
import org.jboss.tools.common.EclipseUtil;
import org.jboss.tools.common.el.core.ELReference;
import org.jboss.tools.common.el.core.model.ELExpression;
@@ -661,15 +660,6 @@
return true;
}
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.common.validation.ValidationErrorManager#getPreferencePageId()
- */
- @Override
- protected String getPreferencePageId() {
- return PREFERENCE_PAGE_ID;
- }
-
private static final String BUNDLE_NAME = "org.jboss.tools.jst.web.kb.internal.validation.messages";
/*
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java 2012-09-27 00:02:00 UTC (rev 44074)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java 2012-09-27 00:26:37 UTC (rev 44075)
@@ -40,9 +40,4 @@
public int getMaxNumberOfMarkersPerFile(IProject project) {
return SeamPreferences.getMaxNumberOfProblemMarkersPerFile(project);
}
-
- @Override
- protected String getPreferencePageId() {
- return PREFERENCE_PAGE_ID;
- }
}
\ No newline at end of file
Modified: trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/validation/StrutsCoreValidator.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/validation/StrutsCoreValidator.java 2012-09-27 00:02:00 UTC (rev 44074)
+++ trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/validation/StrutsCoreValidator.java 2012-09-27 00:26:37 UTC (rev 44075)
@@ -274,11 +274,6 @@
}
@Override
- protected String getPreferencePageId() {
- return PREFERENCE_PAGE_ID;
- }
-
- @Override
protected void registerPreferenceInfo() {
if(PreferenceInfoManager.getPreferenceInfo(PROBLEM_TYPE) == null){
PreferenceInfoManager.register(PROBLEM_TYPE, new StrutsPreferenceInfo());
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/validation/JaxrsMetamodelValidator.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/validation/JaxrsMetamodelValidator.java 2012-09-27 00:02:00 UTC (rev 44074)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/validation/JaxrsMetamodelValidator.java 2012-09-27 00:26:37 UTC (rev 44075)
@@ -272,12 +272,6 @@
return JaxrsPreferences.getInstance().getProjectPreference(project, preferenceKey);
}
- @Override
- protected String getPreferencePageId() {
- return PREFERENCE_PAGE_ID;
- }
-
- @Override
public int getMaxNumberOfMarkersPerFile(IProject project) {
return JaxrsPreferences.getMaxNumberOfProblemMarkersPerFile(project);
}
More information about the jbosstools-commits
mailing list