Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Stocker2013-10-09 22:31:44 +0000
committerRobin Stocker2013-10-09 22:31:44 +0000
commit955a7e009278727fdfb295fd95ec68b49a50bf87 (patch)
treeb56633f63f1f1136a82b18eece3300fdaa2c6779
parentf407117266d9c1153ce3972fe9f2832f661de0b0 (diff)
downloadeclipse.platform.ui-955a7e009278727fdfb295fd95ec68b49a50bf87.tar.gz
eclipse.platform.ui-955a7e009278727fdfb295fd95ec68b49a50bf87.tar.xz
eclipse.platform.ui-955a7e009278727fdfb295fd95ec68b49a50bf87.zip
Bug 418683 - AFE on trying to create a patch
Handle the case that getProgressMonitor() returns null and pass a NullProgressMonitor to ModalContext.run instead. Change-Id: Ia07e8b714fe265f25b9a2ef0e89bc700bdf5c9df Signed-off-by: Robin Stocker <robin@nibor.org>
-rw-r--r--bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java
index 5db2d6c3c11..1012ec91461 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java
@@ -22,6 +22,7 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.ControlEnableState;
import org.eclipse.jface.dialogs.IDialogConstants;
@@ -1043,19 +1044,21 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
if (activeRunningOperations++ == 0) {
state = aboutToStart(fork && cancelable);
}
+ IProgressMonitor progressMonitor = getProgressMonitor();
+ if (progressMonitor == null) {
+ progressMonitor = new NullProgressMonitor();
+ }
try {
if (!fork) {
lockedUI = true;
}
- ModalContext.run(runnable, fork, getProgressMonitor(), getShell()
+ ModalContext.run(runnable, fork, progressMonitor, getShell()
.getDisplay());
lockedUI = false;
} finally {
// explicitly invoke done() on our progress monitor so that its
// label does not spill over to the next invocation, see bug 271530
- if (getProgressMonitor() != null) {
- getProgressMonitor().done();
- }
+ progressMonitor.done();
// Stop if this is the last one
if (state != null) {
timeWhenLastJobFinished= System.currentTimeMillis();

Back to the top