Bug 151990 [Progress] Task Name Not Displayed in ProgressMonitorDialog with openOnRun==false
When setOpenOnRun(false) is used on a ProgressMonitorDialog, the task name is not displayed correctly. Steps to reproduce: 1) Instantiate a ProgressMonitorDialog 2) Call setOpenOnRun(false) 3) Call run() 4) After a delay, call open() Actual Result: The default task name "Operation in Progress" is displayed. Expected Result: The task name specified in the call to the monitor's beginTask method. Suggested fix: Call setMessage(task) whenn the dialog is opened.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ProgressMonitorDialog.java
import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IProgressMonitorWithBlocking;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.operation.IRunnableContext;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.operation.ModalContext;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Cursor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
/**
 * A modal dialog that displays progress during a long running operation.
 * <p>
 * This concrete dialog class can be instantiated as is, or further subclassed
 * as required.
 * </p>
 * <p>
 * Typical usage is:
 * 
 * <pre>