[jbosstools-commits] JBoss Tools SVN: r39245 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Mar 2 03:58:27 EST 2012


Author: xcoulon
Date: 2012-03-02 03:58:27 -0500 (Fri, 02 Mar 2012)
New Revision: 39245

Modified:
   trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java
   trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainWizardPage.java
Log:
Fixed - JBIDE-11112
Exception when providing an empty domain name

Fixed - JBIDE-11114
Exception when providing long domain name

Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java	2012-03-02 08:50:44 UTC (rev 39244)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java	2012-03-02 08:58:27 UTC (rev 39245)
@@ -51,7 +51,7 @@
 						return Status.OK_STATUS;
 					} catch(OpenShiftEndpointException e) {
 						return OpenShiftUIActivator.createErrorStatus(NLS.bind(
-								"Could not create domain \"{0}\": {1}", model.getNamespace(), e.getResponseResult()), e);
+								"Could not rename domain \"{0}\": {1}", model.getNamespace(), e.getResponseResult()), e);
 					} catch (Exception e) {
 						return OpenShiftUIActivator.createErrorStatus(NLS.bind(
 								"Could not rename domain {0}", model.getNamespace()), e);

Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainWizardPage.java	2012-03-02 08:50:44 UTC (rev 39244)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainWizardPage.java	2012-03-02 08:58:27 UTC (rev 39245)
@@ -73,7 +73,7 @@
 
 	@Override
 	protected void setupWizardPageSupport(DataBindingContext dbc) {
-		ParametrizableWizardPageSupport.create(IStatus.ERROR, this, dbc);
+		ParametrizableWizardPageSupport.create(IStatus.ERROR | IStatus.CANCEL, this, dbc);
 	}
 	
 	class NamespaceValidator extends MultiValidator {
@@ -89,12 +89,16 @@
 			final String domainName = (String) domainNameObservable.getValue();
 			if (domainName.isEmpty()) {
 				return ValidationStatus.cancel(
-						"Select an alphanumerical name and a type for the domain to edit.");
+						"Enter a domain name with lower-case letters and digits only. Max length is 16 characters.");
 			}
 			if (!StringUtils.isAlphaNumeric(domainName)) {
 				return ValidationStatus.error(
-						"The name may only contain lower-case letters and digits.");
+						"The domain name may only contain lower-case letters and digits.");
 			}
+			if (domainName.length() > 16) {
+				return ValidationStatus.error(
+						"The domain name max length is 16 characters.");
+			}
 			return ValidationStatus.ok();
 		}
 



More information about the jbosstools-commits mailing list