Author: scabanovich
Date: 2011-10-07 19:32:55 -0400 (Fri, 07 Oct 2011)
New Revision: 35494
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/NewDecoratorWizardPage.java
Log:
JBIDE-9865
https://issues.jboss.org/browse/JBIDE-9865
In New Decorator wizard, initialized with type name, displayed info message prompting to
add decorator type.
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 2011-10-07
23:14:46 UTC (rev 35493)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2011-10-07
23:32:55 UTC (rev 35494)
@@ -52,6 +52,7 @@
public static String NEW_DECORATOR_WIZARD_TITLE;
public static String NEW_DECORATOR_WIZARD_PAGE_NAME;
+ public static String NEW_DECORATOR_WIZARD_INTERFACES_LABEL;
public static String NEW_DECORATOR_WIZARD_DESCRIPTION;
public static String NEW_BEAN_WIZARD_TITLE;
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 2011-10-07
23:14:46 UTC (rev 35493)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2011-10-07
23:32:55 UTC (rev 35494)
@@ -36,19 +36,20 @@
NEW_INTERCEPTOR_WIZARD_TITLE=New Interceptor
NEW_INTERCEPTOR_WIZARD_PAGE_NAME=Interceptor Type
-NEW_INTERCEPTOR_WIZARD_DESCRIPTION=Create a new Interceptor Java class
+NEW_INTERCEPTOR_WIZARD_DESCRIPTION=Create a new Interceptor Java class.
NEW_DECORATOR_WIZARD_TITLE=New Decorator
NEW_DECORATOR_WIZARD_PAGE_NAME=Decorator Type
-NEW_DECORATOR_WIZARD_DESCRIPTION=Create a new Decorator Java class
+NEW_DECORATOR_WIZARD_INTERFACES_LABEL=Decorated Type:\nInterfaces:
+NEW_DECORATOR_WIZARD_DESCRIPTION=Create a new Decorator Java class.
NEW_BEAN_WIZARD_TITLE=New CDI Bean
NEW_BEAN_WIZARD_PAGE_NAME=Bean Type
-NEW_BEAN_WIZARD_DESCRIPTION=Create a new Bean Java class
+NEW_BEAN_WIZARD_DESCRIPTION=Create a new Bean Java class.
NEW_ANNOTATION_LITERAL_WIZARD_TITLE=New Annotation Literal
NEW_ANNOTATION_LITERAL_WIZARD_PAGE_NAME=Annotation Literal Type
-NEW_ANNOTATION_LITERAL_WIZARD_DESCRIPTION=Create a new Annotation Literal Java class
+NEW_ANNOTATION_LITERAL_WIZARD_DESCRIPTION=Create a new Annotation Literal Java class.
SELECT_STEREOTYPE=Select Stereotype Annotation Type
SELECT_INTERCEPTOR_BINDING=Select Interceptor Binding Annotation Type
@@ -123,7 +124,7 @@
NEW_BEANS_XML_WIZARD_TITLE=New beans.xml File
NEW_BEANS_XML_WIZARD_PAGE_NAME=beans.xml File
-NEW_BEANS_XML_WIZARD_DESCRIPTION=Create a new beans.xml File
+NEW_BEANS_XML_WIZARD_DESCRIPTION=Create a new beans.xml File.
OPEN_CDI_NAMED_BEAN_DIALOG_LOADING=CDI Project beans loading
OPEN_CDI_NAMED_BEAN_DIALOG_NAME=OpenCDINamedBeanDialog
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewDecoratorWizardPage.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewDecoratorWizardPage.java 2011-10-07
23:14:46 UTC (rev 35493)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewDecoratorWizardPage.java 2011-10-07
23:32:55 UTC (rev 35494)
@@ -381,6 +381,9 @@
}
protected void updateStatus(IStatus[] status) {
+ if(!CDIUIMessages.NEW_DECORATOR_WIZARD_DESCRIPTION.equals(getDescription())) {
+ setDescription(CDIUIMessages.NEW_DECORATOR_WIZARD_DESCRIPTION);
+ }
IStatus[] ns = new IStatus[status.length + 1];
System.arraycopy(status, 0, ns, 0, status.length);
ns[status.length] = fieldNameStatus;
@@ -439,4 +442,15 @@
return false;
}
+ @Override
+ public void setVisible(boolean visible) {
+ if(!getControl().isVisible() && visible &&
fSuperInterfacesStatus.matches(IStatus.ERROR) &&
!fTypeNameStatus.matches(IStatus.ERROR)) {
+ setDescription(fSuperInterfacesStatus.getMessage());
+ }
+ super.setVisible(visible);
+ }
+
+ protected String getSuperInterfacesLabel() {
+ return CDIUIMessages.NEW_DECORATOR_WIZARD_INTERFACES_LABEL;
+ }
}
\ No newline at end of file