Bug 93674 [Dialogs] ProgressMonitorDialog not cancellable when fork is set to false
Overview Description: Invoking the ProgressMonitorDialog::run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) method with the fork parameter set to false, the user can't cancel the running dialog -even if the cancelable parameter is set to true. Steps to Reproduce: Simply launch a ProgressMonitorDialog and invoke its run method with fork parameter == false and cancelable parameter == true Actual Results: The Cancel button is not responsive to user clicks and the IProgressMonitor::isCanceled() will always regardless. Expected Results: When the suer clicks the Cancel button on the dialog, calling IProgressMonitor::isCanceled() should return true so that the executing IRunnableWithProgress can have a chance to honour the user's request and exit.
bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Layout;
import org.eclipse.swt.widgets.Shell;
/**
 * A dialog to show a wizard to the end user. 
 * <p>
 * In typical usage, the client instantiates this class with 
 * a particular wizard. The dialog serves as the wizard container
 * and orchestrates the presentation of its pages.
 * <p>
 * The standard layout is roughly as follows: 
 * it has an area at the top containing both the
 * wizard's title, description, and image; the actual wizard page
 * appears in the middle; below that is a progress indicator
 * (which is made visible if needed); and at the bottom
 * of the page is message line and a button bar containing 
 * Help, Next, Back, Finish, and Cancel buttons (or some subset).
 * </p>
 * <p>
 * Clients may subclass <code>WizardDialog</code>, although this
 * is rarely required.
 * </p>
 */
public class WizardDialog extends TitleAreaDialog implements IWizardContainer2, IPageChangeProvider {