public static void showErrorMessage(final Project project, @DialogMessage String message, @DialogTitle String title) {
    Runnable task = () -> Messages.showErrorDialog(project, message, title);
    WaitForProgressToShow.runOrInvokeLaterAboveProgress(task, null, project);
  }
public static void showErrorMessage(final Project project, @DialogMessage String message, @DialogTitle String title)