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

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Aug 13 19:04:41 EDT 2012


Author: akazakov
Date: 2012-08-13 19:04:40 -0400 (Mon, 13 Aug 2012)
New Revision: 43015

Added:
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/AYTDefenitionErrorsValidationTest.java
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CDIAnnotationTest.java
   trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/validation/AbstractAnnotationTest.java
   trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/IAnnotationTest.java
Modified:
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
   trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java
   trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/AsYouTypeValidatorManager.java
   trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java
   trunk/common/tests/org.jboss.tools.common.base.test/META-INF/MANIFEST.MF
   trunk/tests/plugins/org.jboss.tools.tests/.classpath
   trunk/tests/plugins/org.jboss.tools.tests/META-INF/MANIFEST.MF
   trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java
Log:
https://issues.jboss.org/browse/JBIDE-10611 As-you-type CDI validation

Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java	2012-08-13 22:32:45 UTC (rev 43014)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java	2012-08-13 23:04:40 UTC (rev 43015)
@@ -54,6 +54,7 @@
 import org.jboss.tools.cdi.core.test.tck.lookup.ResolutionByNameTest;
 import org.jboss.tools.cdi.core.test.tck.lookup.ResolutionByTypeTest;
 import org.jboss.tools.cdi.core.test.tck.lookup.UnsatisfiedDependencyTest;
+import org.jboss.tools.cdi.core.test.tck.validation.AYTDefenitionErrorsValidationTest;
 import org.jboss.tools.cdi.core.test.tck.validation.AnnotationsValidationTest;
 import org.jboss.tools.cdi.core.test.tck.validation.BeansXmlValidationTest;
 import org.jboss.tools.cdi.core.test.tck.validation.BuilderOrderValidationTest;
@@ -121,7 +122,7 @@
 		suite.addTestSuite(CoreTest.class);
 		suite.addTestSuite(ResourceExclusionTest.class);
 
-		// Validation tests
+		// Marker validation tests
 		suite.addTestSuite(DefenitionErrorsValidationTest.class);
 		suite.addTestSuite(DeploymentProblemsValidationTests.class);
 		suite.addTestSuite(BeansXmlValidationTest.class);
@@ -130,7 +131,10 @@
 		suite.addTestSuite(ELValidationTest.class);
 		suite.addTestSuite(SuppressWarningsTests.class);
 		suite.addTestSuite(IncrementalValidationTest.class);
-		
+
+		// As-you-type validation tests
+		suite.addTestSuite(AYTDefenitionErrorsValidationTest.class);
+
 		// Refactoring test
 		suite.addTestSuite(NamedBeanRefactoringTest.class);
 

Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/AYTDefenitionErrorsValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/AYTDefenitionErrorsValidationTest.java	                        (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/AYTDefenitionErrorsValidationTest.java	2012-08-13 23:04:40 UTC (rev 43015)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core.test.tck.validation;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.tests.IAnnotationTest;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class AYTDefenitionErrorsValidationTest extends DefenitionErrorsValidationTest {
+
+	private CDIAnnotationTest annotationTest = new CDIAnnotationTest();
+
+	protected IAnnotationTest getAnnotationTest() {
+		return annotationTest;
+	}
+
+	@Override
+	public void testBeanDoesNotHaveSomeTypeOfSpecializedBean() throws Exception {
+		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/specialization/MissingTypeBeanBroken.java");
+		annotationTest.assertAnnotationsEqualToMarkers(file);
+	}
+}
\ No newline at end of file


Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/AYTDefenitionErrorsValidationTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: 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	                        (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CDIAnnotationTest.java	2012-08-13 23:04:40 UTC (rev 43015)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+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 {
+
+	@Override
+	protected String getMarkerType() {
+		return CDICoreValidator.PROBLEM_TYPE;
+	}
+}
\ No newline at end of file


Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CDIAnnotationTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java	2012-08-13 22:32:45 UTC (rev 43014)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java	2012-08-13 23:04:40 UTC (rev 43015)
@@ -18,12 +18,19 @@
 import org.eclipse.osgi.util.NLS;
 import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
 import org.jboss.tools.tests.AbstractResourceMarkerTest;
+import org.jboss.tools.tests.IAnnotationTest;
 
 /**
  * @author Alexey Kazakov
  */
 public class DefenitionErrorsValidationTest extends ValidationTest {
 
+	private IAnnotationTest annotationTest = new AbstractResourceMarkerTest();
+
+	protected IAnnotationTest getAnnotationTest() {
+		return annotationTest;
+	}
+
 	/**
 	 * 2.2.2. Restricting the bean types of a bean
 	 *	      - bean class or producer method or field specifies a @Typed annotation, 
@@ -34,7 +41,7 @@
 	 */
 	public void testLegalTypesInTyped() throws Exception {
 		IFile petShopFile = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/PetShop.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(petShopFile, CDIValidationMessages.ILLEGAL_TYPE_IN_TYPED_DECLARATION, 25);
+		getAnnotationTest().assertAnnotationIsCreated(petShopFile, CDIValidationMessages.ILLEGAL_TYPE_IN_TYPED_DECLARATION, 25);
 	}
 
 	/**
@@ -45,7 +52,7 @@
 	 */
 	public void testInterceptorWithWrongScope() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/InterceptorWithWrongScopeBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_INTERCEPTOR, 8);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_INTERCEPTOR, 8);
 	}
 
 	/**
@@ -56,7 +63,7 @@
 	 */
 	public void testDecoratorWithWrongScope() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/DecoratorWithWrongScopeBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_DECORATOR, 7);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_DECORATOR, 7);
 	}
 
 	/**
@@ -67,7 +74,7 @@
 	 */
 	public void testMultipleBeanScope() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/scope/broken/tooManyScopes/BeanWithTooManyScopeTypes_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.MULTIPLE_SCOPE_TYPE_ANNOTATIONS_IN_BEAN_CLASS, 22, 23);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.MULTIPLE_SCOPE_TYPE_ANNOTATIONS_IN_BEAN_CLASS, 22, 23);
 	}
 
 	/**
@@ -79,7 +86,7 @@
 	 */
 	public void testBeanWithMultipleScopedStereotypes() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/scopeConflict/Scallop_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.MISSING_SCOPE_WHEN_THERE_IS_NO_DEFAULT_SCOPE, 24, 25);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.MISSING_SCOPE_WHEN_THERE_IS_NO_DEFAULT_SCOPE, 24, 25);
 	}
 
 	/**
@@ -90,9 +97,9 @@
 	 */
 	public void testNamedInterceptor() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/NamedInterceptorBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.INTERCEPTOR_HAS_NAME, 9);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.INTERCEPTOR_HAS_NAME, 9);
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/NamedStereotypedInterceptorBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.INTERCEPTOR_HAS_NAME, 7);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.INTERCEPTOR_HAS_NAME, 7);
 	}
 
 	/**
@@ -103,9 +110,9 @@
 	 */
 	public void testNamedDecorator() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/NamedDecoratorBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.DECORATOR_HAS_NAME, 10);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.DECORATOR_HAS_NAME, 10);
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/NamedStereotypedDecoratorBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.DECORATOR_HAS_NAME, 8);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.DECORATOR_HAS_NAME, 8);
 	}
 
 	/**
@@ -116,7 +123,7 @@
 	 */
 	public void testAlternativeInterceptor() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/AlternativeInterceptorBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.INTERCEPTOR_IS_ALTERNATIVE, 7);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.INTERCEPTOR_IS_ALTERNATIVE, 7);
 	}
 
 	/**
@@ -127,7 +134,7 @@
 	 */
 	public void testAlternativeDecorator() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/AlternativeDecoratorBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.DECORATOR_IS_ALTERNATIVE, 7);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.DECORATOR_IS_ALTERNATIVE, 7);
 	}
 
 	/**
@@ -138,7 +145,7 @@
 	 */
 	public void testStereotypeScope() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyScopes/StereotypeWithTooManyScopeTypes_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.STEREOTYPE_DECLARES_MORE_THAN_ONE_SCOPE, 32, 33);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.STEREOTYPE_DECLARES_MORE_THAN_ONE_SCOPE, 32, 33);
 	}
 
 	/**
@@ -149,7 +156,7 @@
 	 */
 	public void testNonEmptyNamedForStereotype() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/nonEmptyNamed/StereotypeWithNonEmptyNamed_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.STEREOTYPE_DECLARES_NON_EMPTY_NAME, 31);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.STEREOTYPE_DECLARES_NON_EMPTY_NAME, 31);
 	}
 
 	/**
@@ -160,7 +167,7 @@
 	 */
 	public void testAnnotatedStereotype() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/withBindingType/StereotypeWithBindingTypes_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_QUALIFIER_IN_STEREOTYPE, 30);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_QUALIFIER_IN_STEREOTYPE, 30);
 	}
 
 	/**
@@ -171,7 +178,7 @@
 	 */
 	public void testTypedStereotype() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/withBindingType/StereotypeWithTyped_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.STEREOTYPE_IS_ANNOTATED_TYPED, 15);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.STEREOTYPE_IS_ANNOTATED_TYPED, 15);
 	}
 
 	/**
@@ -182,7 +189,7 @@
 	 */
 	public void testInterceptorCanNotAlsoBeDecorator() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/interceptors/definition/broken/interceptorCanNotBeDecorator/InterceptingDecorator.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.BOTH_INTERCEPTOR_AND_DECORATOR, 24, 25);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.BOTH_INTERCEPTOR_AND_DECORATOR, 24, 25);
 	}
 
 	/**
@@ -193,7 +200,7 @@
 	 */
 	public void testNonDependentScopedBeanCanNotHavePublicField() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/simple/definition/dependentWithPublicField/Leopard_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD, 25);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD, 25);
 	}
 
 	/**
@@ -204,7 +211,7 @@
 	 */
 	public void testNonDependentGenericManagedBeanNotOk() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/bean/genericbroken/FooBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_GENERIC_TYPE, 21);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_GENERIC_TYPE, 21);
 	}
 
 	/**
@@ -216,7 +223,7 @@
 	 */
 	public void testSpecializingClassExtendsNonSimpleBean() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend3/Cow_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, 21);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, 21);
 	}
 
 	/**
@@ -228,7 +235,7 @@
 	 */
 	public void testSpecializingClassDirectlyExtendsNothing() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend2/Cow_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, 21);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, 21);
 	}
 
 	/**
@@ -240,7 +247,7 @@
 	 */
 	public void testSpecializingClassDirectlyExtendsEnterpriseBean() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/extendejb/Tractor_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, 21);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, 21);
 	}
 
 	/**
@@ -252,7 +259,7 @@
 	 */
 	public void testSpecializingClassImplementsInterfaceAndExtendsNothing() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend1/Donkey_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, 21);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, 21);
 	}
 
 	/**
@@ -264,7 +271,7 @@
 	 */
 	public void testStatelessWithRequestScopeFails() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/statelessWithRequestScope/Beagle_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
 	}
 
 	/**
@@ -276,7 +283,7 @@
 	 */
 	public void testStatelessWithApplicationScopeFails() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/Dachshund_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
 	}
 
 	/**
@@ -288,7 +295,7 @@
 	 */
 	public void testStatelessWithConversationScopeFails() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/statelessWithConversationScope/Boxer_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
 	}
 
 	/**
@@ -300,7 +307,7 @@
 	 */
 	public void testStatelessWithSessionScopeFails() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/statelessWithSessionScope/Bullmastiff_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
 	}
 
 
