public static void showErrorDialog(@NotNull @NlsContexts.NotificationContent String text) {
    Application application = ApplicationManager.getApplication();
    if (application == null || application.isDisposed()) {
      return;
    }

    application.invokeLater(() -> {
      Messages.showErrorDialog(text,
                               IdeBundle.message("title.plugin.installation"));
    }, ModalityState.any());
  }
public static void showErrorDialog(@NotNull @NlsContexts.NotificationContent String text)