void (final @NotNull Editor editor, final @NotNull Point p, final int offset1, final int offset2, final @NotNull LightweightHint hint, final @NotNull QuestionAction action, @PositionFlags short constraint) { if (ExperimentalUI.isNewUI() && hint.getComponent() instanceof HintUtil.HintLabel label) { JEditorPane pane = label.getPane(); if (pane != null) { pane.addHyperlinkListener(e -> { if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED && "action".equals(e.getDescription()) && hint.isVisible()) { if (action.execute()) { hint.hide(); } } }); } } int flags = HintManager.HIDE_BY_ANY_KEY | HintManager.HIDE_BY_TEXT_CHANGE | HintManager.UPDATE_BY_SCROLLING | HintManager.HIDE_IF_OUT_OF_EDITOR | HintManager.DONT_CONSUME_ESCAPE; showQuestionHint(editor, p, offset1, offset2, hint, flags, action, constraint); }