@@ -313,7 +320,7 @@
 	 */
 	public void testSingletonWithConversationScopeFails() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/Husky_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, 24);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, 24);
 	}
 
 	/**
@@ -325,7 +332,7 @@
 	 */
 	public void testSingletonWithSessionScopeFails() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithSessionScope/IrishTerrier_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, 25);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, 25);
 	}
 
 	/**
@@ -337,7 +344,7 @@
 	 */
 	public void testSingletonWithRequestScopeFails() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithRequestScope/Greyhound_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, 23);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, 23);
 	}
 
 	/**
@@ -348,7 +355,7 @@
 	 */
 	public void testSessionBeanAnnotatedInterceptor() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedInterceptorBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.SESSION_BEAN_ANNOTATED_INTERCEPTOR, 8, 9);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.SESSION_BEAN_ANNOTATED_INTERCEPTOR, 8, 9);
 	}
 
 	/**
@@ -359,7 +366,7 @@
 	 */
 	public void testSessionBeanAnnotatedDecorator() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedDecoratorBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.SESSION_BEAN_ANNOTATED_DECORATOR, 6, 7);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.SESSION_BEAN_ANNOTATED_DECORATOR, 6, 7);
 	}
 
 	/**
@@ -370,7 +377,7 @@
 	 */
 	public void testNonDependentGenericSessionBeanNotOk() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/sessionbeans/FooBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_SESSION_BEAN_WITH_GENERIC_TYPE, 6);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_SESSION_BEAN_WITH_GENERIC_TYPE, 6);
 	}
 
 	/**
@@ -381,7 +388,7 @@
 	 */
 	public void testSpecializingClassDirectlyExtendsSimpleBean() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/directlyExtendsSimpleBean/Tractor_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, 22);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, 22);
 	}
 	
 	/**
@@ -392,7 +399,7 @@
 	 */
 	public void testSpecializingEnterpriseClassImplementsInterfaceAndExtendsNothing() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/implementInterfaceAndExtendsNothing/Donkey_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, 22);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, 22);
 	}
 
 	/**
@@ -403,7 +410,7 @@
 	 */
 	public void testSpecializingEnterpriseClassDirectlyExtendsNothing() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/directlyExtendsNothing/Cow_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, 22);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, 22);
 	}
 
 	/**
@@ -417,7 +424,7 @@
 	 */
 	public void testParameterizedReturnTypeWithWildcard() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterizedTypeWithWildcard/SpiderProducer.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD, 24);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD, 24);
 	}
 
 	/**
@@ -431,9 +438,9 @@
 	 */
 	public void testParameterizedType() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterizedTypeWithTypeParameter2/TProducer.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, 25);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, 25);
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/SpiderProducerVariableType_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, 13);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, 13);
 	}
 
 	/**
@@ -444,10 +451,10 @@
 	 */
 	public void testParameterizedReturnTypeWithWrongScope() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/ParameterizedTypeWithWrongScope_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 29, 43);
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 25);
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 35);
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 39);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 29, 43);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 25);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 35);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 39);
 	}
 
 	/**
@@ -457,8 +464,8 @@
 	 */
 	public void testParameterizedReturnTypeWithoutTypeVariableOk() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/ParameterizedTypeWithWrongScope_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 52);
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 57);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 52);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, 57);
 	}
 
 	/**
@@ -469,7 +476,7 @@
 	 */
 	public void testInitializerMethodAnnotatedProduces() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/initializer/broken/methodAnnotatedProduces/Pheasant_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_ANNOTATED_INJECT, 25);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.PRODUCER_ANNOTATED_INJECT, 25);
 	}
 
 	/**
@@ -480,7 +487,7 @@
 	 */
 	public void testProducerMethodWithParameterAnnotatedDisposes() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterAnnotatedDisposes/SpiderProducer_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_DISPOSES, 25, 26);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_DISPOSES, 25, 26);
 	}
 
 	/**
@@ -491,7 +498,7 @@
 	 */
 	public void testProducerMethodWithParameterAnnotatedObserves() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/parameterAnnotatedObserves/SpiderProducer_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_OBSERVES, 25, 26);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_OBSERVES, 25, 26);
 	}
 
 	/**
@@ -503,7 +510,7 @@
 	public void testProducerMethodOnSessionBeanMustBeBusinessMethod() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/FooProducer.java");
 		String bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN, new String[]{"createFoo", "FooProducer"});
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, bindedErrorMessage, 25);
+		getAnnotationTest().assertAnnotationIsCreated(file, bindedErrorMessage, 25);
 	}
 
 	/**
@@ -516,7 +523,7 @@
 	public void testProducerMethodOnSessionBeanMustBeBusinessMethodWithoutLocalInterface() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/WidgetRepositoryProducerOk.java");
 		String bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN, new String[]{"retrieveEntityManager", "WidgetRepositoryProducerOk"});
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, bindedErrorMessage, 14);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, bindedErrorMessage, 14);
 	}
 
 	/**
@@ -529,7 +536,7 @@
 	public void testProducerMethodOnLocalBeanMustBeBusinessMethodBroken() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/NotBusinessMethod_Broken.java");
 		String bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN, new String[]{"retrieveEntityManager", "NotBusinessMethod_Broken"});
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, bindedErrorMessage, 13);
+		getAnnotationTest().assertAnnotationIsCreated(file, bindedErrorMessage, 13);
 	}
 
 	/**
@@ -543,7 +550,7 @@
 	public void testProducerMethodOnLocalBeanMustBeBusinessMethodOk() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/DisposerOk.java");
 		String bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN, new String[]{"retrieveEntityManager", "DisposerOk"});
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, bindedErrorMessage, 15);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, bindedErrorMessage, 15);
 	}
 
 	/**
@@ -554,7 +561,7 @@
 	 */
 	public void testDecoratorMustNotHaveProducerMethod() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/DecoratorHasProducerMethodBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_IN_DECORATOR, 10);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.PRODUCER_IN_DECORATOR, 10);
 	}
 
 	/**
@@ -565,7 +572,7 @@
 	 */
 	public void testInterceptorMustNotHaveProducerMethod() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/InterceptorHasProducerMethodBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_IN_INTERCEPTOR, 17);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.PRODUCER_IN_INTERCEPTOR, 17);
 	}
 
 	/**
@@ -576,7 +583,7 @@
 	 */
 	public void testSpecializedStaticMethod() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/specializesStaticMethod/FurnitureShop_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_STATIC, 24);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_STATIC, 24);
 	}
 
 	/**
@@ -587,7 +594,7 @@
 	 */
 	public void testSpecializedMethodIndirectlyOverridesAnotherProducerMethod() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/indirectOverride/ShoeShop_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_OVERRIDE, 24);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_OVERRIDE, 24);
 	}
 
 	/**
@@ -598,7 +605,7 @@
 	 */
 	public void testMultipleDisposeParameters() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/multiParams/SpiderProducer_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.MULTIPLE_DISPOSING_PARAMETERS, 30, 30);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.MULTIPLE_DISPOSING_PARAMETERS, 30, 30);
 	}
 
 	/**
@@ -609,7 +616,7 @@
 	 */
 	public void testProducesUnallowed() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/producesUnallowed/SpiderProducer_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_DISPOSES, 30, 31);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_DISPOSES, 30, 31);
 	}
 
 	/**
@@ -620,7 +627,7 @@
 	 */
 	public void testObserverParameterUnallowed() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/observesUnallowed/SpiderProducer_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, 32, 32);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, 32, 32);
 	}
 
 	/**
@@ -631,7 +638,7 @@
 	 */
 	public void testInitializerUnallowed() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/initializerUnallowed/SpiderProducer_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.DISPOSER_ANNOTATED_INJECT, 32, 33);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.DISPOSER_ANNOTATED_INJECT, 32, 33);
 	}
 
 	/**
@@ -643,10 +650,10 @@
 	public void testDisposalMethodNotBusinessOrStatic() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/methodOnSessionBean/AppleTree.java");
 		String bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_DISPOSER_IN_SESSION_BEAN, new String[]{"recycle", "AppleTree"});
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, bindedErrorMessage, 31);
+		getAnnotationTest().assertAnnotationIsCreated(file, bindedErrorMessage, 31);
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Fox.java");
 		bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_DISPOSER_IN_SESSION_BEAN, new String[]{"disposeLitter", "Fox"});
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, bindedErrorMessage, 73);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, bindedErrorMessage, 73);
 	}
 
 	/**
@@ -659,7 +666,7 @@
 	public void testDisposalMethodNotBusinessOrStaticWithoutLocalInterface() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/WidgetRepositoryProducerOk.java");
 		String bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_DISPOSER_IN_SESSION_BEAN, new String[]{"disposeEntityManager", "WidgetRepositoryProducerOk"});
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, bindedErrorMessage, 18);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, bindedErrorMessage, 18);
 	}
 
 	/**
@@ -672,7 +679,7 @@
 	public void testDisposalMethodOnLocalBeanMustBeBusinessMethodBroken() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/NotBusinessMethod_Broken.java");
 		String bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_DISPOSER_IN_SESSION_BEAN, new String[]{"disposeEntityManager", "NotBusinessMethod_Broken"});
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, bindedErrorMessage, 18);
+		getAnnotationTest().assertAnnotationIsCreated(file, bindedErrorMessage, 18);
 	}
 
 	/**
@@ -686,7 +693,7 @@
 	public void testDisposalMethodOnLocalBeanMustBeBusinessMethodOk() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/DisposerOk.java");
 		String bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_DISPOSER_IN_SESSION_BEAN, new String[]{"disposeEntityManager", "DisposerOk"});
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, bindedErrorMessage, 20);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, bindedErrorMessage, 20);
 	}
 
 	/**
@@ -697,7 +704,7 @@
 	 */
 	public void testDecoratorDeclaresDisposer() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/TimestampLogger.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.DISPOSER_IN_DECORATOR, 6, 9);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.DISPOSER_IN_DECORATOR, 6, 9);
 	}
 
 	/**
@@ -708,7 +715,7 @@
 	 */
 	public void testInterceptorDeclaresDisposer() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/FordInterceptor.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.DISPOSER_IN_INTERCEPTOR, 8, 16);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.DISPOSER_IN_INTERCEPTOR, 8, 16);
 	}
 
 	/**
@@ -719,8 +726,8 @@
 	 */
 	public void testUnresolvedDisposalMethod() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/unresolvedMethod/SpiderProducer_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.NO_PRODUCER_MATCHING_DISPOSER, 35);
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.NO_PRODUCER_MATCHING_DISPOSER, 31);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.NO_PRODUCER_MATCHING_DISPOSER, 35);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.NO_PRODUCER_MATCHING_DISPOSER, 31);
 	}
 
 	/**
@@ -731,7 +738,7 @@
 	 */
 	public void testMultipleDisposersForProducer() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/disposers/TimestampLogger_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.MULTIPLE_DISPOSERS_FOR_PRODUCER, 13, 16);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.MULTIPLE_DISPOSERS_FOR_PRODUCER, 13, 16);
 	}
 
 	/**
@@ -742,8 +749,8 @@
 	 */
 	public void testParameterizedTypeWithWildcard() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/broken/parameterizedReturnTypeWithWildcard/SpiderProducerWildCardType_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreatedForGivenPosition(file, CDIValidationMessages.PRODUCER_FIELD_TYPE_HAS_WILDCARD, 23, 1011, 1026);
