summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-03-11 07:30:12 (EDT)
committer Steffen Pingel2012-03-11 07:30:12 (EDT)
commita36041b0f70e63e25f5cbee64866fa834259ea5d (patch)
treef016695d98325abdc92b61778e0896ef710b50f6
parent62311677c1fccc58d0292532b5c11e8914cdc3e3 (diff)
downloadorg.eclipse.mylyn.commons-a36041b0f70e63e25f5cbee64866fa834259ea5d.zip
org.eclipse.mylyn.commons-a36041b0f70e63e25f5cbee64866fa834259ea5d.tar.gz
org.eclipse.mylyn.commons-a36041b0f70e63e25f5cbee64866fa834259ea5d.tar.bz2
NEW - bug 373877: finish button gets enabled when running a job when
closing wizard https://bugs.eclipse.org/bugs/show_bug.cgi?id=373877 Change-Id: Ib68f888991b323d7a7deab55fabe255423184182
-rw-r--r--org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/commons/ui/dialogs/EnhancedWizardDialog.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/commons/ui/dialogs/EnhancedWizardDialog.java b/org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/commons/ui/dialogs/EnhancedWizardDialog.java
index 0cfe57e..810f6cc 100644
--- a/org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/commons/ui/dialogs/EnhancedWizardDialog.java
+++ b/org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/commons/ui/dialogs/EnhancedWizardDialog.java
@@ -38,6 +38,8 @@ public abstract class EnhancedWizardDialog extends WizardDialog {
private boolean isInFinish;
+ private int runningOperations;
+
public EnhancedWizardDialog(Shell parentShell, IWizard newWizard) {
super(parentShell, newWizard);
}
@@ -114,6 +116,11 @@ public abstract class EnhancedWizardDialog extends WizardDialog {
@Override
public void updateButtons() {
+ // all navigation buttons should be disabled while an operation is running
+ if (runningOperations > 0) {
+ return;
+ }
+
updateExtraButtons();
super.updateButtons();
}
@@ -124,12 +131,13 @@ public abstract class EnhancedWizardDialog extends WizardDialog {
@Override
public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException,
InterruptedException {
-
HashMap<String, Boolean> savedEnabledState = null;
try {
+ runningOperations++;
savedEnabledState = saveAndSetEnabledStateMylyn();
super.run(fork, cancelable, runnable);
} finally {
+ runningOperations--;
if (savedEnabledState != null) {
restoreEnabledStateMylyn(savedEnabledState);
}