JBoss Tools SVN: r44108 - in trunk: cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation and 28 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-09-27 20:35:24 -0400 (Thu, 27 Sep 2012)
New Revision: 44108
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.xml
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CDIAnnotationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DisableCDISupportTest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeCDIAndELValidatorsMassagesProcessingTest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeInJavaSupressWarningsTest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeInJavaValidationTest.java
trunk/common/plugins/org.jboss.tools.common.validation/schema/validator.exsd
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/IValidator.java
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/PreferenceInfoManager.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/ValidationContext.java
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationErrorManager.java
trunk/common/tests/org.jboss.tools.common.validation.test/plugin.xml
trunk/common/tests/org.jboss.tools.common.validation.test/src/org/jboss/tools/common/validation/test/TestSynchronizationValidator.java
trunk/common/tests/org.jboss.tools.common.validation.test/src/org/jboss/tools/common/validation/test/TestValidator.java
trunk/esb/plugins/org.jboss.tools.esb.validator/plugin.xml
trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java
trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
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/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml
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/plugin.xml
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/plugin.xml
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/validation/TestValidator.java
trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebXMLValidationTest.java
trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamProjectPropertyValidator.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/validation/SeamProjectPropertyValidatorWrapper.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java
trunk/struts/plugins/org.jboss.tools.struts/plugin.xml
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/validation/StrutsCoreValidator.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/plugin.xml
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/plugin.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.xml 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/plugin.xml 2012-09-28 00:35:24 UTC (rev 44108)
@@ -157,8 +157,9 @@
point="org.jboss.tools.common.validation.validator">
<validator
class="org.jboss.tools.cdi.internal.core.validation.CDICoreValidator"
- name="%CDICoreValidator"
- id="org.jboss.tools.cdi.core.CoreValidator">
+ name="%CDICoreValidator"
+ id="org.jboss.tools.cdi.core.CoreValidator"
+ problemType="org.jboss.tools.cdi.core.cdiproblem">
</validator>
</extension>
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-28 00:13:40 UTC (rev 44107)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -125,7 +125,6 @@
*/
public class CDICoreValidator extends CDIValidationErrorManager implements IJavaElementValidator, IStringValidator {
public static final String ID = "org.jboss.tools.cdi.core.CoreValidator"; //$NON-NLS-1$
- public static final String PROBLEM_TYPE = "org.jboss.tools.cdi.core.cdiproblem"; //$NON-NLS-1$
public static final String PREFERENCE_PAGE_ID = "org.jboss.tools.cdi.ui.preferences.CDIValidatorPreferencePage"; //$NON-NLS-1$
public static final String PROPERTY_PAGE_ID = "org.jboss.tools.cdi.ui.propertyPages.CDIValidatorPreferencePage"; //$NON-NLS-1$
@@ -215,15 +214,6 @@
/*
* (non-Javadoc)
- * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMarkerType()
- */
- @Override
- public String getMarkerType() {
- return PROBLEM_TYPE;
- }
-
- /*
- * (non-Javadoc)
*
* @see org.jboss.tools.jst.web.kb.validation.IValidator#getId()
*/
@@ -515,7 +505,7 @@
rootCdiProject = new CDIProjectAsYouType(rootCdiProject, file);
validateResource(file);
if(reporter instanceof ITypedReporter) {
- ((ITypedReporter)reporter).addTypeForFile(getMarkerType());
+ ((ITypedReporter)reporter).addTypeForFile(getProblemType());
}
disableProblemAnnotations(new ITextSourceReference() {
@Override
@@ -2726,10 +2716,8 @@
}
@Override
- protected void registerPreferenceInfo() {
- if(PreferenceInfoManager.getPreferenceInfo(PROBLEM_TYPE) == null){
- PreferenceInfoManager.register(PROBLEM_TYPE, new CDIPreferenceInfo());
- }
+ public void registerPreferenceInfo() {
+ PreferenceInfoManager.register(getProblemType(), new CDIPreferenceInfo());
}
class CDIPreferenceInfo implements IPreferenceInfo{
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CDIAnnotationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CDIAnnotationTest.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CDIAnnotationTest.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -10,16 +10,15 @@
******************************************************************************/
package org.jboss.tools.cdi.core.test.tck.validation;
-import org.jboss.tools.cdi.internal.core.validation.CDICoreValidator;
import org.jboss.tools.common.base.test.validation.AbstractAnnotationTest;
/**
* @author Alexey Kazakov
*/
public class CDIAnnotationTest extends AbstractAnnotationTest {
-
+ public static final String PROBLEM_TYPE = "org.jboss.tools.cdi.core.cdiproblem"; //$NON-NLS-1$
@Override
protected String getMarkerType() {
- return CDICoreValidator.PROBLEM_TYPE;
+ return PROBLEM_TYPE;
}
}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DisableCDISupportTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DisableCDISupportTest.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DisableCDISupportTest.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -15,7 +15,6 @@
import org.eclipse.core.resources.IResource;
import org.jboss.tools.cdi.core.CDIUtil;
import org.jboss.tools.cdi.core.test.tck.TCKTest;
-import org.jboss.tools.cdi.internal.core.validation.CDICoreValidator;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
@@ -23,7 +22,8 @@
* @author Alexey Kazakov
*/
public class DisableCDISupportTest extends ValidationTest {
-
+ private static final String CDI_CORE_VALIDATOR_PROBLEM_TYPE = "org.jboss.tools.cdi.core.cdiproblem";
+
protected IProject tckProject;
/*
@@ -52,10 +52,10 @@
* @throws Exception
*/
public void testRemovingProblemMarkers() throws Exception {
- IMarker[] markers = tckProject.findMarkers(CDICoreValidator.PROBLEM_TYPE, true, IResource.DEPTH_INFINITE);
+ IMarker[] markers = tckProject.findMarkers(CDI_CORE_VALIDATOR_PROBLEM_TYPE, true, IResource.DEPTH_INFINITE);
assertFalse(markers.length==0);
CDIUtil.disableCDI(tckProject);
- markers = tckProject.findMarkers(CDICoreValidator.PROBLEM_TYPE, true, IResource.DEPTH_INFINITE);
+ markers = tckProject.findMarkers(CDI_CORE_VALIDATOR_PROBLEM_TYPE, true, IResource.DEPTH_INFINITE);
assertEquals(0, markers.length);
}
}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -12,7 +12,6 @@
import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.cdi.core.test.tck.TCKTest;
-import org.jboss.tools.cdi.internal.core.validation.CDICoreValidator;
import org.jboss.tools.cdi.internal.core.validation.CDIValidationErrorManager;
import org.jboss.tools.cdi.ui.marker.AddAnnotationMarkerResolution;
import org.jboss.tools.cdi.ui.marker.AddLocalBeanMarkerResolution;
@@ -38,7 +37,8 @@
*
*/
public class CDIMarkerResolutionTest extends TCKTest {
-
+ public static final String PROBLEM_TYPE = "org.jboss.tools.cdi.core.cdiproblem"; //$NON-NLS-1$
+
public void testMakeProducerFieldStaticResolution() throws CoreException {
MarkerResolutionTestUtil.checkResolution(tckProject,
new String[]{
@@ -47,7 +47,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NonStaticProducerOfSessionBeanBroken.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN_ID,
MakeFieldStaticMarkerResolution.class);
@@ -64,7 +64,7 @@
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/FooProducer1.qfxresult",
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/FooProducerLocal.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN_ID,
MakeMethodBusinessMarkerResolution.class);
@@ -79,7 +79,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/FooProducer2.qfxresult",
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN_ID,
AddLocalBeanMarkerResolution.class);
@@ -93,7 +93,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/FooProducerNoInterface.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN_ID,
MakeMethodPublicMarkerResolution.class);
@@ -109,7 +109,7 @@
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TibetanTerrier_Broken1.qfxresult",
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Terrier.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_OBSERVER_IN_SESSION_BEAN_ID,
MakeMethodBusinessMarkerResolution.class);
@@ -123,7 +123,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TibetanTerrier_Broken2.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_OBSERVER_IN_SESSION_BEAN_ID,
AddLocalBeanMarkerResolution.class);
@@ -137,7 +137,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TibetanTerrier_BrokenNoInterface.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_OBSERVER_IN_SESSION_BEAN_ID,
MakeMethodPublicMarkerResolution.class);
@@ -153,7 +153,7 @@
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NotBusinessMethod_Broken1.qfxresult",
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/LocalInt.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_DISPOSER_IN_SESSION_BEAN_ID,
MakeMethodBusinessMarkerResolution.class);
@@ -167,7 +167,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NotBusinessMethod_Broken2.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_DISPOSER_IN_SESSION_BEAN_ID,
AddLocalBeanMarkerResolution.class);
@@ -181,7 +181,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NotBusinessMethod_BrokenNoInterface.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_DISPOSER_IN_SESSION_BEAN_ID,
MakeMethodPublicMarkerResolution.class);
@@ -195,7 +195,7 @@
// new String[]{
// "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TimestampLogger_Broken.qfxresult"
// },
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MULTIPLE_DISPOSERS_FOR_PRODUCER_ID,
DeleteAllDisposerDuplicantMarkerResolution.class);
@@ -209,7 +209,7 @@
// new String[]{
// "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Goose_Broken.qfxresult"
// },
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MULTIPLE_INJECTION_CONSTRUCTORS_ID,
DeleteAllInjectedConstructorsMarkerResolution.class);
@@ -223,7 +223,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Hamina_Broken.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.NOT_PASSIVATION_CAPABLE_BEAN_ID,
AddSerializableInterfaceMarkerResolution.class);
@@ -237,7 +237,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/SecondBean.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.NOT_PASSIVATION_CAPABLE_BEAN_ID,
AddSerializableInterfaceMarkerResolution.class);
@@ -251,7 +251,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestQualifier1.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE_ID,
AddRetentionAnnotationMarkerResolution.class);
@@ -265,7 +265,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestQualifier2.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE_ID,
ChangeAnnotationMarkerResolution.class);
@@ -279,7 +279,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestScope1.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_RETENTION_ANNOTATION_IN_SCOPE_TYPE_ID,
AddRetentionAnnotationMarkerResolution.class);
@@ -293,7 +293,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestScope2.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_RETENTION_ANNOTATION_IN_SCOPE_TYPE_ID,
ChangeAnnotationMarkerResolution.class);
@@ -307,7 +307,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestStereotype1.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_RETENTION_ANNOTATION_IN_STEREOTYPE_TYPE_ID,
AddRetentionAnnotationMarkerResolution.class);
@@ -321,7 +321,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestStereotype2.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_RETENTION_ANNOTATION_IN_STEREOTYPE_TYPE_ID,
ChangeAnnotationMarkerResolution.class);
@@ -332,7 +332,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestStereotype3.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE_ID,
AddTargetAnnotationMarkerResolution.class);
@@ -343,7 +343,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestStereotype4.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE_ID,
ChangeAnnotationMarkerResolution.class);
@@ -354,7 +354,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestQualifier3.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE_ID,
AddTargetAnnotationMarkerResolution.class);
@@ -365,7 +365,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestQualifier4.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE_ID,
ChangeAnnotationMarkerResolution.class);
@@ -379,7 +379,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestScope3.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE_ID,
AddTargetAnnotationMarkerResolution.class);
@@ -393,7 +393,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestScope4.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE_ID,
ChangeAnnotationMarkerResolution.class);
@@ -407,7 +407,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestQualifier5.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER_ID,
AddAnnotationMarkerResolution.class);
@@ -421,7 +421,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestQualifier6.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER_ID,
AddAnnotationMarkerResolution.class);
@@ -435,7 +435,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInterceptor1.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER_ID,
AddAnnotationMarkerResolution.class);
@@ -449,7 +449,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInterceptor2.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER_ID,
AddAnnotationMarkerResolution.class);
@@ -460,7 +460,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInjectProducerField.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.PRODUCER_ANNOTATED_INJECT_ID,
DeleteAnnotationMarkerResolution.class);
@@ -471,7 +471,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInjectProducerMethod.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.PRODUCER_ANNOTATED_INJECT_ID,
DeleteAnnotationMarkerResolution.class);
@@ -482,7 +482,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInjectObserverMethod.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.OBSERVER_ANNOTATED_INJECT_ID,
DeleteAnnotationMarkerResolution.class);
@@ -493,7 +493,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInjectDisposerMethod.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.DISPOSER_ANNOTATED_INJECT_ID,
DeleteAnnotationMarkerResolution.class);
@@ -507,7 +507,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestDisposerConstructor.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.CONSTRUCTOR_PARAMETER_ANNOTATED_DISPOSES_ID,
DeleteAnnotationMarkerResolution.class);
@@ -521,7 +521,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestObserverConstructor.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.CONSTRUCTOR_PARAMETER_ANNOTATED_OBSERVES_ID,
DeleteAnnotationMarkerResolution.class);
@@ -535,7 +535,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInterceptor3.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.DISPOSER_IN_INTERCEPTOR_ID,
DeleteAnnotationMarkerResolution.class);
@@ -549,7 +549,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestDecorator.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.DISPOSER_IN_DECORATOR_ID,
DeleteAnnotationMarkerResolution.class);
@@ -563,7 +563,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInterceptor4.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.PRODUCER_IN_INTERCEPTOR_ID,
DeleteAnnotationMarkerResolution.class);
@@ -577,7 +577,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestDecorator2.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.PRODUCER_IN_DECORATOR_ID,
DeleteAnnotationMarkerResolution.class);
@@ -588,7 +588,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestStereotype5.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.STEREOTYPE_DECLARES_NON_EMPTY_NAME_ID,
DeleteAnnotationMarkerResolution.class);
@@ -599,7 +599,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestStereotype5.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.STEREOTYPE_DECLARES_NON_EMPTY_NAME_ID,
ChangeAnnotationMarkerResolution.class);
@@ -613,7 +613,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInterceptor5.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.INTERCEPTOR_HAS_NAME_ID,
DeleteAnnotationMarkerResolution.class);
@@ -625,7 +625,7 @@
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NamedStereotypedInterceptorBroken.java",
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NamedStereotype.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.INTERCEPTOR_HAS_NAME_ID,
DeleteAnnotationMarkerResolution.class);
@@ -639,7 +639,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestDecorator3.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.DECORATOR_HAS_NAME_ID,
DeleteAnnotationMarkerResolution.class);
@@ -651,7 +651,7 @@
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NamedStereotypedDecoratorBroken.java",
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NamedStereotype.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.DECORATOR_HAS_NAME_ID,
DeleteAnnotationMarkerResolution.class);
@@ -662,7 +662,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TD.java",
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.DECORATOR_HAS_NAME_ID,
DeleteAnnotationMarkerResolution.class);
@@ -676,7 +676,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestStereotype6.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.STEREOTYPE_IS_ANNOTATED_TYPED_ID,
DeleteAnnotationMarkerResolution.class);
@@ -690,7 +690,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestDecorator4.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.DECORATOR_ANNOTATED_SPECIALIZES_ID,
DeleteAnnotationMarkerResolution.class);
@@ -704,7 +704,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestInterceptor6.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.INTERCEPTOR_ANNOTATED_SPECIALIZES_ID,
DeleteAnnotationMarkerResolution.class);
@@ -715,7 +715,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestDisposerProducerMethod.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_DISPOSES_ID,
DeleteAnnotationMarkerResolution.class);
@@ -726,7 +726,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/TestObserverProducerMethod.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_OBSERVES_ID,
DeleteAnnotationMarkerResolution.class);
@@ -737,7 +737,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/DisposerInObserver.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED_ID,
DeleteAnnotationMarkerResolution.class);
@@ -751,7 +751,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/ObserverInDecorator.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.OBSERVER_IN_DECORATOR_ID,
DeleteAnnotationMarkerResolution.class);
@@ -765,7 +765,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/ObserverInInterceptor.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.OBSERVER_IN_INTERCEPTOR_ID,
DeleteAnnotationMarkerResolution.class);
@@ -779,7 +779,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/SessionBeanAnnotatedDecoratorBroken.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.SESSION_BEAN_ANNOTATED_DECORATOR_ID,
DeleteAnnotationMarkerResolution.class);
@@ -793,7 +793,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/SessionBeanAnnotatedInterceptorBroken.qfxresult"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.SESSION_BEAN_ANNOTATED_INTERCEPTOR_ID,
DeleteAnnotationMarkerResolution.class);
@@ -805,7 +805,7 @@
//"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/beans.xml"
"WebContent/WEB-INF/beans.xml"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.UNKNOWN_ALTERNATIVE_BEAN_CLASS_NAME_ID,
CreateCDIElementMarkerResolution.class);
@@ -817,7 +817,7 @@
//"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/beans.xml"
"WebContent/WEB-INF/beans.xml"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.UNKNOWN_ALTERNATIVE_ANNOTATION_NAME_ID,
CreateCDIElementMarkerResolution.class);
@@ -829,7 +829,7 @@
//"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/beans.xml"
"WebContent/WEB-INF/beans.xml"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.UNKNOWN_INTERCEPTOR_CLASS_NAME_ID,
CreateCDIElementMarkerResolution.class);
@@ -840,7 +840,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/NamedInjectionBroken.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.PARAM_INJECTION_DECLARES_EMPTY_NAME_ID,
AddNameMarkerResolution.class);
@@ -851,7 +851,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/MultipleDisposers.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MULTIPLE_DISPOSING_PARAMETERS_ID,
DeleteAllOtherAnnotationsFromParametersMarkerResolution.class);
@@ -862,7 +862,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/MultipleObservers.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.MULTIPLE_OBSERVING_PARAMETERS_ID,
DeleteAllOtherAnnotationsFromParametersMarkerResolution.class);
@@ -873,7 +873,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Leopard_Broken.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD_ID,
MakeFieldProtectedMarkerResolution.class);
@@ -884,7 +884,7 @@
new String[]{
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Leopard_Broken.java"
},
- CDICoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
CDIValidationErrorManager.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD_ID,
MakeBeanScopedDependentMarkerResolution.class);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIQuickFixTest.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIQuickFixTest.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -2,7 +2,6 @@
import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.cdi.core.test.tck.TCKTest;
-import org.jboss.tools.cdi.internal.core.validation.CDICoreValidator;
import org.jboss.tools.cdi.internal.core.validation.CDIValidationErrorManager;
import org.jboss.tools.cdi.ui.marker.AddAnnotationMarkerResolution;
import org.jboss.tools.cdi.ui.marker.AddLocalBeanMarkerResolution;
@@ -17,16 +16,9 @@
import org.jboss.tools.common.base.test.QuickFixTestUtil;
public class CDIQuickFixTest extends TCKTest {
+ public static final String PROBLEM_TYPE = "org.jboss.tools.cdi.core.cdiproblem"; //$NON-NLS-1$
private QuickFixTestUtil util = new QuickFixTestUtil();
- public void setUp() throws Exception {
- super.setUp();
-
- // register Preference Info
- new CDICoreValidator();
- }
-
-
public void testMakeFieldStatic() throws CoreException {
util.checkProposal(tckProject,
"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/MakeFieldStatic.java",
@@ -35,7 +27,7 @@
CDIValidationErrorManager.ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN_ID,
MakeFieldStaticMarkerResolution.class,
true,
- CDICoreValidator.PROBLEM_TYPE);
+ PROBLEM_TYPE);
}
public void testAddLocalBeanResolution() throws CoreException {
@@ -46,7 +38,7 @@
CDIValidationErrorManager.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN_ID,
AddLocalBeanMarkerResolution.class,
true,
- CDICoreValidator.PROBLEM_TYPE);
+ PROBLEM_TYPE);
}
@@ -58,7 +50,7 @@
CDIValidationErrorManager.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN_ID,
MakeMethodPublicMarkerResolution.class,
true,
- CDICoreValidator.PROBLEM_TYPE);
+ PROBLEM_TYPE);
}
@@ -70,7 +62,7 @@
CDIValidationErrorManager.NOT_PASSIVATION_CAPABLE_BEAN_ID,
AddSerializableInterfaceMarkerResolution.class,
true,
- CDICoreValidator.PROBLEM_TYPE);
+ PROBLEM_TYPE);
}
public void testAddRetentionToQualifierResolution() throws CoreException{
@@ -81,7 +73,7 @@
CDIValidationErrorManager.MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE_ID,
AddRetentionAnnotationMarkerResolution.class,
true,
- CDICoreValidator.PROBLEM_TYPE);
+ PROBLEM_TYPE);
}
public void testChangeRetentionToQualifierResolution() throws CoreException{
@@ -92,7 +84,7 @@
CDIValidationErrorManager.MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE_ID,
ChangeAnnotationMarkerResolution.class,
true,
- CDICoreValidator.PROBLEM_TYPE);
+ PROBLEM_TYPE);
}
public void testAddTargetToScopeResolution() throws CoreException{
@@ -103,7 +95,7 @@
CDIValidationErrorManager.MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE_ID,
AddTargetAnnotationMarkerResolution.class,
true,
- CDICoreValidator.PROBLEM_TYPE);
+ PROBLEM_TYPE);
}
public void testAddNonbindingToAnnotationMemberOfQualifierResolution() throws CoreException{
@@ -114,7 +106,7 @@
CDIValidationErrorManager.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER_ID,
AddAnnotationMarkerResolution.class,
true,
- CDICoreValidator.PROBLEM_TYPE);
+ PROBLEM_TYPE);
}
public void testDeleteDisposesAnnotationFromParameterResolution() throws CoreException{
@@ -125,7 +117,7 @@
CDIValidationErrorManager.CONSTRUCTOR_PARAMETER_ANNOTATED_DISPOSES_ID,
DeleteAnnotationMarkerResolution.class,
true,
- CDICoreValidator.PROBLEM_TYPE);
+ PROBLEM_TYPE);
}
public void testCreateBeanClassResolution() throws CoreException{
@@ -136,7 +128,7 @@
CDIValidationErrorManager.UNKNOWN_ALTERNATIVE_BEAN_CLASS_NAME_ID,
CreateCDIElementMarkerResolution.class,
true,
- CDICoreValidator.PROBLEM_TYPE);
+ PROBLEM_TYPE);
}
public void testCreateStereotypeResolution() throws CoreException{
@@ -147,7 +139,7 @@
CDIValidationErrorManager.UNKNOWN_ALTERNATIVE_ANNOTATION_NAME_ID,
CreateCDIElementMarkerResolution.class,
false,
- CDICoreValidator.PROBLEM_TYPE);
+ PROBLEM_TYPE);
}
public void testCreateDecoratorResolution() throws CoreException{
@@ -158,7 +150,7 @@
CDIValidationErrorManager.UNKNOWN_DECORATOR_BEAN_CLASS_NAME_ID,
CreateCDIElementMarkerResolution.class,
false,
- CDICoreValidator.PROBLEM_TYPE);
+ PROBLEM_TYPE);
}
public void testCreateInterceptorResolution() throws CoreException{
@@ -169,6 +161,6 @@
CDIValidationErrorManager.UNKNOWN_INTERCEPTOR_CLASS_NAME_ID,
CreateCDIElementMarkerResolution.class,
false,
- CDICoreValidator.PROBLEM_TYPE);
+ PROBLEM_TYPE);
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeCDIAndELValidatorsMassagesProcessingTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeCDIAndELValidatorsMassagesProcessingTest.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeCDIAndELValidatorsMassagesProcessingTest.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -17,7 +17,6 @@
import org.jboss.tools.cdi.core.test.tck.TCKTest;
import org.jboss.tools.common.base.test.validation.AbstractAsYouTypeValidationTest;
import org.jboss.tools.common.base.test.validation.java.BaseAsYouTypeInJavaValidationTest;
-import org.jboss.tools.jst.web.kb.internal.validation.ELValidator;
/**
*
@@ -26,6 +25,7 @@
*/
public class CDIAsYouTypeCDIAndELValidatorsMassagesProcessingTest extends TCKTest {
private static final String PAGE_NAME = "JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/Bean_Broken.java";
+ private static final String EL_VALIDATOR_PROBLEM_TYPE = "org.jboss.tools.jst.web.kb.elproblem";
private BaseAsYouTypeInJavaValidationTest baseTest = null;
protected IProject project;
@@ -44,7 +44,7 @@
project = TCKTest.findTestProject();
if (baseTest == null) {
// Since the test is about EL errors we're using ELValidator.PROBLEM_TYPE type of problem
- baseTest = new BaseAsYouTypeInJavaValidationTest(project, ELValidator.PROBLEM_TYPE);
+ baseTest = new BaseAsYouTypeInJavaValidationTest(project, EL_VALIDATOR_PROBLEM_TYPE);
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeInJavaSupressWarningsTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeInJavaSupressWarningsTest.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeInJavaSupressWarningsTest.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -15,7 +15,6 @@
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.source.Annotation;
import org.jboss.tools.cdi.core.test.tck.TCKTest;
-import org.jboss.tools.cdi.internal.core.validation.CDICoreValidator;
import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
import org.jboss.tools.common.base.test.validation.AbstractAsYouTypeValidationTest;
import org.jboss.tools.common.base.test.validation.java.BaseAsYouTypeInJavaValidationTest;
@@ -27,6 +26,7 @@
*/
public class CDIAsYouTypeInJavaSupressWarningsTest extends TCKTest {
private static final String PAGE_NAME = "JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/TestNamed.java";
+ private static final String CDI_CORE_VALIDATOR_PROBLEM_TYPE = "org.jboss.tools.cdi.core.cdiproblem";
private BaseAsYouTypeInJavaValidationTest baseTest = null;
protected IProject project;
@@ -39,7 +39,7 @@
public void setUp() throws Exception {
project = TCKTest.findTestProject();
if (baseTest == null) {
- baseTest = new BaseAsYouTypeInJavaValidationTest(project, CDICoreValidator.PROBLEM_TYPE);
+ baseTest = new BaseAsYouTypeInJavaValidationTest(project, CDI_CORE_VALIDATOR_PROBLEM_TYPE);
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeInJavaValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeInJavaValidationTest.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeInJavaValidationTest.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -15,7 +15,6 @@
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.source.Annotation;
import org.jboss.tools.cdi.core.test.tck.TCKTest;
-import org.jboss.tools.cdi.internal.core.validation.CDICoreValidator;
import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
import org.jboss.tools.common.base.test.validation.AbstractAsYouTypeValidationTest;
import org.jboss.tools.common.base.test.validation.java.BaseAsYouTypeInJavaValidationTest;
@@ -27,6 +26,7 @@
*/
public class CDIAsYouTypeInJavaValidationTest extends TCKTest {
private static final String PAGE_NAME = "JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/NPEValidation.java";
+ private static final String CDI_CORE_VALIDATOR_PROBLEM_TYPE = "org.jboss.tools.cdi.core.cdiproblem";
private BaseAsYouTypeInJavaValidationTest baseTest = null;
protected IProject project;
@@ -41,7 +41,7 @@
public void setUp() throws Exception {
project = TCKTest.findTestProject();
if (baseTest == null) {
- baseTest = new BaseAsYouTypeInJavaValidationTest(project, CDICoreValidator.PROBLEM_TYPE);
+ baseTest = new BaseAsYouTypeInJavaValidationTest(project, CDI_CORE_VALIDATOR_PROBLEM_TYPE);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.validation/schema/validator.exsd
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/schema/validator.exsd 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/common/plugins/org.jboss.tools.common.validation/schema/validator.exsd 2012-09-28 00:35:24 UTC (rev 44108)
@@ -80,6 +80,13 @@
</documentation>
</annotation>
</attribute>
+ <attribute name="problemType" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
</complexType>
</element>
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/IValidator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/IValidator.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/IValidator.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -70,4 +70,18 @@
* @return
*/
boolean isEnabled(IProject project);
+
+ /**
+ * Sets type of problem for problem markers and problem annotations
+ * @param problemType
+ */
+ void setProblemType(String problemType);
+
+ /*
+ * register IPreferenceInfo in PreferenceInfoManager
+ * validator is supposed to have own implementation of IPreferenceInfo
+ * and register it in PreferenceInfoManager
+ * see CDICoreValidator.registerPreferenceInfo() as an example
+ */
+ void registerPreferenceInfo();
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/PreferenceInfoManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/PreferenceInfoManager.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/PreferenceInfoManager.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -35,6 +35,11 @@
* returns IPreferenceInfo for problemType
*/
public static IPreferenceInfo getPreferenceInfo(String problemType){
- return infos.get(problemType);
+ IPreferenceInfo info = infos.get(problemType);
+ if(info == null){
+ ValidationContext.loadValidatorByProblemType(problemType);
+ info = infos.get(problemType);
+ }
+ return info;
}
}
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-28 00:13:40 UTC (rev 44107)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -189,7 +189,7 @@
if(preferenceKey != null){
message.setAttribute(PREFERENCE_KEY_ATTRIBUTE_NAME, preferenceKey);
}
- String type = getMarkerType();
+ String type = getProblemType();
if(type!=null) {
message.setAttribute(MESSAGE_TYPE_ATTRIBUTE_NAME, type);
}
@@ -284,7 +284,7 @@
IMarker marker = annotation.getMarker();
try {
String type = marker.getType();
- if(getMarkerType().equals(type)) {
+ if(getProblemType().equals(type)) {
int offset = marker.getAttribute(IMarker.CHAR_START, 0);
int originalMarkerEnd = marker.getAttribute(IMarker.CHAR_END, -1);
String markerMessage = marker.getAttribute(IMarker.MESSAGE, "");
@@ -316,7 +316,7 @@
Position p = anModel.getPosition(annotation);
for (Object object : messageArray) {
IMessage message = (IMessage)object;
- if(getMarkerType().equals(annotation.getProblemType()) && message.getOffset() == p.getOffset() && annotation.getText().equals(message.getText())) {
+ if(getProblemType().equals(annotation.getProblemType()) && message.getOffset() == p.getOffset() && annotation.getText().equals(message.getText())) {
annotationsToRemove.add(annotation);
Annotation markerAnnotation = annotation.getOverlaidAnnotation();
markerAnnotation.markDeleted(true);
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 00:13:40 UTC (rev 44107)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationContext.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -61,6 +61,33 @@
}
}
}
+
+ public static void loadValidatorByProblemType(String problemType){
+ inintConfigurationElements();
+
+ for (IConfigurationElement element : ALL_VALIDATORS) {
+ String pt = element.getAttribute("problemType"); //$NON-NLS-1$
+ if(problemType.equals(pt)){
+ createValidator(element, problemType);
+ }
+ }
+ }
+
+ 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);
+ validator.registerPreferenceInfo();
+ return validator;
+ } catch (CoreException e) {
+ CommonPlugin.getDefault().logError(e);
+ }
+ return null;
+ }
protected List<IValidator> getAllValidators(IProject project) {
projectTree.clear();
@@ -72,16 +99,14 @@
List<IValidator> dependentValidators = new ArrayList<IValidator>();
List<IValidator> allValidators = new ArrayList<IValidator>();
for (IConfigurationElement element : ALL_VALIDATORS) {
- try {
- IValidator validator = (IValidator)element.createExecutableExtension("class"); //$NON-NLS-1$
+ 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);
}
- } catch (CoreException e) {
- CommonPlugin.getDefault().logError(e);
}
}
// We should add all the dependent validators (e.g. EL validator) to the very end of the list.
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-28 00:13:40 UTC (rev 44107)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationErrorManager.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -70,7 +70,6 @@
* Constructor
*/
public ValidationErrorManager() {
- registerPreferenceInfo();
}
// /**
@@ -492,14 +491,12 @@
CommonPlugin.getDefault().logError("Wrong offset [" + offset + "] of the problem marker [" + MessageFormat.format(message, messageArguments) + "] for resource: " + target.getFullPath().toOSString(), e); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
}
}
- MarkerManager.getDefault().getMarkers().add(getMarkerType()); // We need to register the marker type in WST since this type is not equaled to ValidatorManager's type. WST need this type to remove markers when the validator is disabled. See https://issues.jboss.org/browse/JBIDE-12595
- return addError(message, severity, messageArguments, lineNumber, length, offset, target, documentProvider, markerId, markerOwner, getMaxNumberOfMarkersPerFile(target.getProject()), getMarkerType());
+ MarkerManager.getDefault().getMarkers().add(getProblemType()); // We need to register the marker type in WST since this type is not equaled to ValidatorManager's type. WST need this type to remove markers when the validator is disabled. See https://issues.jboss.org/browse/JBIDE-12595
+ return addError(message, severity, messageArguments, lineNumber, length, offset, target, documentProvider, markerId, markerOwner, getMaxNumberOfMarkersPerFile(target.getProject()), getProblemType());
}
abstract public int getMaxNumberOfMarkersPerFile(IProject project);
- public abstract String getMarkerType();
-
private static IMarker addTask(String pluginId, IResource resource, int location,
String message, int severityEnumValue, String targetObjectName,
String groupName, int offset, int length, int maxNumberOfMarkersPerFile, String markerType) throws CoreException {
@@ -615,4 +612,21 @@
* see CDICoreValidator.registerPreferenceInfo() as an example
*/
protected abstract void registerPreferenceInfo();
+
+ protected String problemType = null;
+
+ /**
+ * Sets type of problem for problem markers and problem annotations
+ * @param problemType
+ */
+ public void setProblemType(String problemType){
+ this.problemType = problemType;
+ }
+
+ /**
+ * @return type of problem for problem markers and problem annotations
+ */
+ public String getProblemType(){
+ return problemType;
+ }
}
\ No newline at end of file
Modified: trunk/common/tests/org.jboss.tools.common.validation.test/plugin.xml
===================================================================
--- trunk/common/tests/org.jboss.tools.common.validation.test/plugin.xml 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/common/tests/org.jboss.tools.common.validation.test/plugin.xml 2012-09-28 00:35:24 UTC (rev 44108)
@@ -7,12 +7,14 @@
<validator
class="org.jboss.tools.common.validation.test.TestValidator"
name="TestValidator"
- id="org.jboss.common.validation.test.TestValidator">
+ id="org.jboss.common.validation.test.TestValidator"
+ problemType="org.eclipse.wst.validation.problemmarker">
</validator>
<validator
class="org.jboss.tools.common.validation.test.TestSynchronizationValidator"
name="TestSynchronizationValidator"
- id="org.jboss.common.validation.test.TestSynchronizationValidator">
+ id="org.jboss.common.validation.test.TestSynchronizationValidator"
+ problemType="org.eclipse.wst.validation.problemmarker">
</validator>
</extension>
</plugin>
\ No newline at end of file
Modified: trunk/common/tests/org.jboss.tools.common.validation.test/src/org/jboss/tools/common/validation/test/TestSynchronizationValidator.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.validation.test/src/org/jboss/tools/common/validation/test/TestSynchronizationValidator.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/common/tests/org.jboss.tools.common.validation.test/src/org/jboss/tools/common/validation/test/TestSynchronizationValidator.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -188,4 +188,16 @@
public boolean isEnabled(IProject project) {
return shouldValidate(project);
}
+
+ @Override
+ public void setProblemType(String problemType) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void registerPreferenceInfo() {
+ // TODO Auto-generated method stub
+
+ }
}
\ No newline at end of file
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-28 00:13:40 UTC (rev 44107)
+++ trunk/common/tests/org.jboss.tools.common.validation.test/src/org/jboss/tools/common/validation/test/TestValidator.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -97,12 +97,7 @@
}
@Override
- public String getMarkerType() {
- return ValidationErrorManager.DEFAULT_VALIDATION_MARKER;
- }
-
- @Override
- protected void registerPreferenceInfo() {
+ public void registerPreferenceInfo() {
// TODO Auto-generated method stub
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/plugin.xml 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/plugin.xml 2012-09-28 00:35:24 UTC (rev 44108)
@@ -18,7 +18,8 @@
<validator
class="org.jboss.tools.esb.validator.ESBCoreValidator"
name="%ESBCoreValidator"
- id="org.jboss.tools.esb.validator.ESBCoreValidator">
+ id="org.jboss.tools.esb.validator.ESBCoreValidator"
+ problemType="org.jboss.tools.esb.validator.esbproblem">
</validator>
</extension>
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -49,7 +49,6 @@
public class ESBCoreValidator extends ESBValidationErrorManager implements IValidator {
public static final String ID = "org.jboss.tools.esb.validator.ESBCoreValidator"; //$NON-NLS-1$
- public static final String PROBLEM_TYPE = "org.jboss.tools.esb.validator.esbproblem"; //$NON-NLS-1$
public static final String PREFERENCE_PAGE_ID = "org.jboss.tools.esb.validator.ui.ESBValidatorPreferencePage"; //$NON-NLS-1$
public static final String PROPERTY_PAGE_ID = "org.jboss.tools.esb.validator.ui.propertyPages.ESBValidatorPreferencePage"; //$NON-NLS-1$
@@ -60,15 +59,6 @@
String projectName;
Map<IProject, IProjectValidationContext> contexts = new HashMap<IProject, IProjectValidationContext>();
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMarkerType()
- */
- @Override
- public String getMarkerType() {
- return PROBLEM_TYPE;
- }
-
public String getId() {
return ID;
}
@@ -424,10 +414,8 @@
}
@Override
- protected void registerPreferenceInfo() {
- if(PreferenceInfoManager.getPreferenceInfo(PROBLEM_TYPE) == null){
- PreferenceInfoManager.register(PROBLEM_TYPE, new ESBPreferenceInfo());
- }
+ public void registerPreferenceInfo() {
+ PreferenceInfoManager.register(getProblemType(), new ESBPreferenceInfo());
}
class ESBPreferenceInfo implements IPreferenceInfo{
@@ -446,7 +434,6 @@
public String getPluginId() {
return ESBCorePlugin.PLUGIN_ID;
}
-
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2012-09-28 00:35:24 UTC (rev 44108)
@@ -517,7 +517,8 @@
<validator
class="org.jboss.tools.jsf.web.validation.composite.CompositeComponentValidator"
name="%ComponentCompositeValidator"
- id="org.jboss.tools.jsf.CompositeComponentValidator">
+ id="org.jboss.tools.jsf.CompositeComponentValidator"
+ problemType="org.jboss.tools.jsf.compositeproblem">
</validator>
</extension>
@@ -526,7 +527,8 @@
<validator
class="org.jboss.tools.jsf.web.validation.FacesConfigValidator"
name="%FacesConfigValidator"
- id="org.jboss.tools.jsf.web.validation.FacesConfigValidator">
+ id="org.jboss.tools.jsf.web.validation.FacesConfigValidator"
+ problemType="org.jboss.tools.jsf.facesconfigproblem">
</validator>
</extension>
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-28 00:13:40 UTC (rev 44107)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -74,7 +74,6 @@
*/
public class FacesConfigValidator extends ValidationErrorManager implements IValidator, JSFConstants {
public static final String ID = "org.jboss.tools.esb.validator.ESBCoreValidator"; //$NON-NLS-1$
- public static final String PROBLEM_TYPE = "org.jboss.tools.jsf.facesconfigproblem"; //$NON-NLS-1$
public static final String PREFERENCE_PAGE_ID = CompositeComponentValidator.PREFERENCE_PAGE_ID;
public static final String PROPERTY_PAGE_ID = CompositeComponentValidator.PROPERTY_PAGE_ID;
@@ -180,15 +179,6 @@
addCheck(new JSFCheckToViewId(this), new String[]{ENT_NAVIGATION_CASE, ENT_NAVIGATION_CASE_20, ENT_NAVIGATION_RULE, ENT_NAVIGATION_RULE_20});
}
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMarkerType()
- */
- @Override
- public String getMarkerType() {
- return PROBLEM_TYPE;
- }
-
public String getId() {
return ID;
}
@@ -432,10 +422,8 @@
}
@Override
- protected void registerPreferenceInfo() {
- if(PreferenceInfoManager.getPreferenceInfo(PROBLEM_TYPE) == null){
- PreferenceInfoManager.register(PROBLEM_TYPE, new JSFPreferenceInfo());
- }
+ public void registerPreferenceInfo() {
+ PreferenceInfoManager.register(getProblemType(), new JSFPreferenceInfo());
}
class JSFPreferenceInfo implements IPreferenceInfo{
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-28 00:13:40 UTC (rev 44107)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/composite/CompositeComponentValidator.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -66,7 +66,6 @@
public class CompositeComponentValidator extends WebValidator {
public static final String ID = "org.jboss.tools.jsf.CompositeComponentValidator"; //$NON-NLS-1$
- public static final String PROBLEM_TYPE = "org.jboss.tools.jsf.compositeproblem"; //$NON-NLS-1$
public static final String SHORT_ID = "jboss.jsf.core"; //$NON-NLS-1$
public static final String PREFERENCE_PAGE_ID = "org.jboss.tools.jsf.ui.preferences.JSFValidationPreferencePage"; //$NON-NLS-1$
public static final String PROPERTY_PAGE_ID = "org.jboss.tools.jsf.ui.propertyPages.JSFValidationPreferencePage"; //$NON-NLS-1$
@@ -351,14 +350,6 @@
return JSFSeverityPreferences.getMaxNumberOfProblemMarkersPerFile(project);
}
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMarkerType()
- */
- public String getMarkerType() {
- return PROBLEM_TYPE;
- }
-
public IMarker addError(String message, String preferenceKey,
String[] messageArguments, int length, int offset, IResource target, int messageId) {
IMarker marker = addError(message, preferenceKey, messageArguments, length, offset, target);
@@ -392,10 +383,8 @@
}
@Override
- protected void registerPreferenceInfo() {
- if(PreferenceInfoManager.getPreferenceInfo(PROBLEM_TYPE) == null){
- PreferenceInfoManager.register(PROBLEM_TYPE, new CompositeComponentPreferenceInfo());
- }
+ public void registerPreferenceInfo() {
+ PreferenceInfoManager.register(getProblemType(), new CompositeComponentPreferenceInfo());
}
class CompositeComponentPreferenceInfo implements IPreferenceInfo{
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -34,6 +34,7 @@
public class ELValidatorTest extends AbstractResourceMarkerTest{
public static final String MARKER_TYPE = "org.eclipse.wst.validation.problemmarker";
+ public static final String EL_VALIDATOR_MARKER_TYPE = "org.jboss.tools.jst.web.kb.elproblem";
protected void setUp() throws Exception {
// JobUtils.waitForIdle();
@@ -100,7 +101,7 @@
14);
IFile file = project.getFile("WebContent/testElRevalidation.xhtml");
- file.deleteMarkers(ELValidator.PROBLEM_TYPE, true, IResource.DEPTH_ZERO);
+ file.deleteMarkers(EL_VALIDATOR_MARKER_TYPE, true, IResource.DEPTH_ZERO);
assertMarkerIsNotCreatedForLine(
"WebContent/testElRevalidation.xhtml",
@@ -211,7 +212,7 @@
for (int i = 8; i < 108; i++) {
lines[i-8]=i;
}
- assertMarkerIsCreated(file, ELValidator.PROBLEM_TYPE, messagePattern, lines);
+ assertMarkerIsCreated(file, EL_VALIDATOR_MARKER_TYPE, messagePattern, lines);
time = validateFile("WebContent/pages/lineNumbers.xhtml", 100);
System.out.println("Validation time: " + time);
} finally {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/plugin.xml 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/plugin.xml 2012-09-28 00:35:24 UTC (rev 44108)
@@ -339,7 +339,8 @@
<validator
class="org.jboss.tools.jst.web.validation.WebXMLCoreValidator"
name="%WebXMLCoreValidator"
- id="org.jboss.tools.jst.web.validation.WebXMLCoreValidator">
+ id="org.jboss.tools.jst.web.validation.WebXMLCoreValidator"
+ problemType="org.jboss.tools.jst.web.webxmlproblem">
</validator>
</extension>
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-28 00:13:40 UTC (rev 44107)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -52,7 +52,6 @@
*/
public class WebXMLCoreValidator extends ValidationErrorManager implements IValidator {
public static final String ID = "org.jboss.tools.esb.validator.ESBCoreValidator"; //$NON-NLS-1$
- public static final String PROBLEM_TYPE = "org.jboss.tools.jst.web.webxmlproblem"; //$NON-NLS-1$
public static final String PREFERENCE_PAGE_ID = "org.jboss.tools.jst.web.ui.WebXMLValidatorPreferencePage"; //$NON-NLS-1$
public static final String PROPERTY_PAGE_ID = "org.jboss.tools.jst.web.ui.propertyPages.WebXMLValidatorPreferencePage"; //$NON-NLS-1$
@@ -141,15 +140,6 @@
"WebAppRunAs", "WebAppRoleName");
}
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMarkerType()
- */
- @Override
- public String getMarkerType() {
- return PROBLEM_TYPE;
- }
-
public String getId() {
return ID;
}
@@ -289,10 +279,8 @@
}
@Override
- protected void registerPreferenceInfo() {
- if(PreferenceInfoManager.getPreferenceInfo(PROBLEM_TYPE) == null){
- PreferenceInfoManager.register(PROBLEM_TYPE, new WebXMLPreferenceInfo());
- }
+ public void registerPreferenceInfo() {
+ PreferenceInfoManager.register(getProblemType(), new WebXMLPreferenceInfo());
}
class WebXMLPreferenceInfo implements IPreferenceInfo{
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml 2012-09-28 00:35:24 UTC (rev 44108)
@@ -183,7 +183,8 @@
class="org.jboss.tools.jst.web.kb.internal.validation.ELValidator"
id="org.jboss.tools.jst.web.kb.ELValidator"
name="%ELValidator"
- dependent="true">
+ dependent="true"
+ problemType="org.jboss.tools.jst.web.kb.elproblem">
</validator>
</extension>
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-28 00:13:40 UTC (rev 44107)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -82,7 +82,6 @@
public class ELValidator extends WebValidator implements IStringValidator {
public static final String ID = "org.jboss.tools.jst.web.kb.ELValidator"; //$NON-NLS-1$
- public static final String PROBLEM_TYPE = "org.jboss.tools.jst.web.kb.elproblem"; //$NON-NLS-1$
public static final String PREFERENCE_PAGE_ID = "org.jboss.tools.jst.web.ui.preferences.ELValidatorPreferencePage"; //$NON-NLS-1$
public static final String PROPERTY_PAGE_ID = "org.jboss.tools.jst.web.ui.properties.ELValidatorPreferencePage"; //$NON-NLS-1$
@@ -123,15 +122,6 @@
/*
* (non-Javadoc)
- * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMarkerType()
- */
- @Override
- public String getMarkerType() {
- return PROBLEM_TYPE;
- }
-
- /*
- * (non-Javadoc)
* @see org.jboss.tools.jst.web.kb.validation.IValidator#isEnabled(org.eclipse.core.resources.IProject)
*/
public boolean isEnabled(IProject project) {
@@ -273,7 +263,7 @@
validateEL(elReference, true, elContext);
}
if(reporter instanceof ITypedReporter) {
- ((ITypedReporter)reporter).addTypeForRegion(getMarkerType());
+ ((ITypedReporter)reporter).addTypeForRegion(getProblemType());
}
}
@@ -672,10 +662,8 @@
}
@Override
- protected void registerPreferenceInfo() {
- if(PreferenceInfoManager.getPreferenceInfo(PROBLEM_TYPE) == null){
- PreferenceInfoManager.register(PROBLEM_TYPE, new ELPreferenceInfo());
- }
+ public void registerPreferenceInfo() {
+ PreferenceInfoManager.register(getProblemType(), new ELPreferenceInfo());
}
class ELPreferenceInfo implements IPreferenceInfo{
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/plugin.xml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/plugin.xml 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/plugin.xml 2012-09-28 00:35:24 UTC (rev 44108)
@@ -8,7 +8,8 @@
class="org.jboss.tools.jst.web.kb.test.validation.TestValidator"
id="org.jboss.tools.jst.web.kb.test.TestValidator"
name="Test Validator"
- dependent="true">
+ dependent="true"
+ problemType="org.eclipse.wst.validation.problemmarker">
</validator>
</extension>
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/validation/TestValidator.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/validation/TestValidator.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/validation/TestValidator.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -106,4 +106,16 @@
validated = true;
return OK_STATUS;
}
+
+ @Override
+ public void setProblemType(String problemType) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void registerPreferenceInfo() {
+ // TODO Auto-generated method stub
+
+ }
}
\ No newline at end of file
Modified: trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebXMLValidationTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebXMLValidationTest.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebXMLValidationTest.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -22,7 +22,6 @@
import org.eclipse.osgi.util.NLS;
import org.jboss.tools.common.base.test.validation.TestUtil;
import org.jboss.tools.common.validation.ValidatorManager;
-import org.jboss.tools.jst.web.validation.WebXMLCoreValidator;
import org.jboss.tools.jst.web.validation.WebXMLValidatorMessages;
import org.jboss.tools.jst.web.webapp.model.WebAppConstants;
import org.jboss.tools.test.util.JobUtils;
@@ -34,7 +33,7 @@
* @author Alexey Kazakov
*/
public class WebXMLValidationTest extends TestCase {
-
+ public static final String PROBLEM_TYPE = "org.jboss.tools.jst.web.webxmlproblem";
private IProject project;
/* (non-Javadoc)
@@ -65,7 +64,7 @@
String path0 = "WebContent/WEB-INF/web.xml";
IFile webxml = project.getFile(path0);
assertTrue(webxml.exists());
- IMarker[] markers = webxml.findMarkers(WebXMLCoreValidator.PROBLEM_TYPE, false, IResource.DEPTH_ZERO);
+ IMarker[] markers = webxml.findMarkers(PROBLEM_TYPE, false, IResource.DEPTH_ZERO);
assertTrue(markers.length > 0);
//Now we will copy that original web.xml to different folders and check incremental validation.
@@ -74,7 +73,7 @@
String path1 = "aFolder/WEB-INF/web.xml";
IFile webxml1 = project.getFile(path1);
replaceFile(project, path0, path1);
- markers = webxml1.findMarkers(WebXMLCoreValidator.PROBLEM_TYPE, false, IResource.DEPTH_ZERO);
+ markers = webxml1.findMarkers(PROBLEM_TYPE, false, IResource.DEPTH_ZERO);
assertTrue(markers.length > 0);
for (IMarker m: markers) {
System.out.println(m.getAttribute(IMarker.MESSAGE));
@@ -84,7 +83,7 @@
String path2 = "target/m2e-wtp/web-resources/WEB-INF/web.xml";
IFile webxml2 = project.getFile(path2);
replaceFile(project, path0, path2);
- markers = webxml2.findMarkers(WebXMLCoreValidator.PROBLEM_TYPE, false, IResource.DEPTH_ZERO);
+ markers = webxml2.findMarkers(PROBLEM_TYPE, false, IResource.DEPTH_ZERO);
assertTrue(markers.length == 0);
}
@@ -99,13 +98,13 @@
String path1 = "WebContent/WEB-INF/web.xml.loginconfigtest1";
replaceFile(project, path1, path0);
- IMarker[] markers = webxml.findMarkers(WebXMLCoreValidator.PROBLEM_TYPE, false, IResource.DEPTH_ZERO);
+ IMarker[] markers = webxml.findMarkers(PROBLEM_TYPE, false, IResource.DEPTH_ZERO);
assertFalse(hasMarkerOnLine(markers, 18));
assertTrue(hasMarkerOnLine(markers, 19));
String path2 = "WebContent/WEB-INF/web.xml.loginconfigtest2";
replaceFile(project, path2, path0);
- markers = webxml.findMarkers(WebXMLCoreValidator.PROBLEM_TYPE, false, IResource.DEPTH_ZERO);
+ markers = webxml.findMarkers(PROBLEM_TYPE, false, IResource.DEPTH_ZERO);
assertTrue(hasMarkerOnLine(markers, 18));
assertFalse(hasMarkerOnLine(markers, 19));
@@ -129,7 +128,7 @@
public void testServletMapping() throws CoreException {
IFile webxml = project.getFile("WebContent/WEB-INF/webJAXFX.xml");
- IMarker[] markers = webxml.findMarkers(WebXMLCoreValidator.PROBLEM_TYPE, false, IResource.DEPTH_ZERO);
+ IMarker[] markers = webxml.findMarkers(PROBLEM_TYPE, false, IResource.DEPTH_ZERO);
//1. If servlet-mapping/servlet-name=javax.ws.rs.core.Application, it is ok.
assertFalse(hasMarkerOnLine(markers, 6));
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2012-09-28 00:35:24 UTC (rev 44108)
@@ -590,7 +590,8 @@
<validator
class="org.jboss.tools.seam.internal.core.validation.SeamCoreValidator"
name="%SeamCoreValidator"
- id="org.jboss.tools.seam.core.CoreValidator">
+ id="org.jboss.tools.seam.core.CoreValidator"
+ problemType="org.jboss.tools.seam.core.seamproblem">
</validator>
</extension>
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -89,7 +89,6 @@
*/
public class SeamCoreValidator extends SeamValidationErrorManager implements IValidator {
public static final String ID = "org.jboss.tools.seam.core.CoreValidator"; //$NON-NLS-1$
- public static final String PROBLEM_TYPE = "org.jboss.tools.seam.core.seamproblem"; //$NON-NLS-1$
public static final int NONUNIQUE_COMPONENT_NAME_MESSAGE_ID = 1;
public static final int DUPLICATE_REMOVE_MESSAGE_ID = 2;
@@ -112,15 +111,6 @@
/*
* (non-Javadoc)
- * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMarkerType()
- */
- @Override
- public String getMarkerType() {
- return PROBLEM_TYPE;
- }
-
- /*
- * (non-Javadoc)
* @see org.jboss.tools.jst.web.kb.validation.IValidator#getId()
*/
public String getId() {
@@ -1117,10 +1107,8 @@
}
@Override
- protected void registerPreferenceInfo() {
- if(PreferenceInfoManager.getPreferenceInfo(PROBLEM_TYPE) == null){
- PreferenceInfoManager.register(PROBLEM_TYPE, new SeamPreferenceInfo());
- }
+ public void registerPreferenceInfo() {
+ PreferenceInfoManager.register(getProblemType(), new SeamPreferenceInfo());
}
class SeamPreferenceInfo implements IPreferenceInfo{
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamProjectPropertyValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamProjectPropertyValidator.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamProjectPropertyValidator.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -115,11 +115,6 @@
}
@Override
- public String getMarkerType() {
- return ValidationErrorManager.DEFAULT_VALIDATION_MARKER;
- }
-
- @Override
protected void registerPreferenceInfo() {
// TODO Auto-generated method stub
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/validation/SeamProjectPropertyValidatorWrapper.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/validation/SeamProjectPropertyValidatorWrapper.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/validation/SeamProjectPropertyValidatorWrapper.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -92,11 +92,6 @@
}
@Override
- public String getMarkerType() {
- return ValidationErrorManager.DEFAULT_VALIDATION_MARKER;
- }
-
- @Override
protected void registerPreferenceInfo() {
// TODO Auto-generated method stub
@@ -221,4 +216,16 @@
IReporter reporter, boolean asYouTypeValidation) {
this.init(project, validationHelper, validationContext, manager, reporter, false);
}
+
+ @Override
+ public void setProblemType(String problemType) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void registerPreferenceInfo() {
+ // TODO Auto-generated method stub
+
+ }
}
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -37,7 +37,7 @@
*
*/
public class SeamMarkerResolutionTest extends TestCase {
-
+ public static final String PROBLEM_TYPE = "org.jboss.tools.seam.core.seamproblem";
private IProject project;
@Override
@@ -80,7 +80,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateRemoveComponent.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.DUPLICATE_REMOVE_MESSAGE_ID,
DeleteAnnotationMarkerResolution.class);
@@ -91,7 +91,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateDestroyComponent.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.DUPLICATE_DESTROY_MESSAGE_ID,
DeleteAnnotationMarkerResolution.class);
@@ -102,7 +102,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/StatelessClass.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.DUPLICATE_DESTROY_MESSAGE_ID,
DeleteAnnotationMarkerResolution.class);
@@ -113,7 +113,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateCreateComponent.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.DUPLICATE_CREATE_MESSAGE_ID,
DeleteAnnotationMarkerResolution.class);
@@ -124,7 +124,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/StatefulDuplicateUnwrapComponent.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.DUPLICATE_UNWRAP_MESSAGE_ID,
DeleteAnnotationMarkerResolution.class);
@@ -135,7 +135,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/NonComponentWithCreateMethod.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.CREATE_DOESNT_BELONG_TO_COMPONENT_MESSAGE_ID,
DeleteAnnotationMarkerResolution.class);
@@ -146,7 +146,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/NonComponentWithCreateMethod.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.CREATE_DOESNT_BELONG_TO_COMPONENT_MESSAGE_ID,
AddAnnotationMarkerResolution.class);
@@ -157,7 +157,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/NonComponentWithUnwrapMethod.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.UNWRAP_DOESNT_BELONG_TO_COMPONENT_MESSAGE_ID,
DeleteAnnotationMarkerResolution.class);
@@ -168,7 +168,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/NonComponentWithUnwrapMethod.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.UNWRAP_DOESNT_BELONG_TO_COMPONENT_MESSAGE_ID,
AddAnnotationMarkerResolution.class);
@@ -179,7 +179,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/NonComponentWithObserverMethod.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.OBSERVER_DOESNT_BELONG_TO_COMPONENT_MESSAGE_ID,
DeleteAnnotationMarkerResolution.class);
@@ -190,7 +190,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/NonComponentWithObserverMethod.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.OBSERVER_DOESNT_BELONG_TO_COMPONENT_MESSAGE_ID,
AddAnnotationMarkerResolution.class);
@@ -201,7 +201,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/DuplicateComponent1.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.NONUNIQUE_COMPONENT_NAME_MESSAGE_ID,
DeleteAnnotationMarkerResolution.class);
@@ -212,7 +212,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/DuplicateComponent1.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.NONUNIQUE_COMPONENT_NAME_MESSAGE_ID,
RenameAnnotationMarkerResolution.class);
@@ -223,7 +223,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/StatefulComponentWithoutRemove.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.STATEFUL_COMPONENT_DOES_NOT_CONTAIN_REMOVE_ID,
AddAnnotatedMethodMarkerResolution.class);
@@ -234,7 +234,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/StatefulComponentWithoutDestroy.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.STATEFUL_COMPONENT_DOES_NOT_CONTAIN_DESTROY_ID,
AddAnnotatedMethodMarkerResolution.class);
@@ -245,7 +245,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/session/StatefulComponentWithWrongScope.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.STATEFUL_COMPONENT_WRONG_SCOPE_ID,
ChangeScopeMarkerResolution.class);
@@ -256,7 +256,7 @@
new String[]{
"src/action/org/domain/SeamWebWarTestProject/entity/EntityComponentWithWrongScope.java"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.ENTITY_COMPONENT_WRONG_SCOPE_ID,
ChangeScopeMarkerResolution.class);
@@ -267,7 +267,7 @@
new String[]{
"WebContent/WEB-INF/components.xml"
},
- SeamCoreValidator.PROBLEM_TYPE,
+ PROBLEM_TYPE,
SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
SeamCoreValidator.UNKNOWN_COMPONENT_PROPERTY_ID,
AddSetterMarkerResolution.class);
Modified: trunk/struts/plugins/org.jboss.tools.struts/plugin.xml
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/plugin.xml 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/struts/plugins/org.jboss.tools.struts/plugin.xml 2012-09-28 00:35:24 UTC (rev 44108)
@@ -425,7 +425,8 @@
<validator
class="org.jboss.tools.struts.validation.StrutsCoreValidator"
name="%StrutsCoreValidator"
- id="org.jboss.tools.struts.validation.StrutsCoreValidator">
+ id="org.jboss.tools.struts.validation.StrutsCoreValidator"
+ problemType="org.jboss.tools.struts.strutsproblem">
</validator>
</extension>
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-28 00:13:40 UTC (rev 44107)
+++ trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/validation/StrutsCoreValidator.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -53,7 +53,6 @@
*/
public class StrutsCoreValidator extends ValidationErrorManager implements IValidator, StrutsConstants {
public static final String ID = "org.jboss.tools.struts.validation.StrutsCoreValidator"; //$NON-NLS-1$
- public static final String PROBLEM_TYPE = "org.jboss.tools.struts.strutsproblem"; //$NON-NLS-1$
public static final String PREFERENCE_PAGE_ID = "org.jboss.tools.struts.ui.StrutsValidatorPreferencePage"; //$NON-NLS-1$
public static final String PROPERTY_PAGE_ID = "org.jboss.tools.struts.ui.propertyPages.StrutsValidatorPreferencePage"; //$NON-NLS-1$
@@ -121,15 +120,6 @@
ENT_STRUTSCONFIG + VER_SUFFIX_10, ENT_STRUTSCONFIG + VER_SUFFIX_11, ENT_STRUTSCONFIG + VER_SUFFIX_12);
}
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMarkerType()
- */
- @Override
- public String getMarkerType() {
- return PROBLEM_TYPE;
- }
-
public String getId() {
return ID;
}
@@ -274,10 +264,8 @@
}
@Override
- protected void registerPreferenceInfo() {
- if(PreferenceInfoManager.getPreferenceInfo(PROBLEM_TYPE) == null){
- PreferenceInfoManager.register(PROBLEM_TYPE, new StrutsPreferenceInfo());
- }
+ public void registerPreferenceInfo() {
+ PreferenceInfoManager.register(getProblemType(), new StrutsPreferenceInfo());
}
class StrutsPreferenceInfo implements IPreferenceInfo{
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/plugin.xml 2012-09-28 00:13:40 UTC (rev 44107)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/plugin.xml 2012-09-28 00:35:24 UTC (rev 44108)
@@ -94,7 +94,8 @@
<validator
class="org.jboss.tools.ws.jaxrs.core.internal.metamodel.validation.JaxrsMetamodelValidator"
id="org.jboss.tools.ws.jaxrs.JaxrsMetamodelValidator"
- name="%VALIDATOR_NAME">
+ name="%VALIDATOR_NAME"
+ problemType="org.jboss.tools.ws.jaxrs.metamodelMarker">
</validator>
</extension>
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-28 00:13:40 UTC (rev 44107)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/validation/JaxrsMetamodelValidator.java 2012-09-28 00:35:24 UTC (rev 44108)
@@ -277,11 +277,6 @@
}
@Override
- public String getMarkerType() {
- return JAXRS_PROBLEM_TYPE;
- }
-
- @Override
public String getId() {
return ID;
}
@@ -297,10 +292,8 @@
}
@Override
- protected void registerPreferenceInfo() {
- if(PreferenceInfoManager.getPreferenceInfo(JAXRS_PROBLEM_TYPE) == null){
- PreferenceInfoManager.register(JAXRS_PROBLEM_TYPE, new JaxrsPreferenceInfo());
- }
+ public void registerPreferenceInfo() {
+ PreferenceInfoManager.register(getProblemType(), new JaxrsPreferenceInfo());
}
class JaxrsPreferenceInfo implements IPreferenceInfo{
12 years, 3 months
JBoss Tools SVN: r44107 - in trunk: cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences and 15 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-09-27 20:13:40 -0400 (Thu, 27 Sep 2012)
New Revision: 44107
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.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/preferences/SeverityPreferences.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java
trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBPreferenceInitializer.java
trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBConfigurationBlock.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidationConfigurationBlock.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFSeverityPreferenceInitializer.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/preferences/ELPreferenceInitializer.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/preferences/KBValidationConfigurationBlock.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELValidatorConfigurationBlock.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLConfigurationBlock.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLPreferenceInitializer.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/StrutsConfigConfigurationBlock.java
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/validation/StrutsPreferenceInitializer.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/preferences/JaxrsPreferenceInitializer.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/preferences/JaxrsValidatorConfigurationBlock.java
Log:
https://issues.jboss.org/browse/JBIDE-12595 Disabling JAX-RS validator doesn't affect resources validation
https://issues.jboss.org/browse/JBIDE-12741 CDI (and other JBT common validators) is disabled for workspace if you disable it for project
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 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -28,7 +28,7 @@
@Override
public void initializeDefaultPreferences() {
IEclipsePreferences defaultPreferences = ((IScopeContext)DefaultScope.INSTANCE).getNode(CDICorePlugin.PLUGIN_ID);
- defaultPreferences.putBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
+ defaultPreferences.put(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, SeverityPreferences.ENABLE);
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.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -29,6 +29,7 @@
private static Key[] getKeys() {
ArrayList<Key> keys = new ArrayList<Key>();
+ keys.add(ENABLE_BLOCK_KEY);
for (SectionDescription s: CDIConfigurationBlockDescriptionProvider.getInstance().getSections()) {
s.collectKeys(keys);
}
@@ -37,6 +38,13 @@
return keys.toArray(new Key[0]);
}
+ protected final static Key ENABLE_BLOCK_KEY = getKey(CDICorePlugin.PLUGIN_ID, SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
+
+ @Override
+ protected Key getEnableBlockKey() {
+ return ENABLE_BLOCK_KEY;
+ }
+
private static final Key MAX_NUMBER_OF_PROBLEMS_KEY = getKey(CDICorePlugin.PLUGIN_ID, SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
@Override
Modified: trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/preferences/SeverityPreferences.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/preferences/SeverityPreferences.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/preferences/SeverityPreferences.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -45,7 +45,7 @@
*/
public abstract class SeverityPreferences {
- public static final String ENABLE_BLOCK_PREFERENCE_NAME = "enableBlock"; //$NON-NLS-1$
+ public static final String ENABLE_BLOCK_PREFERENCE_NAME = CommonCorePlugin.PLUGIN_ID + ".validator.enableBlock"; //$NON-NLS-1$
public static final String MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME = CommonCorePlugin.PLUGIN_ID + ".validator.problem.markersBlock"; //$NON-NLS-1$
public static final int DEFAULT_MAX_NUMBER_OF_MARKERS_PER_FILE = 20;
public static final String WRONG_BUILDER_ORDER_PREFERENCE_NAME = CommonCorePlugin.PLUGIN_ID + ".validator.problem.wrongBuilderOrder"; //$NON-NLS-1$
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -21,17 +21,20 @@
import org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock;
import org.eclipse.jdt.internal.ui.preferences.PreferencesMessages;
import org.eclipse.jdt.internal.ui.preferences.ScrolledPageContent;
-import org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock.Key;
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
+import org.eclipse.jface.dialogs.ControlEnableState;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.layout.PixelConverter;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontMetrics;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -84,6 +87,9 @@
protected PixelConverter fPixelConverter;
protected FilteredPreferenceTree fFilteredPrefTree;
+
+ private ControlEnableState mainBlockEnableState;
+
/**
* Text control retrieved from fFilteredPrefTree.
*/
@@ -91,10 +97,12 @@
protected IWorkbenchPreferenceContainer container;
+ protected Button enableCheckBox;
+
public SeverityConfigurationBlock(IStatusChangeListener context,
IProject project, Key[] allKeys,
IWorkbenchPreferenceContainer container) {
- super(context, project, allKeys, container);
+ super(context, project, allKeys, container);
this.container = container;
}
@@ -124,7 +132,7 @@
addMaxNumberOfMarkersField(c);
}
addWrongBuilderOrderField(c);
-
+
Control[] currentControls = folder.getChildren();
fFilteredPrefTree = new FilteredPreferenceTree(this, folder, getCommonDescription());
@@ -171,6 +179,7 @@
excomposite.setClient(inner);
return inner;
}
+
protected void createSection(PreferenceTreeNode parent, SectionDescription section, Composite composite, int nColumns, int defaultIndent) {
String label = section.getLabel();
@@ -178,7 +187,7 @@
PreferenceTreeNode treeSection = fFilteredPrefTree.addExpandableComposite(composite, label, nColumns, twistieKey, parent, false);
ExpandableComposite excomposite = getExpandableComposite(twistieKey);
Composite inner = createInnerComposite(excomposite, nColumns, composite.getFont());
-
+
for (SectionDescription s: section.getSections()) {
createSection(treeSection, s, inner, nColumns, defaultIndent);
}
@@ -189,6 +198,24 @@
}
}
+ @Override
+ public void performDefaults() {
+ super.performDefaults();
+ updateMainPreferenceContent();
+ }
+
+ protected Button addEnableField(Composite composite) {
+ Button checkBox = addCheckBox(composite, SeverityPreferencesMessages.ENABLE_VALIDATION, getEnableBlockKey(), enableDisableValues, 0);
+ checkBox.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ updateMainPreferenceContent();
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ return checkBox;
+ }
+
protected void addMaxNumberOfMarkersField(Composite composite) {
Text text = addTextField(composite, SeverityPreferencesMessages.MAX_NUMBER_OF_MARKERS, getMaxNumberOfProblemsKey(), 0, 0);
GridData gd = (GridData) text.getLayoutData();
@@ -224,6 +251,8 @@
return status;
}
+ abstract protected Key getEnableBlockKey();
+
abstract protected Key getMaxNumberOfProblemsKey();
/**
@@ -235,6 +264,8 @@
return null;
}
+ private Composite commonComposite;
+
@Override
protected Control createContents(Composite parent) {
fPixelConverter = new PixelConverter(parent);
@@ -247,16 +278,33 @@
layout.marginWidth = 0;
mainComp.setLayout(layout);
- Composite commonComposite = createStyleTabContent(mainComp);
+ enableCheckBox = addEnableField(mainComp);
+
+ commonComposite = createStyleTabContent(mainComp);
GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, true);
gridData.heightHint = convertHeightInCharsToPixels(parent,20);
commonComposite.setLayoutData(gridData);
validateSettings(null, null, null);
+ updateMainPreferenceContent();
+
return mainComp;
}
+ protected void updateMainPreferenceContent() {
+ if (enableCheckBox.getSelection()) {
+ if (mainBlockEnableState != null) {
+ mainBlockEnableState.restore();
+ mainBlockEnableState= null;
+ }
+ } else {
+ if (mainBlockEnableState == null) {
+ mainBlockEnableState= ControlEnableState.disable(commonComposite);
+ }
+ }
+ }
+
private int convertHeightInCharsToPixels(Control control,int chars) {
Font font = control.getFont();
GC gc = new GC(font.getDevice());
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -12,26 +12,15 @@
package org.jboss.tools.common.ui.preferences;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage;
-import org.eclipse.jface.dialogs.ControlEnableState;
-import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.eclipse.ui.preferences.IWorkingCopyManager;
-import org.eclipse.ui.preferences.WorkingCopyManager;
-import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock.OptionDescription;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock.SectionDescription;
@@ -40,8 +29,6 @@
*/
public abstract class SeverityPreferencePage extends PropertyAndPreferencePage {
- private ControlEnableState mainBlockEnableState;
- private Button checkBox;
protected Control severityConfigurationBlock;
protected SeverityConfigurationBlock fConfigurationBlock;
@@ -60,55 +47,8 @@
root.setLayout(gridLayout);
root.setLayoutData(gd);
- checkBox = new Button(root, SWT.CHECK);
- checkBox.setFont(JFaceResources.getDialogFont());
- checkBox.setText(SeverityPreferencesMessages.ENABLE_VALIDATION);
-
severityConfigurationBlock = getConfigurationBlock().createContents(root);
- IScopeContext[] lookupOrder;
- IProject project = getProject();
- if (project != null) {
- lookupOrder = new IScopeContext[] {
- new ProjectScope(project),
- InstanceScope.INSTANCE,
- DefaultScope.INSTANCE
- };
- } else {
- lookupOrder = new IScopeContext[] {
- InstanceScope.INSTANCE,
- DefaultScope.INSTANCE
- };
- }
- final IScopeContext context = lookupOrder[0];
- IWorkbenchPreferenceContainer container = getConfigurationBlock().getContainer();
-
- final IWorkingCopyManager manager;
- if (container == null) {
- manager = new WorkingCopyManager();
- } else {
- manager = container.getWorkingCopyManager();
- }
- String value = getStoredValue(lookupOrder, manager, getConfigurationBlock().getQualifier(), SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
- boolean enabled = value==null?true:Boolean.parseBoolean(value);
-
-// checkBox.setSelection(getPreferenceStore().getBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME));
- checkBox.setSelection(enabled);
-
- gridLayout = new GridLayout(1, false);
- severityConfigurationBlock.setLayoutData(gd);
-
- checkBox.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- enableMainPreferenceContent(checkBox.getSelection());
-// getPreferenceStore().setValue(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, checkBox.getSelection());
- setStoredValue(context, Boolean.toString(checkBox.getSelection()), manager, getConfigurationBlock().getQualifier(), SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
- enableMainPreferenceContent(checkBox.getSelection());
-
return root;
}
@@ -142,19 +82,6 @@
}
}
- protected void enableMainPreferenceContent(boolean enable) {
- if (enable) {
- if (mainBlockEnableState != null) {
- mainBlockEnableState.restore();
- mainBlockEnableState= null;
- }
- } else {
- if (mainBlockEnableState == null) {
- mainBlockEnableState= ControlEnableState.disable(severityConfigurationBlock);
- }
- }
- }
-
@Override
protected boolean hasProjectSpecificOptions(IProject project) {
return getConfigurationBlock().hasProjectSpecificOptions(project);
@@ -187,8 +114,6 @@
*/
@Override
protected void performDefaults() {
- checkBox.setSelection(true);
- enableMainPreferenceContent(true);
super.performDefaults();
if (getConfigurationBlock() != null) {
getConfigurationBlock().performDefaults();
@@ -203,7 +128,6 @@
if (getConfigurationBlock() != null && !getConfigurationBlock().performOk()) {
return false;
}
- updateEnableBlock();
return super.performOk();
}
@@ -215,17 +139,8 @@
if (getConfigurationBlock() != null) {
getConfigurationBlock().performApply();
}
- updateEnableBlock();
}
- private void updateEnableBlock() {
- boolean oldValue = getPreferenceStore().getBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
- boolean newValue = checkBox.getSelection();
- if(oldValue != newValue) {
- getPreferenceStore().setValue(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, newValue);
- }
- }
-
public String getLabel(String preferenceId){
for(SectionDescription section : getAllSections()){
String label = getLabel(section, preferenceId);
@@ -269,4 +184,4 @@
public String getFilterText() {
return getConfigurationBlock().getFilterControl().getText();
}
-}
+}
\ No newline at end of file
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBPreferenceInitializer.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBPreferenceInitializer.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBPreferenceInitializer.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -27,7 +27,7 @@
@Override
public void initializeDefaultPreferences() {
IEclipsePreferences defaultPreferences = ((IScopeContext) new DefaultScope()).getNode(ESBValidatorPlugin.PLUGIN_ID);
- defaultPreferences.putBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
+ defaultPreferences.put(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, SeverityPreferences.ENABLE);
for (String name : ESBPreferences.SEVERITY_OPTION_NAMES) {
defaultPreferences.put(name, SeverityPreferences.ERROR);
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBConfigurationBlock.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBConfigurationBlock.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBConfigurationBlock.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -61,6 +61,7 @@
private static Key[] getKeys() {
ArrayList<Key> keys = new ArrayList<Key>();
+ keys.add(ENABLE_BLOCK_KEY);
for (SectionDescription s: ALL_SECTIONS) {
s.collectKeys(keys);
}
@@ -68,6 +69,13 @@
return keys.toArray(new Key[0]);
}
+ protected final static Key ENABLE_BLOCK_KEY = getKey(ESBValidatorPlugin.PLUGIN_ID, SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
+
+ @Override
+ protected Key getEnableBlockKey() {
+ return ENABLE_BLOCK_KEY;
+ }
+
private static final Key MAX_NUMBER_OF_PROBLEMS_KEY = getKey(ESBValidatorPlugin.PLUGIN_ID, SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
@Override
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFSeverityPreferenceInitializer.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFSeverityPreferenceInitializer.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFSeverityPreferenceInitializer.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -28,7 +28,7 @@
@Override
public void initializeDefaultPreferences() {
IEclipsePreferences defaultPreferences = ((IScopeContext) DefaultScope.INSTANCE).getNode(JSFModelPlugin.PLUGIN_ID);
- defaultPreferences.putBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
+ defaultPreferences.put(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, SeverityPreferences.ENABLE);
defaultPreferences.put(SeverityPreferences.WRONG_BUILDER_ORDER_PREFERENCE_NAME, JSFSeverityPreferences.ERROR);
for (String name : JSFSeverityPreferences.SEVERITY_OPTION_NAMES) {
defaultPreferences.put(name, SeverityPreferences.WARNING);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidationConfigurationBlock.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidationConfigurationBlock.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidationConfigurationBlock.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -18,7 +18,6 @@
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock;
-import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock.SectionDescription;
import org.jboss.tools.jsf.JSFModelPlugin;
import org.jboss.tools.jsf.web.validation.JSFSeverityPreferences;
@@ -159,6 +158,7 @@
private static Key[] getKeys() {
ArrayList<Key> keys = new ArrayList<Key>();
+ keys.add(ENABLE_BLOCK_KEY);
for (SectionDescription s: ALL_SECTIONS) {
s.collectKeys(keys);
}
@@ -167,41 +167,48 @@
return keys.toArray(new Key[0]);
}
- private static final Key MAX_NUMBER_OF_PROBLEMS_KEY = getKey(JSFModelPlugin.PLUGIN_ID, SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
+ protected final static Key ENABLE_BLOCK_KEY = getKey(JSFModelPlugin.PLUGIN_ID, SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
- @Override
- protected Key getMaxNumberOfProblemsKey() {
- return MAX_NUMBER_OF_PROBLEMS_KEY;
- }
+ @Override
+ protected Key getEnableBlockKey() {
+ return ENABLE_BLOCK_KEY;
+ }
- private static final Key WRONG_BUILDER_ORDER_KEY = getKey(JSFModelPlugin.PLUGIN_ID, SeverityPreferences.WRONG_BUILDER_ORDER_PREFERENCE_NAME);
+ private static final Key MAX_NUMBER_OF_PROBLEMS_KEY = getKey(JSFModelPlugin.PLUGIN_ID, SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
- protected Key getWrongBuilderOrderKey() {
- return WRONG_BUILDER_ORDER_KEY;
- }
+ @Override
+ protected Key getMaxNumberOfProblemsKey() {
+ return MAX_NUMBER_OF_PROBLEMS_KEY;
+ }
- public JSFValidationConfigurationBlock(IStatusChangeListener context,
- IProject project, IWorkbenchPreferenceContainer container) {
- super(context, project, getKeys(), container);
- }
+ private static final Key WRONG_BUILDER_ORDER_KEY = getKey(JSFModelPlugin.PLUGIN_ID, SeverityPreferences.WRONG_BUILDER_ORDER_PREFERENCE_NAME);
- @Override
- protected SectionDescription[] getAllSections() {
- return ALL_SECTIONS;
- }
+ protected Key getWrongBuilderOrderKey() {
+ return WRONG_BUILDER_ORDER_KEY;
+ }
- @Override
- protected String getCommonDescription() {
- return JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_common_description;
- }
+ public JSFValidationConfigurationBlock(IStatusChangeListener context,
+ IProject project, IWorkbenchPreferenceContainer container) {
+ super(context, project, getKeys(), container);
+ }
- @Override
- protected IDialogSettings getDialogSettings() {
- return JSFModelPlugin.getDefault().getDialogSettings().getSection(SETTINGS_SECTION_NAME);
- }
+ @Override
+ protected SectionDescription[] getAllSections() {
+ return ALL_SECTIONS;
+ }
- @Override
- protected String getQualifier() {
- return JSFModelPlugin.PLUGIN_ID;
- }
- }
\ No newline at end of file
+ @Override
+ protected String getCommonDescription() {
+ return JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_common_description;
+ }
+
+ @Override
+ protected IDialogSettings getDialogSettings() {
+ return JSFModelPlugin.getDefault().getDialogSettings().getSection(SETTINGS_SECTION_NAME);
+ }
+
+ @Override
+ protected String getQualifier() {
+ return JSFModelPlugin.PLUGIN_ID;
+ }
+}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLPreferenceInitializer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLPreferenceInitializer.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLPreferenceInitializer.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -28,7 +28,7 @@
@Override
public void initializeDefaultPreferences() {
IEclipsePreferences defaultPreferences = ((IScopeContext) new DefaultScope()).getNode(WebModelPlugin.PLUGIN_ID);
- defaultPreferences.putBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
+ defaultPreferences.put(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, SeverityPreferences.ENABLE);
for (String name : WebXMLPreferences.SEVERITY_OPTION_NAMES) {
defaultPreferences.put(name, SeverityPreferences.WARNING);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/preferences/ELPreferenceInitializer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/preferences/ELPreferenceInitializer.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/preferences/ELPreferenceInitializer.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -30,7 +30,7 @@
IEclipsePreferences defaultPreferences = ((IScopeContext) new DefaultScope()).getNode(WebKbPlugin.PLUGIN_ID);
//EL Preferences
- defaultPreferences.putBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
+ defaultPreferences.put(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, SeverityPreferences.ENABLE);
defaultPreferences.put(SeverityPreferences.WRONG_BUILDER_ORDER_PREFERENCE_NAME, ELSeverityPreferences.ERROR);
for (String name : ELSeverityPreferences.SEVERITY_OPTION_NAMES) {
defaultPreferences.put(name, ELSeverityPreferences.ERROR);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/preferences/KBValidationConfigurationBlock.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/preferences/KBValidationConfigurationBlock.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/preferences/KBValidationConfigurationBlock.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -16,6 +16,7 @@
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
+import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock;
import org.jboss.tools.jst.web.kb.WebKbPlugin;
@@ -41,13 +42,21 @@
private static Key[] getKeys() {
ArrayList<Key> keys = new ArrayList<Key>();
+ keys.add(ENABLE_BLOCK_KEY);
for (SectionDescription s: ALL_SECTIONS) {
s.collectKeys(keys);
}
return keys.toArray(new Key[0]);
}
+ protected final static Key ENABLE_BLOCK_KEY = getKey(WebKbPlugin.PLUGIN_ID, SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
+
@Override
+ protected Key getEnableBlockKey() {
+ return ENABLE_BLOCK_KEY;
+ }
+
+ @Override
protected Key getMaxNumberOfProblemsKey() {
return null;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELValidatorConfigurationBlock.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELValidatorConfigurationBlock.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELValidatorConfigurationBlock.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -15,25 +15,17 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock;
-import org.eclipse.jdt.internal.ui.preferences.ScrolledPageContent;
-import org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock.Key;
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock;
-import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock.OptionDescription;
-import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock.SectionDescription;
import org.jboss.tools.jst.web.kb.WebKbPlugin;
import org.jboss.tools.jst.web.kb.preferences.ELSeverityPreferences;
@@ -68,6 +60,7 @@
private static Key[] getKeys() {
ArrayList<Key> keys = new ArrayList<Key>();
+ keys.add(ENABLE_BLOCK_KEY);
for (SectionDescription s: ALL_SECTIONS) {
s.collectKeys(keys);
}
@@ -78,6 +71,13 @@
return keys.toArray(new Key[0]);
}
+ protected final static Key ENABLE_BLOCK_KEY = getKey(WebKbPlugin.PLUGIN_ID, SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
+
+ @Override
+ protected Key getEnableBlockKey() {
+ return ENABLE_BLOCK_KEY;
+ }
+
private static final Key MAX_NUMBER_OF_PROBLEMS_KEY = getKey(WebKbPlugin.PLUGIN_ID, SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
@Override
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLConfigurationBlock.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLConfigurationBlock.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLConfigurationBlock.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -13,6 +13,7 @@
import java.util.ArrayList;
import org.eclipse.core.resources.IProject;
+import org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock.Key;
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
@@ -74,6 +75,7 @@
private static Key[] getKeys() {
ArrayList<Key> keys = new ArrayList<Key>();
+ keys.add(ENABLE_BLOCK_KEY);
for (SectionDescription s: ALL_SECTIONS) {
s.collectKeys(keys);
}
@@ -81,6 +83,13 @@
return keys.toArray(new Key[0]);
}
+ protected final static Key ENABLE_BLOCK_KEY = getKey(WebModelPlugin.PLUGIN_ID, SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
+
+ @Override
+ protected Key getEnableBlockKey() {
+ return ENABLE_BLOCK_KEY;
+ }
+
private static final Key MAX_NUMBER_OF_PROBLEMS_KEY = getKey(WebModelPlugin.PLUGIN_ID, SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
@Override
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -29,7 +29,7 @@
public void initializeDefaultPreferences() {
IEclipsePreferences defaultPreferences = ((IScopeContext) new DefaultScope()).getNode(SeamCorePlugin.PLUGIN_ID);
- defaultPreferences.putBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
+ defaultPreferences.put(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, SeverityPreferences.ENABLE);
defaultPreferences.put(SeverityPreferences.WRONG_BUILDER_ORDER_PREFERENCE_NAME, SeamPreferences.ERROR);
for (String name : SeamPreferences.SEVERITY_OPTION_NAMES) {
defaultPreferences.put(name, SeamPreferences.ERROR);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -14,13 +14,11 @@
import java.util.ArrayList;
import org.eclipse.core.resources.IProject;
-import org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock.Key;
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock;
-import org.jboss.tools.jst.web.kb.WebKbPlugin;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamPreferences;
@@ -139,6 +137,7 @@
private static Key[] getKeys() {
ArrayList<Key> keys = new ArrayList<Key>();
+ keys.add(ENABLE_BLOCK_KEY);
for (SectionDescription s: ALL_SECTIONS) {
s.collectKeys(keys);
}
@@ -147,6 +146,13 @@
return keys.toArray(new Key[0]);
}
+ protected final static Key ENABLE_BLOCK_KEY = getKey(SeamCorePlugin.PLUGIN_ID, SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
+
+ @Override
+ protected Key getEnableBlockKey() {
+ return ENABLE_BLOCK_KEY;
+ }
+
private static final Key MAX_NUMBER_OF_PROBLEMS_KEY = getKey(SeamCorePlugin.PLUGIN_ID, SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
@Override
Modified: trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/validation/StrutsPreferenceInitializer.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/validation/StrutsPreferenceInitializer.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/validation/StrutsPreferenceInitializer.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -28,7 +28,7 @@
@Override
public void initializeDefaultPreferences() {
IEclipsePreferences defaultPreferences = ((IScopeContext) new DefaultScope()).getNode(StrutsModelPlugin.PLUGIN_ID);
- defaultPreferences.putBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
+ defaultPreferences.put(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, SeverityPreferences.ENABLE);
for (String name : StrutsPreferences.SEVERITY_OPTION_NAMES) {
defaultPreferences.put(name, SeverityPreferences.WARNING);
}
Modified: trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/StrutsConfigConfigurationBlock.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/StrutsConfigConfigurationBlock.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/StrutsConfigConfigurationBlock.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -61,6 +61,7 @@
private static Key[] getKeys() {
ArrayList<Key> keys = new ArrayList<Key>();
+ keys.add(ENABLE_BLOCK_KEY);
for (SectionDescription s: ALL_SECTIONS) {
s.collectKeys(keys);
}
@@ -68,6 +69,13 @@
return keys.toArray(new Key[0]);
}
+ protected final static Key ENABLE_BLOCK_KEY = getKey(StrutsModelPlugin.PLUGIN_ID, SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
+
+ @Override
+ protected Key getEnableBlockKey() {
+ return ENABLE_BLOCK_KEY;
+ }
+
private static final Key MAX_NUMBER_OF_PROBLEMS_KEY = getKey(StrutsModelPlugin.PLUGIN_ID, SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
@Override
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/preferences/JaxrsPreferenceInitializer.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/preferences/JaxrsPreferenceInitializer.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/preferences/JaxrsPreferenceInitializer.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -29,7 +29,7 @@
@Override
public void initializeDefaultPreferences() {
IEclipsePreferences defaultPreferences = ((IScopeContext)DefaultScope.INSTANCE).getNode(JBossJaxrsCorePlugin.PLUGIN_ID);
- defaultPreferences.putBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
+ defaultPreferences.put(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, SeverityPreferences.ENABLE);
defaultPreferences.put(SeverityPreferences.WRONG_BUILDER_ORDER_PREFERENCE_NAME, JaxrsPreferences.ERROR);
for (String name : JaxrsPreferences.SEVERITY_OPTION_NAMES) {
defaultPreferences.put(name, SeverityPreferences.ERROR);
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/preferences/JaxrsValidatorConfigurationBlock.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/preferences/JaxrsValidatorConfigurationBlock.java 2012-09-28 00:04:20 UTC (rev 44106)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/preferences/JaxrsValidatorConfigurationBlock.java 2012-09-28 00:13:40 UTC (rev 44107)
@@ -31,6 +31,7 @@
private static Key[] getKeys() {
ArrayList<Key> keys = new ArrayList<Key>();
+ keys.add(ENABLE_BLOCK_KEY);
for (SectionDescription s: JaxrsValidatorConfigurationBlockDescriptionProvider.getInstance().getSections()) {
s.collectKeys(keys);
}
@@ -39,6 +40,13 @@
return keys.toArray(new Key[0]);
}
+ protected final static Key ENABLE_BLOCK_KEY = getKey(JBossJaxrsCorePlugin.PLUGIN_ID, SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
+
+ @Override
+ protected Key getEnableBlockKey() {
+ return ENABLE_BLOCK_KEY;
+ }
+
private static final Key MAX_NUMBER_OF_PROBLEMS_KEY = getKey(JBossJaxrsCorePlugin.PLUGIN_ID, SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
@Override
12 years, 3 months
JBoss Tools SVN: r44106 - trunk/tests/scripts/installation-updates.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-09-27 20:04:20 -0400 (Thu, 27 Sep 2012)
New Revision: 44106
Added:
trunk/tests/scripts/installation-updates/assembly.xml
Log:
restord assembly.xml to fix build errors in tests component
Added: trunk/tests/scripts/installation-updates/assembly.xml
===================================================================
--- trunk/tests/scripts/installation-updates/assembly.xml (rev 0)
+++ trunk/tests/scripts/installation-updates/assembly.xml 2012-09-28 00:04:20 UTC (rev 44106)
@@ -0,0 +1,32 @@
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>delivery</id>
+ <formats>
+ <format>zip</format>
+ <format>dir</format>
+ </formats>
+ <baseDirectory>/</baseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${project.basedir}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>*.sh</include>
+ </includes>
+ <fileMode>777</fileMode>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/scenarios</directory>
+ <outputDirectory>scenarios</outputDirectory>
+ <includes>
+ <include>*</include>
+ </includes>
+ <fileMode>777</fileMode>
+ </fileSet>
+ </fileSets>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>/repository</outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+ </dependencySets>
+</assembly>
\ No newline at end of file
12 years, 3 months
JBoss Tools SVN: r44104 - trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-09-27 13:18:29 -0400 (Thu, 27 Sep 2012)
New Revision: 44104
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java
Log:
https://issues.jboss.org/browse/JBIDE-12741 CDI (and other JBT common validators) is disabled for workspace if you disable it for project
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java 2012-09-27 17:17:17 UTC (rev 44103)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java 2012-09-27 17:18:29 UTC (rev 44104)
@@ -92,6 +92,7 @@
String value = getStoredValue(lookupOrder, manager, getConfigurationBlock().getQualifier(), SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
boolean enabled = value==null?true:Boolean.parseBoolean(value);
+// checkBox.setSelection(getPreferenceStore().getBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME));
checkBox.setSelection(enabled);
gridLayout = new GridLayout(1, false);
@@ -100,6 +101,7 @@
checkBox.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
enableMainPreferenceContent(checkBox.getSelection());
+// getPreferenceStore().setValue(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, checkBox.getSelection());
setStoredValue(context, Boolean.toString(checkBox.getSelection()), manager, getConfigurationBlock().getQualifier(), SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
}
public void widgetDefaultSelected(SelectionEvent e) {
12 years, 3 months
JBoss Tools SVN: r44103 - trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-09-27 13:17:17 -0400 (Thu, 27 Sep 2012)
New Revision: 44103
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java
Log:
https://issues.jboss.org/browse/JBIDE-12741 CDI (and other JBT common validators) is disabled for workspace if you disable it for project
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java 2012-09-27 17:16:45 UTC (rev 44102)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java 2012-09-27 17:17:17 UTC (rev 44103)
@@ -89,12 +89,22 @@
*/
protected Text filterControl;
+ protected IWorkbenchPreferenceContainer container;
+
public SeverityConfigurationBlock(IStatusChangeListener context,
IProject project, Key[] allKeys,
IWorkbenchPreferenceContainer container) {
super(context, project, allKeys, container);
+ this.container = container;
}
+ /**
+ * @return the container
+ */
+ public IWorkbenchPreferenceContainer getContainer() {
+ return container;
+ }
+
protected abstract String getCommonDescription();
protected abstract SectionDescription[] getAllSections();
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java 2012-09-27 17:16:45 UTC (rev 44102)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java 2012-09-27 17:17:17 UTC (rev 44103)
@@ -12,6 +12,11 @@
package org.jboss.tools.common.ui.preferences;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ProjectScope;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage;
import org.eclipse.jface.dialogs.ControlEnableState;
import org.eclipse.jface.resource.JFaceResources;
@@ -23,6 +28,9 @@
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
+import org.eclipse.ui.preferences.IWorkingCopyManager;
+import org.eclipse.ui.preferences.WorkingCopyManager;
import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock.OptionDescription;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock.SectionDescription;
@@ -55,16 +63,44 @@
checkBox = new Button(root, SWT.CHECK);
checkBox.setFont(JFaceResources.getDialogFont());
checkBox.setText(SeverityPreferencesMessages.ENABLE_VALIDATION);
- checkBox.setSelection(getPreferenceStore().getBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME));
severityConfigurationBlock = getConfigurationBlock().createContents(root);
+
+ IScopeContext[] lookupOrder;
+ IProject project = getProject();
+ if (project != null) {
+ lookupOrder = new IScopeContext[] {
+ new ProjectScope(project),
+ InstanceScope.INSTANCE,
+ DefaultScope.INSTANCE
+ };
+ } else {
+ lookupOrder = new IScopeContext[] {
+ InstanceScope.INSTANCE,
+ DefaultScope.INSTANCE
+ };
+ }
+ final IScopeContext context = lookupOrder[0];
+ IWorkbenchPreferenceContainer container = getConfigurationBlock().getContainer();
+
+ final IWorkingCopyManager manager;
+ if (container == null) {
+ manager = new WorkingCopyManager();
+ } else {
+ manager = container.getWorkingCopyManager();
+ }
+ String value = getStoredValue(lookupOrder, manager, getConfigurationBlock().getQualifier(), SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
+ boolean enabled = value==null?true:Boolean.parseBoolean(value);
+
+ checkBox.setSelection(enabled);
+
gridLayout = new GridLayout(1, false);
severityConfigurationBlock.setLayoutData(gd);
checkBox.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
enableMainPreferenceContent(checkBox.getSelection());
- getPreferenceStore().setValue(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, checkBox.getSelection());
+ setStoredValue(context, Boolean.toString(checkBox.getSelection()), manager, getConfigurationBlock().getQualifier(), SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
}
public void widgetDefaultSelected(SelectionEvent e) {
}
@@ -74,6 +110,36 @@
return root;
}
+ private IEclipsePreferences getNode(IScopeContext context, IWorkingCopyManager manager, String qualifier) {
+ IEclipsePreferences node= context.getNode(qualifier);
+ if (manager != null) {
+ return manager.getWorkingCopy(node);
+ }
+ return node;
+ }
+
+ public String getStoredValue(IScopeContext context, IWorkingCopyManager manager, String qualifier, String key) {
+ return getNode(context, manager, qualifier).get(key, null);
+ }
+
+ public String getStoredValue(IScopeContext[] lookupOrder, IWorkingCopyManager manager, String qualifier, String key) {
+ for (int i = 0; i < lookupOrder.length; i++) {
+ String value= getStoredValue(lookupOrder[i], manager, qualifier, key);
+ if (value != null) {
+ return value;
+ }
+ }
+ return null;
+ }
+
+ public void setStoredValue(IScopeContext context, String value, IWorkingCopyManager manager, String qualifier, String key) {
+ if (value != null) {
+ getNode(context, manager, qualifier).put(key, value);
+ } else {
+ getNode(context, manager, qualifier).remove(key);
+ }
+ }
+
protected void enableMainPreferenceContent(boolean enable) {
if (enable) {
if (mainBlockEnableState != null) {
12 years, 3 months
JBoss Tools SVN: r44101 - trunk/seam/plugins/org.jboss.tools.runtime.seam.detector.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-09-27 13:07:55 -0400 (Thu, 27 Sep 2012)
New Revision: 44101
Modified:
trunk/seam/plugins/org.jboss.tools.runtime.seam.detector/plugin.xml
Log:
JBIDE-12748 part 1 to trunk
Modified: trunk/seam/plugins/org.jboss.tools.runtime.seam.detector/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.runtime.seam.detector/plugin.xml 2012-09-27 16:19:39 UTC (rev 44100)
+++ trunk/seam/plugins/org.jboss.tools.runtime.seam.detector/plugin.xml 2012-09-27 17:07:55 UTC (rev 44101)
@@ -15,6 +15,15 @@
<extension
point="org.jboss.tools.runtime.core.downloadruntimes">
<runtime
+ id="org.jboss.tools.runtime.core.seam.230"
+ name="JBoss Seam 2.3.0.Final"
+ version="2.3.0.Final"
+ size="131.4MB"
+ url="http://sourceforge.net/projects/jboss/files/JBoss%20Seam/2.3.0.Final/jbos..."
+ licenseUrl="http://www.gnu.org/licenses/lgpl-2.1.txt"
+ disclaimer="true"/>
+
+ <runtime
id="org.jboss.tools.runtime.core.seam.222"
name="JBoss Seam 2.2.2.Final"
version="2.2.2.Final"
12 years, 3 months
JBoss Tools SVN: r44100 - trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-09-27 12:19:39 -0400 (Thu, 27 Sep 2012)
New Revision: 44100
Modified:
trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java
Log:
JBIDE-12538
https://issues.jboss.org/browse/JBIDE-12538
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java 2012-09-27 15:51:44 UTC (rev 44099)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java 2012-09-27 16:19:39 UTC (rev 44100)
@@ -29,14 +29,17 @@
import org.jboss.tools.common.model.util.PositionHolder;
import org.jboss.tools.common.text.ITextSourceReference;
import org.jboss.tools.common.validation.ContextValidationHelper;
+import org.jboss.tools.common.validation.IPreferenceInfo;
import org.jboss.tools.common.validation.IProjectValidationContext;
import org.jboss.tools.common.validation.IValidatingProjectSet;
import org.jboss.tools.common.validation.IValidatingProjectTree;
import org.jboss.tools.common.validation.IValidator;
+import org.jboss.tools.common.validation.PreferenceInfoManager;
import org.jboss.tools.common.validation.ValidatorManager;
import org.jboss.tools.common.validation.internal.ProjectValidationContext;
import org.jboss.tools.common.validation.internal.SimpleValidatingProjectTree;
import org.jboss.tools.common.validation.internal.ValidatingProjectSet;
+import org.jboss.tools.esb.core.ESBCorePlugin;
import org.jboss.tools.esb.core.ESBProjectConstant;
import org.jboss.tools.esb.core.facet.IJBossESBFacetDataModelProperties;
import org.jboss.tools.esb.core.model.ESBConstants;
@@ -48,6 +51,7 @@
public static final String ID = "org.jboss.tools.esb.validator.ESBCoreValidator"; //$NON-NLS-1$
public static final String PROBLEM_TYPE = "org.jboss.tools.esb.validator.esbproblem"; //$NON-NLS-1$
public static final String PREFERENCE_PAGE_ID = "org.jboss.tools.esb.validator.ui.ESBValidatorPreferencePage"; //$NON-NLS-1$
+ public static final String PROPERTY_PAGE_ID = "org.jboss.tools.esb.validator.ui.propertyPages.ESBValidatorPreferencePage"; //$NON-NLS-1$
static String XML_EXT = ".xml"; //$NON-NLS-1$
static String ATTR_PATH = "path"; //$NON-NLS-1$
@@ -420,9 +424,30 @@
}
@Override
- protected String getPreferencePageId() {
- return PREFERENCE_PAGE_ID;
+ protected void registerPreferenceInfo() {
+ if(PreferenceInfoManager.getPreferenceInfo(PROBLEM_TYPE) == null){
+ PreferenceInfoManager.register(PROBLEM_TYPE, new ESBPreferenceInfo());
+ }
}
+
+ class ESBPreferenceInfo implements IPreferenceInfo{
+
+ @Override
+ public String getPreferencePageId() {
+ return PREFERENCE_PAGE_ID;
+ }
+
+ @Override
+ public String getPropertyPageId() {
+ return PROPERTY_PAGE_ID;
+ }
+
+ @Override
+ public String getPluginId() {
+ return ESBCorePlugin.PLUGIN_ID;
+ }
+
+ }
}
class XMLValueInfo implements IValueInfo {
@@ -473,5 +498,3 @@
return object == null ? null : (IFile)object.getAdapter(File.class);
}
}
-
-
12 years, 3 months