-		AbstractResourceMarkerTest.assertMarkerIsCreatedForGivenPosition(file, CDIValidationMessages.PRODUCER_FIELD_TYPE_HAS_WILDCARD, 24, 1100, 1125);
+		getAnnotationTest().assertAnnotationIsCreatedForGivenPosition(file, CDIValidationMessages.PRODUCER_FIELD_TYPE_HAS_WILDCARD, 23, 1011, 1026);
+		getAnnotationTest().assertAnnotationIsCreatedForGivenPosition(file, CDIValidationMessages.PRODUCER_FIELD_TYPE_HAS_WILDCARD, 24, 1100, 1125);
 	}
 
 	/**
@@ -754,7 +761,7 @@
 	 */
 	public void testTypeVariable() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/SpiderProducerVariableType_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_FIELD_TYPE_IS_VARIABLE, 10);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.PRODUCER_FIELD_TYPE_IS_VARIABLE, 10);
 	}
 
 	/**
@@ -765,10 +772,10 @@
 	 */
 	public void testParameterizedTypeWithWrongScope() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/ParameterizedTypeWithWrongScope_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD, 15, 22);
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD, 13);
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD, 18);
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD, 20);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD, 15, 22);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD, 13);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD, 18);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD, 20);
 	}
 
 	/**
@@ -782,7 +789,7 @@
 	 */
 	public void testProducerAnnotatedInject() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/ProducerAnnotatedInjectBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_ANNOTATED_INJECT, 8);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.PRODUCER_ANNOTATED_INJECT, 8);
 	}
 
 	/**
@@ -793,7 +800,7 @@
 	 */
 	public void testNonStaticProducerOfSessionBean() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/NonStaticProducerOfSessionBeanBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN, 9);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN, 9);
 	}
 
 	/**
@@ -804,7 +811,7 @@
 	 */
 	public void testDecoratorMustNotHaveProducerField() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/DecoratorHasProducerFieldBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_IN_DECORATOR, 9);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.PRODUCER_IN_DECORATOR, 9);
 	}
 
 	/**
@@ -815,7 +822,7 @@
 	 */
 	public void testInterceptorMustNotHaveProducerField() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/InterceptorHasProducerFieldBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_IN_INTERCEPTOR, 16);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.PRODUCER_IN_INTERCEPTOR, 16);
 	}
 
 	/**
@@ -826,7 +833,7 @@
 	 */
 	public void testResourceWithELName() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/resources/ProducerFieldsBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.RESOURCE_PRODUCER_FIELD_SETS_EL_NAME, 15, 19, 24, 27, 31);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.RESOURCE_PRODUCER_FIELD_SETS_EL_NAME, 15, 19, 24, 27, 31);
 	}
 
 	/*
@@ -851,7 +858,7 @@
 	 */
 	public void testTooManyInitializerAnnotatedConstructor() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/simple/definition/tooManyInitializerAnnotatedConstructors/Goose_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.MULTIPLE_INJECTION_CONSTRUCTORS, 24, 29);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.MULTIPLE_INJECTION_CONSTRUCTORS, 24, 29);
 	}
 
 	/**
@@ -862,7 +869,7 @@
 	 */
 	public void testConstructorHasDisposesParameter() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/simple/definition/constructorHasDisposesParameter/DisposingConstructor.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.CONSTRUCTOR_PARAMETER_ANNOTATED_DISPOSES, 24, 25);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.CONSTRUCTOR_PARAMETER_ANNOTATED_DISPOSES, 24, 25);
 	}
 
 	/**
@@ -873,7 +880,7 @@
 	 */
 	public void testConstructorHasObservesParameter() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/simple/definition/constructorHasObservesParameter/ObservingConstructor.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.CONSTRUCTOR_PARAMETER_ANNOTATED_OBSERVES, 25, 26);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.CONSTRUCTOR_PARAMETER_ANNOTATED_OBSERVES, 25, 26);
 	}
 
 	/**
@@ -884,7 +891,7 @@
 	 */
 	public void testStaticInitializerMethod() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/GenericInitializerMethodBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.STATIC_METHOD_ANNOTATED_INJECT, 11);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.STATIC_METHOD_ANNOTATED_INJECT, 11);
 	}
 
 	/**
@@ -895,8 +902,8 @@
 	 */
 	public void testInitializerMethodHasParameterAnnotatedDisposes() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/initializer/broken/parameterAnnotatedDisposes/Capercaillie_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreatedForGivenPosition(file, CDIValidationMessages.DISPOSER_ANNOTATED_INJECT, 25, 1003, 1010);
