Author: dazarov
Date: 2010-12-02 12:25:00 -0500 (Thu, 02 Dec 2010)
New Revision: 27118
Added:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
Log:
https://jira.jboss.org/browse/JBIDE-7674
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2010-12-02 16:58:19 UTC
(rev 27117)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2010-12-02 17:25:00 UTC
(rev 27118)
@@ -34,5 +34,6 @@
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.cdi.ui,
org.jboss.tools.cdi.ui.ca,
+ org.jboss.tools.cdi.ui.marker,
org.jboss.tools.cdi.ui.preferences,
org.jboss.tools.cdi.ui.wizard
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF 2010-12-02 16:58:19
UTC (rev 27117)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF 2010-12-02 17:25:00
UTC (rev 27118)
@@ -20,4 +20,5 @@
org.jboss.tools.cdi.xml,
org.eclipse.jst.standard.schemas
Export-Package: org.jboss.tools.cdi.core.test,
- org.jboss.tools.cdi.core.test.tck
+ org.jboss.tools.cdi.core.test.tck,
+ org.jboss.tools.cdi.core.test.tck.validation
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF 2010-12-02 16:58:19
UTC (rev 27117)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF 2010-12-02 17:25:00
UTC (rev 27118)
@@ -18,5 +18,6 @@
org.eclipse.jface,
org.eclipse.jface.text;bundle-version="3.5.2",
org.eclipse.jdt.core;bundle-version="3.5.2",
- org.eclipse.jdt.ui
+ org.eclipse.jdt.ui,
+ org.eclipse.ui.ide;bundle-version="3.6.0"
Export-Package: org.jboss.tools.cdi.ui.test
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2010-12-02
16:58:19 UTC (rev 27117)
+++
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2010-12-02
17:25:00 UTC (rev 27118)
@@ -11,6 +11,7 @@
package org.jboss.tools.cdi.ui.test;
import org.eclipse.jdt.internal.core.JavaModelManager;
+import org.jboss.tools.cdi.ui.test.marker.CDIMarkerResolutionTest;
import org.jboss.tools.cdi.ui.test.references.CDIPreferencePageTest;
import org.jboss.tools.cdi.ui.test.wizard.NewCDIWizardTest;
@@ -27,9 +28,11 @@
JavaModelManager.getIndexManager().disable();
TestSuite suite = new TestSuite("CDI UI Tests");
+ suite.addTestSuite(CDIMarkerResolutionTest.class);
suite.addTestSuite(CATest.class);
suite.addTestSuite(NewCDIWizardTest.class);
suite.addTestSuite(CDIPreferencePageTest.class);
+
return suite;
}
}
\ No newline at end of file
Added:
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
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2010-12-02
17:25:00 UTC (rev 27118)
@@ -0,0 +1,57 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2009 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.cdi.ui.test.marker;
+
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.IMarkerResolution;
+import org.eclipse.ui.ide.IDE;
+import org.jboss.tools.cdi.core.test.tck.validation.ValidationTest;
+import org.jboss.tools.cdi.ui.marker.MakeFieldStaticMarkerResolution;
+
+/**
+ * @author Daniel Azarov
+ *
+ */
+public class CDIMarkerResolutionTest extends ValidationTest {
+ public static final String MARKER_TYPE =
"org.jboss.tools.cdi.core.cdiproblem";
+
+ public void testMakeFieldStaticResolution() throws CoreException {
+ IFile file =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/NonStaticProducerOfSessionBeanBroken.java");
+
+ assertTrue("File - "+file.getFullPath()+" must be
exist",file.exists());
+
+ IMarker[] markers = file.findMarkers(MARKER_TYPE, true, IResource.DEPTH_INFINITE);
+
+ boolean found = false;
+ for (int i = 0; i < markers.length; i++) {
+ IMarker marker = markers[i];
+ IMarkerResolution[] resolutions = IDE.getMarkerHelpRegistry()
+ .getResolutions(marker);
+ for (int j = 0; j < resolutions.length; j++) {
+ IMarkerResolution resolution = resolutions[j];
+ if (resolution instanceof MakeFieldStaticMarkerResolution) {
+ found = true;
+ break;
+ }
+ }
+ if (found) {
+ break;
+ }
+ }
+ assertTrue("Quick fix: \"Make field static\" doesn't exist.",
found);
+ }
+
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain