void (@NotNull Project project, @Nullable Editor editor, @NotNull @DialogMessage String message, @NotNull @DialogTitle String title, @Nullable String helpId) { if (ApplicationManager.getApplication().isHeadlessEnvironment()) { throw new RefactoringErrorHintException(message); } // Invoke editor.getComponent() before invokeLater(), so we can quickly fail // and get better stack trace if the imaginary editor is supplied boolean noRootPane = editor == null || editor.getComponent().getRootPane() == null; ApplicationManager.getApplication().invokeLater(() -> { if (noRootPane) { showErrorMessage(title, message, helpId, project); } else { IdeUiService.getInstance().showErrorHint(editor, message); } }); }