Bug 29163 SafeRunnable needs to be accessible in JFace
We need to be able to access the SafeRunnable in JFace in order that some error protection can be added to preferences and properties dialogs.
bundles/org.eclipse.ui.workbench/extensions/org/eclipse/jface/dialogs/ProgressMonitorDialog.java
/**
 * Enables the cancel button (asynchronously).
 */
private void asyncSetOperationCancelButtonEnabled(final boolean b) {
	if (getShell() != null) {
		getShell().getDisplay().asyncExec(new Runnable() {
			public void run() {
				setOperationCancelButtonEnabled(b);
			}
		});
	}
}
/* (non-Javadoc)
 * Method declared on Window.
 */
/**
 * The <code>ProgressMonitorDialog</code> implementation of this method
 * only closes the dialog if there are no currently running runnables.
 */
public boolean close() {
	if (runningRunnables <= 0) {
		if (cancel != null && !cancel.isDisposed()) {
			cancel.setCursor(null);
		}
		Shell shell = getShell();
		if (shell != null && !shell.isDisposed()) {
			shell.setCursor(null);
		}
		if (arrowCursor != null)
			arrowCursor.dispose();