[jbosstools-commits] JBoss Tools SVN: r39244 - branches/jbosstools-3.3.0.Beta1/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:50:45 EST 2012


Author: xcoulon
Date: 2012-03-02 03:50:44 -0500 (Fri, 02 Mar 2012)
New Revision: 39244

Modified:
   branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java
   branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainWizardPage.java
Log:
Fixed - JBIDE-11114
Exception when providing long domain name

Fixed - JBIDE-11112
Exception when providing an empty domain name

Modified: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java	2012-03-02 08:49:53 UTC (rev 39243)
+++ branches/jbosstools-3.3.0.Beta1/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)
@@ -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: branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainWizardPage.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainWizardPage.java	2012-03-02 08:49:53 UTC (rev 39243)
+++ branches/jbosstools-3.3.0.Beta1/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)
@@ -72,7 +72,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 {
@@ -88,12 +88,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