Author: rob.stryker(a)jboss.com
Date: 2012-05-25 12:14:11 -0400 (Fri, 25 May 2012)
New Revision: 41433
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java
Log:
JBIDE-11841 to trunk
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java 2012-05-25
16:07:10 UTC (rev 41432)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java 2012-05-25
16:14:11 UTC (rev 41433)
@@ -323,33 +323,37 @@
@Override
protected void onPageActivated(DataBindingContext dbc) {
- try {
- IStatus status = WizardUtils.runInWizard(new Job("Retrieving application's
forwardable ports...") {
+ final Job j = new Job("Retrieving application's forwardable ports...") {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ monitor.beginTask("Checking Application SSH session...", 1);
+ wizardModel.verifyApplicationSSHSession();
+ monitor.worked(1);
+ monitor.beginTask("Retrieving ports...", 1);
+ wizardModel.loadForwardablePorts();
+ refreshViewerInput();
+ monitor.worked(1);
+ return Status.OK_STATUS;
+ } catch (OpenShiftSSHOperationException e) {
+ return OpenShiftUIActivator.createErrorStatus(
+ "Could not load forwardable ports for application
''{0}''", e, wizardModel.getApplication().getName());
+ }
+ }
+ };
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- monitor.beginTask("Checking Application SSH session...", 1);
- wizardModel.verifyApplicationSSHSession();
- monitor.worked(1);
- monitor.beginTask("Retrieving ports...", 1);
- wizardModel.loadForwardablePorts();
- refreshViewerInput();
- monitor.worked(1);
- return Status.OK_STATUS;
- } catch (OpenShiftSSHOperationException e) {
- return OpenShiftUIActivator.createErrorStatus(
- "Could not load forwardable ports for application
''{0}''", e, wizardModel.getApplication().getName());
+ getContainer().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ try {
+ IStatus status = WizardUtils.runInWizard(j, getContainer(),
getDataBindingContext());
+ if(!status.isOK()) {
+ getWizard().getContainer().getShell().close();
}
+ } catch(Exception e) {
+ // ignore
}
-
- }, getContainer(), getDataBindingContext());
- if(!status.isOK()) {
- getWizard().getContainer().getShell().close();
}
- } catch (Exception e) {
- // ignore
- }
+ });
}
private void refreshViewerInput() {