-		AbstractResourceMarkerTest.assertMarkerIsCreatedForGivenPosition(file, CDIValidationMessages.DISPOSER_ANNOTATED_INJECT, 26, 1048, 1057);
+		getAnnotationTest().assertAnnotationIsCreatedForGivenPosition(file, CDIValidationMessages.DISPOSER_ANNOTATED_INJECT, 25, 1003, 1010);
+		getAnnotationTest().assertAnnotationIsCreatedForGivenPosition(file, CDIValidationMessages.DISPOSER_ANNOTATED_INJECT, 26, 1048, 1057);
 	}
 
 	/**
@@ -907,7 +914,7 @@
 	 */
 	public void testGenericInitializerMethod() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/GenericInitializerMethodBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.GENERIC_METHOD_ANNOTATED_INJECT, 7);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.GENERIC_METHOD_ANNOTATED_INJECT, 7);
 	}
 
 	/**
@@ -918,7 +925,7 @@
 	 */
 	public void testNamedInjectPoint() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/NamedInjectionBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PARAM_INJECTION_DECLARES_EMPTY_NAME, 10, 16);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.PARAM_INJECTION_DECLARES_EMPTY_NAME, 10, 16);
 	}
 
 	/**
@@ -938,8 +945,8 @@
 			assertTrue(lines.contains(new Integer(6)));
 		}
 
-//		AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.MISSING_TYPE_IN_SPECIALIZING_BEAN, "MissingTypeBeanBroken", "Farmer", "Farmer"), 6);
-//		AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.MISSING_TYPE_IN_SPECIALIZING_BEAN, "MissingTypeBeanBroken", "Farmer", "Simple"), 6);
+//		getAnnotationTest().assertAnnotationIsCreated(file, MessageFormat.format(CDIValidationMessages.MISSING_TYPE_IN_SPECIALIZING_BEAN, "MissingTypeBeanBroken", "Farmer", "Farmer"), 6);
+//		getAnnotationTest().assertAnnotationIsCreated(file, MessageFormat.format(CDIValidationMessages.MISSING_TYPE_IN_SPECIALIZING_BEAN, "MissingTypeBeanBroken", "Farmer", "Simple"), 6);
 	}
 
 	/**
@@ -950,7 +957,7 @@
 	 */
 	public void testSpecializingAndSpecializedBeanHasName() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/specializingAndSpecializedBeanHaveName/HighSchool_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.CONFLICTING_NAME_IN_SPECIALIZING_BEAN, "HighSchool_Broken.getStarPupil()", "School.getStarPupil()"), 25);
+		getAnnotationTest().assertAnnotationIsCreated(file, MessageFormat.format(CDIValidationMessages.CONFLICTING_NAME_IN_SPECIALIZING_BEAN, "HighSchool_Broken.getStarPupil()", "School.getStarPupil()"), 25);
 	}
 
 	/**
@@ -961,7 +968,7 @@
 	 */
 	public void testSpecializingInterceptor() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/specialization/SpecializingInterceptorBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.INTERCEPTOR_ANNOTATED_SPECIALIZES, 9);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.INTERCEPTOR_ANNOTATED_SPECIALIZES, 9);
 	}
 
 	/**
@@ -972,7 +979,7 @@
 	 */
 	public void testSpecializingDecorator() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/specialization/SpecializingDecoratorBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.DECORATOR_ANNOTATED_SPECIALIZES, 10);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.DECORATOR_ANNOTATED_SPECIALIZES, 10);
 	}
 
 	/**
@@ -1002,7 +1009,7 @@
 	 */
 	public void testTypeVariableInjectionPoint() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/FarmBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.INJECTION_TYPE_IS_VARIABLE, 11, 15);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.INJECTION_TYPE_IS_VARIABLE, 11, 15);
 	}
 
 	/**
@@ -1013,7 +1020,7 @@
 	 */
 	public void testAnnotationMemberWithoutNonBinding() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/binding/members/annotation/Expensive_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER, 35);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER, 35);
 	}
 
 	/**
@@ -1024,7 +1031,7 @@
 	 */
 	public void testArrayMemberWithoutNonBinding() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/binding/members/array/Expensive_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER, 34);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER, 34);
 	}
 
 	/**
@@ -1035,7 +1042,7 @@
 	 */
 	public void testSessionScopedBeanWithInjectionPoint() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/injectionpoint/broken/normal/scope/Cat_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_WHEN_TYPE_INJECTIONPOINT_IS_INJECTED, 27);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_WHEN_TYPE_INJECTIONPOINT_IS_INJECTED, 27);
 	}
 
 	/**
@@ -1048,8 +1055,8 @@
 	 */
 	public void testBeansWithInjectionPointParams() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/producer/ProducerWInjections.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_WHEN_TYPE_INJECTIONPOINT_IS_INJECTED, 14, 24, 28, 31);
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_WHEN_TYPE_INJECTIONPOINT_IS_INJECTED, 18);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_WHEN_TYPE_INJECTIONPOINT_IS_INJECTED, 14, 24, 28, 31);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_WHEN_TYPE_INJECTIONPOINT_IS_INJECTED, 18);
 	}
 
 	/**
@@ -1060,7 +1067,7 @@
 	 */
 	public void testMultipleDelegateInjectionPoints() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/broken/multipleDelegateInjectionPoints/TimestampLogger.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.MULTIPLE_DELEGATE, 31, 32);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.MULTIPLE_DELEGATE, 31, 32);
 	}
 
 	/**
@@ -1071,9 +1078,9 @@
 	 */
 	public void testNoDelegateInjectionPoints() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/broken/noDelegateInjectionPoints/TimestampLogger.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.MISSING_DELEGATE, 25);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.MISSING_DELEGATE, 25);
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateInitializerMethod/TimestampLogger.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.MISSING_DELEGATE);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.MISSING_DELEGATE);
 	}
 
 	/**
@@ -1084,13 +1091,13 @@
 	 */
 	public void testDecoratorDelegateInjectionPoints() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateField/TimestampLogger.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE);
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateInitializerMethod/TimestampLogger.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE);
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateConstructor/TimestampLogger.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE);
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/broken/delegateProducerMethod/TimestampLogger.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE, 33);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_INJECTION_POINT_DELEGATE, 33);
 	}
 
 	/**
@@ -1101,13 +1108,13 @@
 	 */
 	public void testNonDecoratorWithDecoratesAnnotationNotOK() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/broken/nonDecoratorWithDecorates/Elf.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE, 24);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE, 24);
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateField/TimestampLogger.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE);
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateInitializerMethod/TimestampLogger.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE);
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/inject/delegateConstructor/TimestampLogger.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_BEAN_DECLARING_DELEGATE);
 	}
 
 	/**
@@ -1118,7 +1125,7 @@
 	 */
 	public void testNotAllDecoratedTypesImplemented() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/broken/notAllDecoratedTypesImplemented/TimestampLogger.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "EnhancedLogger"), 31);
