public static void hint(boolean isWarning,
                           @Nls(capitalization = Sentence) @NotNull String hint,
                           @NotNull ShowUsagesParameters parameters,
                           @NotNull ShowUsagesActionHandler actionHandler) {
    Project project = parameters.project;
    Editor editor = parameters.editor;

    Runnable runnable = () -> {
      if (!actionHandler.isValid()) {
        return;
      }

      ReadAction.nonBlocking(
        () -> suggestSecondInvocation(hint, getSecondInvocationHint(actionHandler))
      ).finishOnUiThread(ModalityState.nonModal(), (@NlsContexts.HintText String secondInvocationHintHtml) -> {
        if (!actionHandler.isValid()) {
          return;
        }

        JComponent label = createHintComponent(
          secondInvocationHintHtml,
          isWarning,
          createSettingsButton(
            project,
            ShowUsagesAction::hideHints,
            showDialogAndRestartRunnable(parameters, actionHandler)
          )
        );

        ShowUsagesActionState state = getState(project);
        state.continuation = showUsagesInMaximalScopeRunnable(parameters, actionHandler, null);
        Runnable clearContinuation = () -> state.continuation = null;

        if (editor == null || editor.isDisposed() || !UIUtil.isShowing(editor.getContentComponent())) {
          label.setBorder(JBUI.Borders.empty(5));
          int flags = HintManager.HIDE_BY_ANY_KEY | HintManager.HIDE_BY_TEXT_CHANGE | HintManager.HIDE_BY_SCROLLING;
          HintManager.getInstance().showHint(label, parameters.popupPosition, flags, 0, clearContinuation);
        }
        else {
          HintManager.getInstance().showInformationHint(editor, label, clearContinuation);
        }
      }).submit(AppExecutorUtil.getAppExecutorService());
    };

    if (editor == null) {
      //opening editor is performing in invokeLater
      IdeFocusManager.getInstance(project).doWhenFocusSettlesDown(() -> {
        // after new editor created, some editor resizing events are still bubbling. To prevent hiding hint, invokeLater this
        IdeFocusManager.getInstance(project).doWhenFocusSettlesDown(runnable);
      });
    }
    else {
      //opening editor is performing in invokeLater
      IdeFocusManager.getInstance(project).doWhenFocusSettlesDown(
        () -> editor.getScrollingModel().runActionOnScrollingFinished(
          () -> {
            // after new editor created, some editor resizing events are still bubbling. To prevent hiding hint, invokeLater this
            IdeFocusManager.getInstance(project).doWhenFocusSettlesDown(
              () -> AsyncEditorLoader.Companion.performWhenLoaded(editor, runnable)
            );
          })
      );
    }
  }
public static void hint(boolean isWarning,
                           @Nls(capitalization = Sentence) @NotNull String hint,
                           @NotNull ShowUsagesParameters parameters,
                           @NotNull ShowUsagesActionHandler actionHandler)