[jbosstools-commits] JBoss Tools SVN: r20203 - in trunk: cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck and 1 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue Feb 9 10:34:41 EST 2010


Author: akazakov
Date: 2010-02-09 10:34:41 -0500 (Tue, 09 Feb 2010)
New Revision: 20203

Added:
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/definition/stereotype/broken/withBindingType/StereotypeWithTyped_Broken.java
Modified:
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
   trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708

Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/definition/stereotype/broken/withBindingType/StereotypeWithTyped_Broken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/definition/stereotype/broken/withBindingType/StereotypeWithTyped_Broken.java	                        (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/definition/stereotype/broken/withBindingType/StereotypeWithTyped_Broken.java	2010-02-09 15:34:41 UTC (rev 20203)
@@ -0,0 +1,18 @@
+package org.jboss.jsr299.tck.tests.definition.stereotype.broken.withBindingType;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.Typed;
+
+ at Stereotype
+ at Target( { TYPE })
+ at Retention(RUNTIME)
+ at Typed(String.class)
+// This file is used to test JBT and it is missing in TCK.
+ at interface StereotypeWithTyped_Broken {
+}
\ No newline at end of file


Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/definition/stereotype/broken/withBindingType/StereotypeWithTyped_Broken.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java	2010-02-09 14:44:22 UTC (rev 20202)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java	2010-02-09 15:34:41 UTC (rev 20203)
@@ -26,10 +26,45 @@
 		AbstractResourceMarkerTest.assertMarkerIsCreated(petShopFile, AbstractResourceMarkerTest.MARKER_TYPE, "Bean class or producer method or field specifies a @Typed annotation, and the value member specifies a class which does not correspond to a type in the unrestricted set of bean types of a bean", 9);
 		int markerNumbers = getMarkersNumber(petShopFile);
 		assertEquals("PetShop.java should has the only error marker.", markerNumbers, 1);
-		// TODO
 		cleanProject("/lookup/typesafe/resolution");
 	}
 
+	/*
+	 * 	 2.7.1.3. Stereotype declares a non-empty @Named annotation (Non-Portable behavior)
+	 */
+	public void testNonEmptyNamedForStereotype() throws Exception {
+		IProject p = importPreparedProject("/definition/stereotype");
+		IFile file = p.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/nonEmptyNamed/StereotypeWithNonEmptyNamed_Broken.java");
+		AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, "Stereotype declares a non-empty @Named annotation", 15);
+		int markerNumbers = getMarkersNumber(file);
+		assertEquals("StereotypeWithNonEmptyNamed_Broken.java should has the only error marker.", markerNumbers, 1);
+		cleanProject("/definition/stereotype");
+	}
+
+	/*
+	 * 	 2.7.1.3. Stereotype declares any other qualifier annotation
+	 */
+	public void testAnnotatedStereotype() throws Exception {
+		IProject p = importPreparedProject("/definition/stereotype");
+		IFile file = p.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/withBindingType/StereotypeWithBindingTypes_Broken.java");
+		AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, "Stereotype declares any qualifier annotation other than @Named", 14);
+		int markerNumbers = getMarkersNumber(file);
+		assertEquals("StereotypeWithBindingTypes_Broken.java should has the only error marker.", markerNumbers, 1);
+		cleanProject("/definition/stereotype");
+	}
+
+	/*
+	 * 	 2.7.1.3. Stereotype is annotated @Typed
+	 */
+	public void testTypedStereotype() throws Exception {
+		IProject p = importPreparedProject("/definition/stereotype");
+		IFile file = p.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/withBindingType/StereotypeWithTyped_Broken.java");
+		AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, "Stereotype is annotated @Typed", 15);
+		int markerNumbers = getMarkersNumber(file);
+		assertEquals("StereotypeWithTyped_Broken.java should has the only error marker.", markerNumbers, 1);
+		cleanProject("/definition/stereotype");
+	}
+
 	public static int getMarkersNumber(IResource resource) {
 		return AbstractResourceMarkerTest.getMarkersNumberByGroupName(resource, null);
 	}

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	2010-02-09 14:44:22 UTC (rev 20202)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java	2010-02-09 15:34:41 UTC (rev 20203)
@@ -172,7 +172,7 @@
 	 */
 	public IStatus validate(Set<IFile> changedFiles, IProject project, ContextValidationHelper validationHelper, ValidatorManager manager, IReporter reporter) throws ValidationException {
 		init(project, validationHelper, manager, reporter);
-		displaySubtask(SeamValidationMessages.SEARCHING_RESOURCES);
+		displaySubtask(SeamValidationMessages.SEARCHING_RESOURCES, new String[]{projectName});
 
 		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
 		Set<ISeamComponent> checkedComponents = new HashSet<ISeamComponent>();



More information about the jbosstools-commits mailing list