Author: dazarov
Date: 2011-11-18 13:15:10 -0500 (Fri, 18 Nov 2011)
New Revision: 36453
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
Log:
"Configure Problem Severity" quick fix for every JBDS Problem Markers which
opens Preferences Dialog filtered with current problem
https://issues.jboss.org/browse/JBIDE-9885
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 2011-11-18
18:01:38 UTC (rev 36452)
+++
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2011-11-18
18:15:10 UTC (rev 36453)
@@ -43,6 +43,7 @@
import org.jboss.tools.cdi.ui.marker.TestableResolutionWithDialog;
import org.jboss.tools.cdi.ui.marker.TestableResolutionWithRefactoringProcessor;
import org.jboss.tools.common.base.test.validation.TestUtil;
+import org.jboss.tools.common.ui.marker.ConfigureProblemSeverityMarkerResolution;
import org.jboss.tools.common.util.FileUtil;
/**
@@ -51,6 +52,14 @@
*/
public class CDIMarkerResolutionTest extends TCKTest {
+ private void checkForConfigureProblemSeverity(IMarkerResolution[] resolutions){
+ for(IMarkerResolution resolution : resolutions){
+ if(resolution.getClass().equals(ConfigureProblemSeverityMarkerResolution.class))
+ return;
+ }
+ fail("Configure Problem Severity marker resolution not found");
+ }
+
private void checkResolution(IProject project, String[] fileNames, String markerType,
String idName, int id, Class<? extends IMarkerResolution> resolutionClass) throws
CoreException {
checkResolution(project, fileNames, new String[]{}, markerType, idName, id,
resolutionClass);
}
@@ -76,6 +85,7 @@
if(messageId == id){
IMarkerResolution[] resolutions = IDE.getMarkerHelpRegistry()
.getResolutions(marker);
+ checkForConfigureProblemSeverity(resolutions);
for (int j = 0; j < resolutions.length; j++) {
IMarkerResolution resolution = resolutions[j];
if (resolution.getClass().equals(resolutionClass)) {