+		getAnnotationTest().assertAnnotationIsCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "EnhancedLogger"), 31);
 	}
 
 	/**
@@ -1129,21 +1136,21 @@
 	 */
 	public void testAllDecoratedTypesImplemented() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampLogger.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Logger"));
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "EnhancedLogger"));
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "TimestampLogger"));
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Object"));
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "MockLogger"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Logger"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "EnhancedLogger"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "TimestampLogger"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Object"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "MockLogger"));
 
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampLoggerWithMethod.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Logger"));
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "EnhancedLogger"));
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "TimestampLogger"));
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Object"));
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "MockLogger"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Logger"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "EnhancedLogger"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "TimestampLogger"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Object"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "MockLogger"));
 
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/FooDecorator.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE.substring(0, 60) + ".*");
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE.substring(0, 60) + ".*");
 	}
 
 	/**
@@ -1154,7 +1161,7 @@
 	 */
 	public void testDelegateSpecifiesDifferentTypeParameterInInterfcaeInFiled() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "IClazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"), 10);
+		getAnnotationTest().assertAnnotationIsCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "IClazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"), 10);
 	}
 
 	/**
@@ -1165,7 +1172,7 @@
 	 */
 	public void testDelegateSpecifiesDifferentTypeParameterInInterfcaeInMethod() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampWithMethodBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "IClazz<java.lang.String>"), 10);
+		getAnnotationTest().assertAnnotationIsCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "IClazz<java.lang.String>"), 10);
 	}
 
 	/**
@@ -1179,7 +1186,7 @@
 	 */
 	public void testDelegateSpecifiesDifferentTypeParameterWithInterfaceInFiled() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampLoggerOk.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Clazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"), 10);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Clazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"), 10);
 	}
 
 	/**
@@ -1193,7 +1200,7 @@
 	 */
 	public void testDelegateSpecifiesDifferentTypeParameterWithInterfaceInMethod() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampLoggerWithMethodOk.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Clazz<java.lang.String>"), 10);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Clazz<java.lang.String>"), 10);
 	}
 
 	/**
@@ -1207,13 +1214,13 @@
 	 */
 	public void testDelegateSpecifiesDifferentTypeParameterInFiled() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampParametedLoggerOk.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Clazz<java.lang.String>"), 10);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Clazz<java.lang.String>"), 10);
 
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampParametedLogger.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Logger"));
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Clazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"));
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Test"));
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Object"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Logger"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Clazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Test"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Object"));
 	}
 
 	/**
@@ -1226,13 +1233,13 @@
 	 */
 	public void testDelegateSpecifiesDifferentTypeParameterInMethod() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampParametedLoggerWithMethodOk.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Clazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"), 10);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Clazz<org.jboss.jsr299.tck.tests.jbt.validation.decorators.delegates.Logger>"), 10);
 
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/delegates/TimestampParametedLoggerWithMethod.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Logger"));
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Clazz<java.lang.String>"));
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Test"));
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Object"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Logger"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Clazz<java.lang.String>"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Test"));
+		getAnnotationTest().assertAnnotationIsNotCreated(file, MessageFormat.format(CDIValidationMessages.DELEGATE_HAS_ILLEGAL_TYPE, "Object"));
 	}
 
 	/**
@@ -1243,10 +1250,10 @@
 	 */
 	public void testNoInterceptorBinfdingsInInterceptor() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/NoInterceptorBinfdingsInInterceptor.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.MISSING_INTERCEPTOR_BINDING, 7);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.MISSING_INTERCEPTOR_BINDING, 7);
 
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/interceptors/definition/SecureTransaction.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.MISSING_INTERCEPTOR_BINDING);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.MISSING_INTERCEPTOR_BINDING);
 	}
 
 	/**
@@ -1258,7 +1265,7 @@
 	 */
 	public void testInterceptorBinfdingsInInterceptorWithPreDestroyBroken() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/InterceptorWithPreDestroyBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING, 7);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING, 7);
 	}
 
 	/**
@@ -1270,7 +1277,7 @@
 	 */
 	public void testInterceptorBinfdingsInInterceptorWithPostConstructBroken() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/InterceptorWithPostConstructorBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING, 7);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING, 7);
 	}
 
 	/**
@@ -1281,9 +1288,9 @@
 	 */
 	public void testInterceptorBinfdingsInInterceptorWithLifeCycleMethodOk() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/InterceptorWithLifeCycleMethodOk.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING);
 		file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/CatInterceptor.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING);
 	}
 
 	/**
@@ -1294,7 +1301,7 @@
 	 */
 	public void testClassLevelInterceptorBindingWithFinalMethodBroken() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingWithFinalMethodBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD, 6);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD, 6);
 	}
 
 	/**
@@ -1305,7 +1312,7 @@
 	 */
 	public void testClassWithMethodLevelInterceptorBindingWithFinalMethodBroken() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingWithFinalMethodBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD, 6);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD, 6);
 	}
 
 	/**
@@ -1316,7 +1323,7 @@
 	 */
 	public void testFinalClassWithClassLevelInterceptorBindingBroken() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/FinalClassWithClassLevelInterceptorBindingBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS, 4);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS, 4);
 	}
 
 	/**
@@ -1327,7 +1334,7 @@
 	 */
 	public void testFinalClassWithMethodLevelInterceptorBindingBroken() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/FinalClassWithMethodLevelInterceptorBindingBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS, 3);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS, 3);
 	}
 
 	/**
@@ -1338,8 +1345,8 @@
 	 */
 	public void testClassLevelInterceptorBindingOk() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingOk.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS);
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD);
 	}
 
 	/**
@@ -1350,8 +1357,8 @@
 	 */
 	public void testClassWithMethodLevelInterceptorBindingOk() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingOk.java");
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS);
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD);
 	}
 
 	/**
@@ -1365,9 +1372,9 @@
 	 */
 	public void testInterceptorBindingsWithConflictingAnnotationMembersNotOk() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/interceptors/definition/broken/invalidBindingAnnotations/Foo.java");
