[jbosstools-commits] JBoss Tools SVN: r44096 - branches/jbosstools-4.0.0.Alpha2/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
Thu Sep 27 11:10:22 EDT 2012


Author: adietish
Date: 2012-09-27 11:10:21 -0400 (Thu, 27 Sep 2012)
New Revision: 44096

Modified:
   branches/jbosstools-4.0.0.Alpha2/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java
Log:
[JBIDE-12739] making sure widgets are correctly updated after wizard runnable (and job) is finished

Modified: branches/jbosstools-4.0.0.Alpha2/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java
===================================================================
--- branches/jbosstools-4.0.0.Alpha2/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java	2012-09-27 14:47:43 UTC (rev 44095)
+++ branches/jbosstools-4.0.0.Alpha2/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java	2012-09-27 15:10:21 UTC (rev 44096)
@@ -195,7 +195,7 @@
 		GridDataFactory.fillDefaults()
 				.align(SWT.FILL, SWT.CENTER).grab(true, false).indent(10, 0).applyTo(sshLink);
 		sshLink.addSelectionListener(onSshPrefs("SSH2 Preferences"));
-		sshLink.addSelectionListener(onManageSSHKeys("SSH Keys wizard"));
+		sshLink.addSelectionListener(onManageSSHKeys("SSH Keys wizard", dbc));
 		
 		// we need a binding to have validation setting wizard validation status
 		Label dummyLabel = new Label(parent, SWT.None);
@@ -222,7 +222,7 @@
 					}
 				})
 				.in(dbc);
-		refreshHasRemoteKeys();
+		refreshHasRemoteKeys(dbc);
 		return cloneGroup;
 	}
 
@@ -262,7 +262,7 @@
 		};
 	}
 
-	private SelectionAdapter onManageSSHKeys(String text) {
+	private SelectionAdapter onManageSSHKeys(String text, final DataBindingContext dbc) {
 		return new LinkSelectionAdapter(text) {
 
 			@Override
@@ -270,7 +270,7 @@
 				WizardDialog manageSSHKeysWizard =
 						new OkButtonWizardDialog(getShell(), new ManageSSHKeysWizard(wizardModel.getUser()));
 				if (manageSSHKeysWizard.open() == Dialog.OK) {
-					refreshHasRemoteKeys();
+					refreshHasRemoteKeys(dbc);
 				}
 			}
 		};
@@ -280,7 +280,7 @@
 		enableWidgets(pageModel.isNewProject());
 		repoPathValidator.forceRevalidate();
 		setSSHLinkText();
-		refreshHasRemoteKeys();
+		refreshHasRemoteKeys(dbc);
 	}
 
 	private void setSSHLinkText() {
@@ -295,7 +295,7 @@
 		sshLink.getParent().layout(true, true);
 	}
 
-	private void refreshHasRemoteKeys() {
+	private void refreshHasRemoteKeys(DataBindingContext dbc) {
 		try {
 			if (!wizardModel.hasUser()) {
 				return;
@@ -309,7 +309,7 @@
 					return Status.OK_STATUS;
 				}
 			});
-			WizardUtils.runInWizard(loadKeysJob, getContainer());
+			WizardUtils.runInWizard(loadKeysJob, getContainer(), dbc);
 		} catch (Exception e) {
 			StatusManager.getManager().handle(
 					OpenShiftUIActivator.createErrorStatus("Could not load ssh keys.", e), StatusManager.LOG);



More information about the jbosstools-commits mailing list