Author: akazakov
Date: 2011-09-08 14:16:52 -0400 (Thu, 08 Sep 2011)
New Revision: 34588
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
Log:
https://issues.jboss.org/browse/JBIDE-9683 CDI validation problems which may cause
non-portable behavior results should be WARNINGs by default.
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2011-09-08
18:14:55 UTC (rev 34587)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2011-09-08
18:16:52 UTC (rev 34588)
@@ -48,6 +48,9 @@
defaultPreferences.put(CDIPreferences.MISSING_OR_INCORRECT_TARGET_OR_RETENTION_IN_ANNOTATION_TYPE,
CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.DECORATOR_RESOLVES_TO_FINAL_BEAN,
CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.NOT_PASSIVATION_CAPABLE_BEAN,
CDIPreferences.WARNING);
+ defaultPreferences.put(CDIPreferences.STEREOTYPE_IS_ANNOTATED_TYPED,
CDIPreferences.WARNING);
+ defaultPreferences.put(CDIPreferences.ILLEGAL_QUALIFIER_IN_STEREOTYPE,
CDIPreferences.WARNING);
+ defaultPreferences.put(CDIPreferences.MISSING_INTERCEPTOR_BINDING,
CDIPreferences.WARNING);
// defaultPreferences.put(CDIPreferences.INCONSISTENT_SPECIALIZATION,
CDIPreferences.WARNING);
defaultPreferences.putInt(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME,
SeverityPreferences.DEFAULT_MAX_NUMBER_OF_MARKERS_PER_FILE);
}
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2011-09-08
18:14:55 UTC (rev 34587)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2011-09-08
18:16:52 UTC (rev 34588)
@@ -1,8 +1,8 @@
STEREOTYPE_DECLARES_NON_EMPTY_NAME=Stereotype declares a non-empty @Named annotation
[JSR-299 �2.7.1.3]
RESOURCE_PRODUCER_FIELD_SETS_EL_NAME=Producer field declaration of Java EE resource must
not specify an EL name [JSR-299 �3.5.1]
PARAM_INJECTION_DECLARES_EMPTY_NAME=Injection point other than injected field must not
declare a @Named annotation that does not specify the value member [JSR-299 �3.11]
-INTERCEPTOR_HAS_NAME=Interceptor has a name [JSR-299 �2.5.3]
-DECORATOR_HAS_NAME=Decorator has a name [JSR-299 �2.5.3]
+INTERCEPTOR_HAS_NAME=Interceptor should not have a name [JSR-299 �2.5.3]
+DECORATOR_HAS_NAME=Decorator should not have a name [JSR-299 �2.5.3]
DUPLCICATE_EL_NAME=A few beans ({0}) have the same EL name and the name is not resolvable
[JSR-299 �5.3.1]
UNRESOLVABLE_EL_NAME=The EL name "{0}" is of the form x.y, where y
("{1}") is a valid bean EL name, and x ("{2}") is the EL name of the
other bean {3} [JSR-299 �5.3.1]
@@ -27,10 +27,10 @@
PRODUCER_FIELD_TYPE_DOES_NOT_MATCH_JAVA_EE_OBJECT=Matching object in the Java EE
component environment is not of the same type as the producer field declaration [JSR-299
�3.5.1]
INJECTION_TYPE_IS_VARIABLE=Injection point type cannot be a type variable [JSR-299
�5.2.2]
INJECT_RESOLVES_TO_NULLABLE_BEAN=Injection point of primitive type resolves to the bean
that may have a null value [JSR-299 �5.2.4]
-STEREOTYPE_IS_ANNOTATED_TYPED=Stereotype cannot be annotated @Typed [JSR-299 �2.7.1.3]
-MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER=Annotation-valued member
of a qualifier type must be annotated @Nonbinding [JSR-299 �5.2.5]
-MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER=Array-valued member of a
qualifier type must be annotated @Nonbinding [JSR-299 �5.2.5]
-MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER=Annotation-valued
member of an interceptor binding type must be annotated @Nonbinding [JSR-299 �9.5.2]
+STEREOTYPE_IS_ANNOTATED_TYPED=A stereotype should not be annotated @Typed [JSR-299
�2.7.1.3]
+MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER=Annotation-valued member
of a qualifier type should be annotated @Nonbinding [JSR-299 �5.2.5]
+MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER=Array-valued member of a
qualifier type should be annotated @Nonbinding [JSR-299 �5.2.5]
+MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER=Annotation-valued
member of an interceptor binding type should be annotated @Nonbinding [JSR-299 �9.5.2]
MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER=Array-valued member
of an interceptor binding type must be annotated @Nonbinding [JSR-299 �9.5.2]
MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE=Qualifier annotation type must be annotated
with @Target('{'TYPE, METHOD, FIELD, PARAMETER'}') or
@Target('{'FIELD, PARAMETER'}') [JSR-299 �2.3.2, �10.1]
MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE=Qualifier annotation type must be
annotated with @Retention(RUNTIME) [JSR-299 �2.3.2]
@@ -60,8 +60,8 @@
ILLEGAL_SCOPE_FOR_PRODUCER_METHOD=Producer method with a parameterized return type with a
type variable must be @Dependent scoped [JSR-299 �3.3]
ILLEGAL_SCOPE_FOR_PRODUCER_FIELD=Producer field with a parameterized type with a type
variable declares must be @Dependent scoped [JSR-299 �3.4]
ILLEGAL_SCOPE_WHEN_TYPE_INJECTIONPOINT_IS_INJECTED=Bean that declares any scope other
than @Dependent has an injection point of type InjectionPoint and qualifier @Default
[JSR-299 �5.5.7]
-ILLEGAL_SCOPE_FOR_INTERCEPTOR=Interceptor must be @Dependent scoped [JSR-299 �2.4.1]
-ILLEGAL_SCOPE_FOR_DECORATOR=Decorator must be @Dependent scoped [JSR-299 �2.4.1]
+ILLEGAL_SCOPE_FOR_INTERCEPTOR=Interceptor should not have any scope other than @Dependent
[JSR-299 �2.4.1]
+ILLEGAL_SCOPE_FOR_DECORATOR=Decorator should not have any scope other than @Dependent
[JSR-299 �2.4.1]
PRODUCER_ANNOTATED_INJECT=Producer method or field cannot be annotated @Inject [JSR-299
�3.3.2, �3.4.2]
PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED_DISPOSES=Producer method has a parameter annotated
@Disposes [JSR-299 �3.3.2]
@@ -102,9 +102,9 @@
CONFLICTING_INTERCEPTOR_BINDINGS=The set of interceptor bindings of a bean or
interceptor, including bindings inherited from stereotypes and other interceptor bindings,
has two instances of a certain interceptor binding type and the instances have different
values of some annotation member [JSR-299 �9.5.2]
OBSERVER_IN_DECORATOR=Decorator cannot have a method with a parameter annotated @Observes
[JSR-299 �10.4.2]
OBSERVER_IN_INTERCEPTOR=Interceptor cannot have a method with a parameter annotated
@Observes [JSR-299 �10.4.2]
-INTERCEPTOR_IS_ALTERNATIVE=Interceptor is an alternative [JSR-299 �2.6.1]
-DECORATOR_IS_ALTERNATIVE=Decorator is an alternative [JSR-299 �2.6.1]
-MISSING_INTERCEPTOR_BINDING=Interceptor declared using @Interceptor must specify at least
one interceptor binding [JSR-299 �9.2]
+INTERCEPTOR_IS_ALTERNATIVE=Interceptor should not be an alternative [JSR-299 �2.6.1]
+DECORATOR_IS_ALTERNATIVE=Decorator should not be an alternative [JSR-299 �2.6.1]
+MISSING_INTERCEPTOR_BINDING=Interceptor declared using @Interceptor should specify at
least one interceptor binding [JSR-299 �9.2]
ILLEGAL_SPECIALIZING_MANAGED_BEAN=Managed bean class annotated @Specializes must directly
extend the bean class of another managed bean [JSR-299 �3.1.4]
ILLEGAL_SPECIALIZING_SESSION_BEAN=Session bean class annotated @Specializes must directly
extend the bean class of another session bean [JSR-299 �3.2.4]
@@ -112,13 +112,13 @@
ILLEGAL_SPECIALIZING_PRODUCER_OVERRIDE=Producer method annotated @Specializes must
directly override another producer method [JSR-299 �3.3.3]
MISSING_TYPE_IN_SPECIALIZING_BEAN=Bean {0} specializes {1} but does not have bean
type(s): {2} of bean {1} [JSR-299 �4.3.1]
CONFLICTING_NAME_IN_SPECIALIZING_BEAN=Bean {0} specializes {1} and {1} has a name and {0}
declares a name explicitly, using @Named [JSR-299 �4.3.1]
-INTERCEPTOR_ANNOTATED_SPECIALIZES=Interceptor is annotated @Specializes [JSR-299 �4.3.1]
-DECORATOR_ANNOTATED_SPECIALIZES=Decorator is annotated @Specializes [JSR-299 �4.3.1]
+INTERCEPTOR_ANNOTATED_SPECIALIZES=Interceptor should not be annotated @Specializes
[JSR-299 �4.3.1]
+DECORATOR_ANNOTATED_SPECIALIZES=Decorator should not be annotated @Specializes [JSR-299
�4.3.1]
INCONSISTENT_SPECIALIZATION=There are a few enabled beans ({0}) that specialize the same
bean {1} [JSR-299 �5.1.3]
ILLEGAL_INJECTING_USERTRANSACTION_TYPE=Java EE component class has an injection point of
type UserTransaction and qualifier @Default, and may not validly make use of the JTA
UserTransaction according to the Java EE platform specification [JSR-299 �3.6]
ILLEGAL_INJECTING_INJECTIONPOINT_TYPE=Java EE component class supporting injection that
is not a bean has an injection point of type InjectionPoint and qualifier @Default
[JSR-299 �5.5.7]
-ILLEGAL_QUALIFIER_IN_STEREOTYPE=Stereotypes cannot declare qualifier annotations (except
@Named) [JSR-299 �2.7.1.3]
+ILLEGAL_QUALIFIER_IN_STEREOTYPE=A stereotype should not declare any qualifier annotation
other than @Named [JSR-299 �2.7.1.3]
#Beans.xml