-//		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.CONFLICTING_INTERCEPTOR_BINDINGS, 19, 20);
+//		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.CONFLICTING_INTERCEPTOR_BINDINGS, 19, 20);
 		//At present CDICoreValidator puts marker to class name 
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.CONFLICTING_INTERCEPTOR_BINDINGS, 21);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.CONFLICTING_INTERCEPTOR_BINDINGS, 21);
 	}
 
 	/**
@@ -1378,8 +1385,8 @@
 	 */
 	public void testAnnotationTypeMemberWithoutNonBindingInInterceptorByndingType() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/members/InterceptorBindingMemberBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, 19);
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, 20);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, 19);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, 20);
 	}
 
 	/**
@@ -1390,8 +1397,8 @@
 	 */
 	public void testArrayTypeMemberWithoutNonBindingInInterceptorByndingType() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/members/InterceptorBindingMemberBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, 21);
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, 22);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, 21);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, 22);
 	}
 
 	/**
@@ -1402,7 +1409,7 @@
 	 */
 	public void testObserverMethodMustHaveOnlyOneEventParameter() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/tooManyParameters/YorkshireTerrier_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.MULTIPLE_OBSERVING_PARAMETERS, 24, 24);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.MULTIPLE_OBSERVING_PARAMETERS, 24, 24);
 	}
 
 	/**
@@ -1413,7 +1420,7 @@
 	 */
 	public void testObserverMethodAnnotatedProducesFails() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/isProducer/BorderTerrier_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_OBSERVES, 25, 25);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_OBSERVES, 25, 25);
 	}
 
 	/**
@@ -1424,7 +1431,7 @@
 	 */
 	public void testObserverMethodAnnotatedInitializerFails() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/isInitializer/AustralianTerrier_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.OBSERVER_ANNOTATED_INJECT, 25, 26);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.OBSERVER_ANNOTATED_INJECT, 25, 26);
 	}
 
 	/**
@@ -1435,7 +1442,7 @@
 	 */
 	public void testObserverMethodWithDisposesParamFails() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/isDisposer/FoxTerrier_Broken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, 28, 28);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, 28, 28);
 	}
 
 	/**
@@ -1447,7 +1454,7 @@
 	public void testObserverMethodOnEnterpriseBeanNotBusinessMethodOrStaticFails() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/notBusinessMethod/TibetanTerrier_Broken.java");
 		String bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_OBSERVER_IN_SESSION_BEAN, new String[]{"observeSomeEvent", "TibetanTerrier_Broken"});
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, bindedErrorMessage, 25);
+		getAnnotationTest().assertAnnotationIsCreated(file, bindedErrorMessage, 25);
 	}
 
 	/**
@@ -1460,7 +1467,7 @@
 	public void testObserverMethodOnSingletonBeanIsBusinessMethodOk() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/observers/ClassFragmentLogger.java");
 		String bindedErrorMessage = NLS.bind(CDIValidationMessages.ILLEGAL_OBSERVER_IN_SESSION_BEAN, new String[]{"addEntry", "ClassFragmentLogger"});
-		AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, bindedErrorMessage, 21);
+		getAnnotationTest().assertAnnotationIsNotCreated(file, bindedErrorMessage, 21);
 	}
 
 	/**
@@ -1471,7 +1478,7 @@
 	 */
 	public void testObserverMethodInInterceptor() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/ObserverMethodInInterceptorBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.OBSERVER_IN_INTERCEPTOR, 10);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.OBSERVER_IN_INTERCEPTOR, 10);
 	}
 
 	/**
@@ -1482,7 +1489,7 @@
 	 */
 	public void testObserverMethodInDecorator() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/decorators/ObserverMethodInDecoratorBroken.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.OBSERVER_IN_DECORATOR, 14);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.OBSERVER_IN_DECORATOR, 14);
 	}
 
 	/**
@@ -1493,6 +1500,6 @@
 	 */
 	public void testDependentBeanWithConditionalObserverMethodIsDefinitionError() throws Exception {
 		IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/dependentIsConditionalObserver/AlarmSystem.java");
-		AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_CONDITIONAL_OBSERVER, 24);
+		getAnnotationTest().assertAnnotationIsCreated(file, CDIValidationMessages.ILLEGAL_CONDITIONAL_OBSERVER, 24);
 	}
 }
\ No newline at end of file

Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/AsYouTypeValidatorManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/AsYouTypeValidatorManager.java	2012-08-13 22:32:45 UTC (rev 43014)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/AsYouTypeValidatorManager.java	2012-08-13 23:04:40 UTC (rev 43015)
@@ -130,8 +130,8 @@
 		job.schedule();
 	}
 
