Author: adietish
Date: 2011-10-19 06:03:24 -0400 (Wed, 19 Oct 2011)
New Revision: 35795
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java
Log:
cleanup
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java 2011-10-19
09:18:50 UTC (rev 35794)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java 2011-10-19
10:03:24 UTC (rev 35795)
@@ -82,10 +82,6 @@
DataBindingUtils.bindMandatoryTextField(
passwordText, "Password", CredentialsWizardPageModel.PROPERTY_PASSWORD,
model, dbc);
- // Label credentialsValidatyLabel = new Label(container, SWT.None);
- // GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).hint(64,
- // 64).applyTo(credentialsValidatyLabel);
-
Label spacerLabel = new Label(container, SWT.None);
GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(spacerLabel);
@@ -149,20 +145,6 @@
dbc);
}
- private static class CredentialsStatusValidator implements IValidator {
- public IStatus validate(Object value) {
- if (value instanceof IStatus) {
- int currentSeverity = ((IStatus) value).getSeverity();
- if (currentSeverity < IStatus.ERROR) {
- return ValidationStatus.ok();
- }
- } else if (value == null) {
- return ValidationStatus.info("You have to validate your credentials");
- }
- return ValidationStatus.error("The given credentials are not valid");
- }
- }
-
@Override
protected void onPageWillGetDeactivated(PageChangingEvent event, DataBindingContext dbc)
{
if (!model.areCredentialsValidated()) {
@@ -181,9 +163,22 @@
queue.poll(10, TimeUnit.SECONDS);
event.doit = model.areCredentialsValid();
} catch (Exception ex) {
- // ignore
+ event.doit = false;
}
}
+ }
+ private static class CredentialsStatusValidator implements IValidator {
+ public IStatus validate(Object value) {
+ if (value instanceof IStatus) {
+ int currentSeverity = ((IStatus) value).getSeverity();
+ if (currentSeverity < IStatus.ERROR) {
+ return ValidationStatus.ok();
+ }
+ } else if (value == null) {
+ return ValidationStatus.info("You have to validate your credentials");
+ }
+ return ValidationStatus.error("The given credentials are not valid");
+ }
}
}
Show replies by date