Author: scabanovich
Date: 2010-12-16 05:56:18 -0500 (Thu, 16 Dec 2010)
New Revision: 27545
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeWizardPage.java
Log:
JBIDE-7899
https://issues.jboss.org/browse/JBIDE-7899
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2010-12-16
09:45:27 UTC (rev 27544)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2010-12-16
10:56:18 UTC (rev 27545)
@@ -73,6 +73,7 @@
public static String MESSAGE_INTERCEPTOR_BINDINGS_EMPTY;
public static String MESSAGE_STEREOTYPE_CANNOT_BE_APPLIED_TO_TYPE;
+ public static String MESSAGE_STEREOTYPE_IS_NOT_COMPATIBLE;
public static String MESSAGE_QUALIFIER_NOT_SET;
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2010-12-16
09:45:27 UTC (rev 27544)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2010-12-16
10:56:18 UTC (rev 27545)
@@ -57,6 +57,7 @@
MESSAGE_INTERCEPTOR_BINDINGS_EMPTY=Interceptor Bindings list is empty
MESSAGE_STEREOTYPE_CANNOT_BE_APPLIED_TO_TYPE={0} cannot be applied to a type.
+MESSAGE_STEREOTYPE_IS_NOT_COMPATIBLE={0} annotated with
'''@Target({TYPE})''' is not compatible with target.
MESSAGE_QUALIFIER_NOT_SET=Qualifier is not set
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeWizardPage.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeWizardPage.java 2010-12-16
09:45:27 UTC (rev 27544)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeWizardPage.java 2010-12-16
10:56:18 UTC (rev 27545)
@@ -302,7 +302,8 @@
if(target != null) {
Set<String> targets = CDIUtil.getTargetAnnotationValues(target);
if(targets != null && targets.size() == 1 &&
targets.contains("TYPE") && hasMethodOrField) {
- String message = a.getSourceType().getElementName() + " annotated with
@Target({TYPE}) is not compatible with target";
+ String message = NLS.bind(CDIUIMessages.MESSAGE_STEREOTYPE_IS_NOT_COMPATIBLE,
a.getSourceType().getElementName());
+// String message = a.getSourceType().getElementName() + " annotated with
@Target({TYPE}) is not compatible with target";
targetStatus.setWarning(message);
}
if(targets != null && !targets.contains("TYPE")) {