-	private boolean init(IValidationContext helper, IReporter reporter) {
-		if(disabled) {
+	private boolean init(IValidationContext helper, IReporter reporter, boolean test) {
+		if(!test && disabled) {
 			return false;
 		}
 		if(context==null) {
@@ -182,7 +182,11 @@
 	 * @param reporter
 	 */
 	public void validateString(Collection<IRegion> dirtyRegions, IValidationContext helper, IReporter reporter) {
-		if(!init(helper, reporter)) {
+		validateString(dirtyRegions, helper, reporter, false);
+	}
+
+	protected void validateString(Collection<IRegion> dirtyRegions, IValidationContext helper, IReporter reporter, boolean test) {
+		if(!init(helper, reporter, test)) {
 			return;
 		}
 		validate(context.getStringValidators(), dirtyRegions, helper, reporter);
@@ -196,7 +200,11 @@
 	 * @param reporter
 	 */
 	public void validateJavaElement(Collection<IRegion> dirtyRegions, IValidationContext helper, IReporter reporter) {
-		if(!init(helper, reporter)) {
+		validateJavaElement(dirtyRegions, helper, reporter, false);
+	}
+
+	protected void validateJavaElement(Collection<IRegion> dirtyRegions, IValidationContext helper, IReporter reporter, boolean test) {
+		if(!init(helper, reporter, test)) {
 			return;
 		}
 		validate(context.getJavaElementValidators(), dirtyRegions, helper, reporter);
@@ -210,7 +218,7 @@
 	public void validate(IRegion dirtyRegion, IValidationContext helper, IReporter reporter) {
 		if(count==0) {
 			// Don't validate the file first time since WTP invokes the validator right after connection. 
-			init(helper, reporter);
+			init(helper, reporter, false);
 			count++;
 		} else {
 			List<IRegion> regions = new ArrayList<IRegion>();

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-08-13 22:32:45 UTC (rev 43014)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java	2012-08-13 23:04:40 UTC (rev 43015)
@@ -48,6 +48,8 @@
  */
 abstract public class TempMarkerManager extends ValidationErrorManager {
 
+	public static final String MESSAGE_TYPE_ATTRIBUTE_NAME = "jbt.type";
+
 	protected boolean asYouTypeValidation;
 	protected int messageCounter;
 
@@ -136,14 +138,17 @@
 	}
 
 	public IMessage addMessage(IResource target, int lineNumber, ITextSourceReference location, String preferenceKey, String textMessage, String[] messageArguments) {
-		int severity = getSeverity(preferenceKey, target);
 		IMessage message = null;
-		try {
-			if(severity!=-1 && (severity!=IMessage.NORMAL_SEVERITY || !hasSuppressWarningsAnnotation(preferenceKey, location))) {
-				message = addMesssage(target, lineNumber, location.getStartPosition(), location.getLength(), severity, preferenceKey, textMessage, messageArguments);
+		IResource actualTarget = location.getResource();
+		if(target.equals(actualTarget)) {
+			int severity = getSeverity(preferenceKey, target);
+			try {
+				if(severity!=-1 && (severity!=IMessage.NORMAL_SEVERITY || !hasSuppressWarningsAnnotation(preferenceKey, location))) {
+					message = addMesssage(target, lineNumber, location.getStartPosition(), location.getLength(), severity, preferenceKey, textMessage, messageArguments);
+				}
+			} catch (JavaModelException e) {
+				CommonPlugin.getDefault().logError(e);
 			}
-		} catch (JavaModelException e) {
-			CommonPlugin.getDefault().logError(e);
 		}
 		return message;
 	}
@@ -178,6 +183,10 @@
 				message.setAttribute(PREFERENCE_KEY_ATTRIBUTE_NAME, preferenceKey);
 				message.setAttribute(PREFERENCE_PAGE_ID_NAME, preferencePageId);
 			}
+			String type = getMarkerType();
+			if(type!=null) {
+				message.setAttribute(MESSAGE_TYPE_ATTRIBUTE_NAME, type);
+			}
 		}
 		return message;
 	}

Modified: trunk/common/tests/org.jboss.tools.common.base.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.base.test/META-INF/MANIFEST.MF	2012-08-13 22:32:45 UTC (rev 43014)
+++ trunk/common/tests/org.jboss.tools.common.base.test/META-INF/MANIFEST.MF	2012-08-13 23:04:40 UTC (rev 43015)
@@ -36,7 +36,8 @@
  org.eclipse.ltk.core.refactoring;bundle-version="3.5.0",
  org.jboss.tools.common.model;bundle-version="3.3.0",
  org.eclipse.search;bundle-version="3.7.0",
- org.jboss.tools.common.ui
+ org.jboss.tools.common.ui,
+ org.jboss.tools.common.model.ui
 Bundle-Version: 3.4.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ClassPath: .

Added: trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/validation/AbstractAnnotationTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/validation/AbstractAnnotationTest.java	                        (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/validation/AbstractAnnotationTest.java	2012-08-13 23:04:40 UTC (rev 43015)
@@ -0,0 +1,275 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.base.test.validation;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
+import org.eclipse.wst.validation.internal.provisional.core.IValidator;
+import org.jboss.tools.common.base.test.BaseTestPlugin;
+import org.jboss.tools.common.util.IEditorWrapper;
+import org.jboss.tools.common.validation.AsYouTypeValidatorManager;
+import org.jboss.tools.common.validation.TempMarkerManager;
+import org.jboss.tools.test.util.WorkbenchUtils;
+import org.jboss.tools.tests.AbstractResourceMarkerTest;
+import org.jboss.tools.tests.IAnnotationTest;
+
+/**
+ * @author Alexey Kazakov
+ */
+public abstract class AbstractAnnotationTest extends TestCase implements IAnnotationTest {
+
+	private Set<IResource> validatedResources = new HashSet<IResource>();
+
+	protected abstract String getMarkerType();
+
+	private ISourceViewer getTextViewer(IEditorPart editorPart) {
+		ISourceViewer viewer = null;
+		ITextEditor textEditor = null;
+		if (editorPart instanceof IEditorWrapper) {
+			editorPart = ((IEditorWrapper) editorPart).getEditor();
+		}
+		if (editorPart instanceof ITextEditor) {
+			textEditor = (ITextEditor) editorPart;
+		} else {
+			textEditor = editorPart == null ? null : (ITextEditor)editorPart.getAdapter(ITextEditor.class);
+		}
+		if(textEditor instanceof JavaEditor) {
+			viewer = ((JavaEditor)textEditor).getViewer();
+		} else if(textEditor instanceof StructuredTextEditor) {
+			viewer = ((StructuredTextEditor)textEditor).getTextViewer();
+		}
+		return viewer;
+	}
+
+	private void modifyDocument(IDocument document) throws BadLocationException {
+		String s = document.get(document.getLength()-1, 1);
+		document.replace(document.getLength() - 1, 1, s + " ");
+	}
+
+	public void assertAnnotationsEqualToMarkers(final IResource resource) throws CoreException {
+		if(validatedResources.contains(resource)) {
+			return;
+		}
+		validatedResources.add(resource);
+
+		IMarker[] allMarkers = AbstractResourceMarkerTest.findMarkers(resource, getMarkerType(), ".*", true);
+		StringBuffer markersSB = new StringBuffer("Marker annotations: [\r\n"); //$NON-NLS-1$
+		int i=0;
+		for (IMarker marker : allMarkers) {
+			String message = marker.getAttribute(IMarker.MESSAGE, ""); //$NON-NLS-1$
+			int line = marker.getAttribute(IMarker.LINE_NUMBER, -1);
+			String mType = marker.getType();
+			int startInt = marker.getAttribute(IMarker.CHAR_START, -1);
+			int endInt = marker.getAttribute(IMarker.CHAR_END, -1);
+			markersSB.append(++i).append(") message=\"").append(message).append("\"; line=\"").append(line).append("\"; start=\"").append(startInt).append("\"; end=\"").append(endInt).append("\"; type=\"").append(mType).append("\";\r\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		}
+		markersSB.append("]"); //$NON-NLS-1$
+
+		IEditorPart editorPart = WorkbenchUtils.openEditor(resource.getFullPath());
+		assertNotNull(editorPart);
+		AsYouTypeValidatorManager manager = new AsYouTypeValidatorManager() {
+			public void validateString(Collection<IRegion> dirtyRegions, IValidationContext helper, IReporter reporter) {
+				validateString(dirtyRegions, helper, reporter, true);
+			}
+			public void validateJavaElement(Collection<IRegion> dirtyRegions, IValidationContext helper, IReporter reporter) {
+				validateJavaElement(dirtyRegions, helper, reporter, true);
+			}
+		};
+		IDocument document = null;
+
+		try {
+			AsYouTypeValidatorManager.setDisabled(true);
+			ISourceViewer viewer = getTextViewer(editorPart);
+			assertNotNull(viewer);
+			document = viewer.getDocument();
+			manager.connect(document);
+			modifyDocument(document);
+
+			Collection<IRegion> dirtyRegions = new ArrayList<IRegion>();
+			final IDocument finalDocument = document;
+			dirtyRegions.add(new IRegion() {
+				@Override
+				public int getOffset() {
+					return 0;
+				}
+				@Override
+				public int getLength() {
+					return finalDocument.getLength();
+				}
+			});
+
+			IValidationContext helper = new IValidationContext() {
+				@Override
+				public Object loadModel(String symbolicName) {
+					return null;
+				}
+				@Override
+				public Object loadModel(String symbolicName, Object[] parms) {
+					return null;
+				}
+				@Override
+				public String[] getURIs() {
+					return new String[] {resource.getFullPath().toString()};
+				}
+			};
+
+			IReporter reporter = new IReporter() {
+				private List<IMessage> messages = new ArrayList<IMessage>();
+				@Override
+				public void addMessage(IValidator origin, IMessage message) {
+					messages.add(message);
+				}
+				@Override
+				public void displaySubtask(IValidator validator, IMessage message) {
+				}
+				@Override
+				public List getMessages() {
+					return messages;
+				}
+				@Override
+				public boolean isCancelled() {
+					return false;
+				}
+				@Override
+				public void removeAllMessages(IValidator origin) {
+				}
+				@Override
+				public void removeAllMessages(IValidator origin, Object object) {
+				}
+				@Override
+				public void removeMessageSubset(IValidator validator, Object obj, String groupName) {
+				}
+			};
+
+			manager.validateJavaElement(dirtyRegions, helper, reporter);
+//			manager.validateString(dirtyRegions, helper, reporter);
+
+			StringBuffer messagesSB = new StringBuffer("AYT annotations: [\r\n"); //$NON-NLS-1$
+			List<IMessage> messages = new ArrayList<IMessage>();
+			i=0;
+			for (Object object : reporter.getMessages()) {
+				IMessage message = (IMessage)object;
+				Object mType = message.getAttribute(TempMarkerManager.MESSAGE_TYPE_ATTRIBUTE_NAME);
+				if(getMarkerType().equals(mType)) {
+					messages.add(message);
+					String text = message.getText();
+					int line = message.getLineNumber();
+					int start = message.getOffset();
+					int end = start + message.getLength();
+					messagesSB.append(++i).append(") message=\"").append(text).append("\"; line=\"").append(line).append("\"; start=\"").append(start).append("\"; end=\"").append(end).append("\"; type=\"").append(mType).append("\";\r\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+				}
+			}
+			messagesSB.append("]"); //$NON-NLS-1$
+
+			assertEquals("The number of markers doesn't equal to the number of AYT messages for " + resource + ".\r\nThe full list of the markers and messages:\r\n" + markersSB + "\r\n" + messagesSB, allMarkers.length, messages.size());
+
+			for (IMessage message : messages) {
+				assertTrue("Can't find message: [" + message + "] for " + resource + ".\r\nThe full list of the markers and messages:\r\n" + markersSB + "\r\n" + messagesSB, contains(allMarkers, message));
+			}
+		} catch (BadLocationException e) {
+			throw new CoreException(new Status(IStatus.ERROR, BaseTestPlugin.PLUGIN_ID, e.getMessage(), e));
+		} finally {
+			AsYouTypeValidatorManager.setDisabled(false);
+			if(document!=null) {
+				manager.disconnect(document);
+			}
+			if (editorPart != null) {
+				PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeEditor(editorPart, false);
+			}
+		}
+	}
+
+	private boolean contains(IMarker[] markers, IMessage message) throws CoreException {
+		for (IMarker marker : markers) {
+			if(equaled(marker, message)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	private boolean equaled(IMarker marker, IMessage message) throws CoreException {
+		String markerText = marker.getAttribute(IMarker.MESSAGE, ""); //$NON-NLS-1$
+		int markerLine = marker.getAttribute(IMarker.LINE_NUMBER, -1);
+		int markerStart = marker.getAttribute(IMarker.CHAR_START, -1);
+		int markerEnd = marker.getAttribute(IMarker.CHAR_END, -1);
+
+		String messageText = message.getText();
+		int messageLine = message.getLineNumber();
+		int messageStart = message.getOffset();
+		int messageEnd = messageStart + message.getLength();
+
+		return markerText.equals(messageText) && markerLine==messageLine && markerStart==messageStart && markerEnd==messageEnd;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.jboss.tools.tests.IAnnotationTest#assertAnnotationIsCreated(org.eclipse.core.resources.IResource, java.lang.String, int[])
+	 */
+	@Override
+	public void assertAnnotationIsCreated(IResource resource, String pattern, int... expectedLines) throws CoreException {
+		assertAnnotationsEqualToMarkers(resource);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.jboss.tools.tests.IAnnotationTest#assertAnnotationIsCreated(org.eclipse.core.resources.IResource, java.lang.String, boolean, int[])
+	 */
+	@Override
+	public void assertAnnotationIsCreated(IResource resource, String message, boolean pattern, int... expectedLines) throws CoreException {
+		assertAnnotationsEqualToMarkers(resource);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.jboss.tools.tests.IAnnotationTest#assertAnnotationIsNotCreated(org.eclipse.core.resources.IResource, java.lang.String)
+	 */
+	@Override
+	public void assertAnnotationIsNotCreated(IResource resource, String message) throws CoreException {
+		assertAnnotationsEqualToMarkers(resource);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.jboss.tools.tests.IAnnotationTest#assertAnnotationIsNotCreated(org.eclipse.core.resources.IResource, java.lang.String, int)
+	 */
+	@Override
+	public void assertAnnotationIsNotCreated(IResource resource, String message, int expectedLine) throws CoreException {
+		assertAnnotationsEqualToMarkers(resource);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.jboss.tools.tests.IAnnotationTest#assertAnnotationIsCreatedForGivenPosition(org.eclipse.core.resources.IResource, java.lang.String, int, int, int)
+	 */
+	@Override
+	public void assertAnnotationIsCreatedForGivenPosition(IResource resource, String message, int lineNumber, int startPosition, int endPosition) throws CoreException {
+		assertAnnotationsEqualToMarkers(resource);
+	}
+}
\ No newline at end of file


Property changes on: trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/validation/AbstractAnnotationTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Modified: trunk/tests/plugins/org.jboss.tools.tests/.classpath
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/.classpath	2012-08-13 22:32:45 UTC (rev 43014)
+++ trunk/tests/plugins/org.jboss.tools.tests/.classpath	2012-08-13 23:04:40 UTC (rev 43015)
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Modified: trunk/tests/plugins/org.jboss.tools.tests/META-INF/MANIFEST.MF
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/META-INF/MANIFEST.MF	2012-08-13 22:32:45 UTC (rev 43014)
+++ trunk/tests/plugins/org.jboss.tools.tests/META-INF/MANIFEST.MF	2012-08-13 23:04:40 UTC (rev 43015)
@@ -17,5 +17,5 @@
  org.jboss.tools.tests
 Bundle-ClassPath: .
 Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-Activator: org.jboss.tools.tests.TestsPlugin

Modified: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java	2012-08-13 22:32:45 UTC (rev 43014)
+++ trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java	2012-08-13 23:04:40 UTC (rev 43015)
@@ -30,7 +30,7 @@
  * @author eskimo
  *
  */
-public class AbstractResourceMarkerTest extends TestCase {
+public class AbstractResourceMarkerTest extends TestCase implements IAnnotationTest {
 
 	public static final String MARKER_TYPE = "org.eclipse.wst.validation.problemmarker";
 	
@@ -171,11 +171,10 @@
 		if(lines.isEmpty()) {
 			IMarker[] allMarkers = findMarkers(resource, null, ".*", true);
 			StringBuffer sb = new StringBuffer("Marker matches the '"); //$NON-NLS-1$
-			sb.append(errorMessage).append("' pattern wasn't found. Here is a list of found markers in ").append(resource.getFullPath().toOSString()).append(allMarkers.length==0?" : [": " : [\r\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			sb.append(errorMessage).append("' pattern wasn't found. Here is the list of found markers in ").append(resource.getFullPath().toOSString()).append(allMarkers.length==0?" : [": " : [\r\n"); //$NON-NLS-1$ //$NON-NLS-2$
 			int i=0;
 			for (IMarker marker : allMarkers) {
 				String message = marker.getAttribute(IMarker.MESSAGE, ""); //$NON-NLS-1$
-				marker.getAttribute(IMarker.MESSAGE, ""); //$NON-NLS-1$
 				int line = marker.getAttribute(IMarker.LINE_NUMBER, -1);
 				String mType = marker.getType();
 				sb.append(i).append(") line=\"").append(line).append("\"; type=\"").append(mType).append("\"; message=\"").append(message).append("\";\r\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -403,4 +402,29 @@
 		return message.replace("[", "\\[").replace("]", "\\]").replace("<", "\\<").replace(">", "\\>").replace("(", "\\(").replace(")", "\\)")
 				.replace("{", "\\{").replace("}", "\\}").replace("'", "\\'");
 	}
+
+	@Override
+	public void assertAnnotationIsCreated(IResource resource, String pattern, int... expectedLines) throws CoreException {
+		assertMarkerIsCreated(resource, pattern, expectedLines);		
+	}
+
+	@Override
+	public void assertAnnotationIsCreated(IResource resource, String message, boolean pattern, int... expectedLines) throws CoreException {
+		assertMarkerIsCreated(resource, message, pattern, expectedLines);
+	}
+
+	@Override
+	public void assertAnnotationIsNotCreated(IResource resource, String message) throws CoreException {
+		assertMarkerIsNotCreated(resource, message);
+	}
+
+	@Override
+	public void assertAnnotationIsNotCreated(IResource resource, String message, int expectedLine) throws CoreException {
+		assertMarkerIsNotCreated(resource, message, expectedLine);
+	}
+
+	@Override
+	public void assertAnnotationIsCreatedForGivenPosition(IResource resource, String message, int lineNumber, int startPosition, int endPosition) throws CoreException {
+		assertMarkerIsCreatedForGivenPosition(resource, message, lineNumber, startPosition, endPosition);
+	}
 }
\ No newline at end of file

Added: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/IAnnotationTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/IAnnotationTest.java	                        (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/IAnnotationTest.java	2012-08-13 23:04:40 UTC (rev 43015)
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.tests;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * @author Alexey Kazakov
+ */
+public interface IAnnotationTest {
+
+	void assertAnnotationIsCreated(IResource resource, String pattern, int... expectedLines) throws CoreException;
+	void assertAnnotationIsCreated(IResource resource, String message, boolean pattern, int... expectedLines) throws CoreException;
+	void assertAnnotationIsNotCreated(IResource resource, String message) throws CoreException;
+	void assertAnnotationIsNotCreated(IResource resource, String message, int expectedLine) throws CoreException;
+	void assertAnnotationIsCreatedForGivenPosition(IResource resource, String message, int lineNumber, int startPosition, int endPosition) throws CoreException;
+}
\ No newline at end of file


Property changes on: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/IAnnotationTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain



More information about the jbosstools-commits mailing list