Author: adietish
Date: 2012-05-25 19:21:41 -0400 (Fri, 25 May 2012)
New Revision: 41452
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
Log:
increased timeout for app-creation and app-waiting since the handle timeouts internally
with dialogs that allow the user to continue/cancel
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-05-25
22:00:05 UTC (rev 41451)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-05-25
23:21:41 UTC (rev 41452)
@@ -26,7 +26,9 @@
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.jgit.api.errors.JGitInternalException;
import org.eclipse.jgit.errors.TransportException;
import org.eclipse.osgi.util.NLS;
@@ -56,8 +58,8 @@
*/
public abstract class OpenShiftExpressApplicationWizard extends Wizard implements
IImportWizard, INewWizard {
- private static final int APP_CREATE_TIMEOUT = 2 * 60 * 1000;
- private static final int APP_WAIT_TIMEOUT = 3 * 60 * 1000;
+ private static final int APP_CREATE_TIMEOUT = 5 * 60 * 1000;
+ private static final int APP_WAIT_TIMEOUT = 5 * 60 * 1000;
private static final long EMBED_CARTRIDGES_TIMEOUT = 2 * 60 * 1000;
private static final int IMPORT_TIMEOUT = 1 * 60 * 1000;
@@ -170,7 +172,7 @@
private boolean processStatus(String operation, IStatus status) {
if (JobUtils.isCancel(status)) {
if (AbstractDelegatingMonitorJob.TIMEOUTED_CANCELLED == status.getCode()) {
- getContainer().getShell().close();
+ closeWizard();
} else {
new ErrorDialog(getShell(),
NLS.bind("Operation was cancelled", operation),
@@ -188,6 +190,13 @@
return true;
}
+ private void closeWizard() {
+ IWizardContainer container = getContainer();
+ if (container instanceof WizardDialog) {
+ ((WizardDialog) container).close();
+ }
+ }
+
private IStatus waitForApplication(IApplication application) {
try {
AbstractDelegatingMonitorJob job = new WaitForApplicationJob(application,
getShell());
Show replies by date