private Object aboutToStart(boolean cancelable) {
    Map savedState = null;
    Shell shell = getShell();
    if (shell != null) {
      // Save focus control
      Control focusControl = getShell().getDisplay().getFocusControl();
      if (focusControl != null && focusControl.getShell() != getShell()) focusControl = null;

      Button cancelButton = getButton(IDialogConstants.CANCEL_ID);
      // Set the busy cursor to all shells.
      Display d = getShell().getDisplay();
      setDisplayCursor(d, d.getSystemCursor(SWT.CURSOR_WAIT));

      // Set the arrow cursor to the cancel component.
      cancelButton.setCursor(d.getSystemCursor(SWT.CURSOR_ARROW));

      boolean hasProgressMonitor = fProgressMonitorPart != null;

      // Deactivate shell
      savedState = saveUIState(false);
      if (focusControl != null) savedState.put("focus", focusControl); // $NON-NLS-1$

      if (hasProgressMonitor) {
        if (cancelable) fProgressMonitorPart.attachToCancelComponent(cancelButton);
        fStatusContainer.showPage(fProgressMonitorPart);
      }
      // Update the status container since we are blocking the event loop right now.
      fStatusContainer.update();
    }
    return savedState;
  }