@Override
  public int showMessageDialog(@Nullable Project project,
                               @Nullable Component parentComponent,
                               String message,
                               @Nls(capitalization = Nls.Capitalization.Title) String title,
                               String @NotNull [] options,
                               int defaultOptionIndex,
                               int focusedOptionIndex,
                               @Nullable Icon icon,
                               @Nullable DoNotAskOption doNotAskOption,
                               boolean alwaysUseIdeaUI,
                               @Nullable String helpId) {
    if (isApplicationInUnitTestOrHeadless()) {
      return TestDialogManager.getTestImplementation().show(message);
    }

    AlertMessagesManager alertMessagesManager = AlertMessagesManager.getInstanceIfPossible();
    if (alertMessagesManager != null) {
      return alertMessagesManager.showMessageDialog(project, parentComponent, message, title, options, defaultOptionIndex,
                                                    focusedOptionIndex, icon, doNotAskOption, helpId);
    }

    MessageDialog dialog = new MessageDialog(project, parentComponent, message, title, options, defaultOptionIndex, focusedOptionIndex,
                                             icon, doNotAskOption, false, helpId);
    dialog.show();
    return dialog.getExitCode();
  }
@Override
  public int showMessageDialog(@Nullable Project project,
                               @Nullable Component parentComponent,
                               String message,
                               @Nls(capitalization = Nls.Capitalization.Title) String title,
                               String @NotNull [] options,
                               int defaultOptionIndex,
                               int focusedOptionIndex,
                               @Nullable Icon icon,
                               @Nullable DoNotAskOption doNotAskOption,
                               boolean alwaysUseIdeaUI,
                               @Nullable String helpId)