@After
 @UI
 public void after() {
   if (mDialog != null) {
     mDialog.close();
   }
 }
  /**
   * Creates a workbench preference dialog to a particular preference page. Show the other pages as
   * filtered results using whatever filtering criteria the search uses. It is the responsibility of
   * the caller to then call <code>open()</code>. The call to <code>open()</code> will not return
   * until the dialog closes, so this is the last chance to manipulate the dialog.
   *
   * @param shell The shell to use to parent the dialog if required.
   * @param propertyPageId The identifier of the preference page to open; may be <code>null</code>.
   *     If it is <code>null</code>, then the dialog is opened with no selected page.
   * @param element IAdaptable An adaptable element to open the dialog on.
   * @param displayedIds The ids of the other pages to be displayed using the same filtering
   *     criterea as search. If this is <code>null</code>, then the all preference pages are shown.
   * @param data Data that will be passed to all of the preference pages to be applied as specified
   *     within the page as they are created. If the data is <code>null</code> nothing will be
   *     called.
   * @return A preference dialog showing properties for the selection or <code>null</code> if it
   *     could not be created.
   * @since 3.1
   */
  public static final PreferenceDialog createPropertyDialogOn(
      Shell shell,
      final IAdaptable element,
      String propertyPageId,
      String[] displayedIds,
      Object data) {

    FilteredPreferenceDialog dialog = PropertyDialog.createDialogOn(shell, propertyPageId, element);

    if (dialog == null) {
      return null;
    }

    applyOptions(data, displayedIds, dialog);

    return dialog;
  }