void (final @NotNull Editor editor, final @NotNull Point p, final int offset1, final int offset2, final @NotNull LightweightHint hint, int flags, final @NotNull QuestionAction action, @HintManager.PositionFlags short constraint) { ThreadingAssertions.assertEventDispatchThread(); hideQuestionHint(); RangeHighlighter highlighter; if (offset1 != offset2) { TextAttributes attributes = new TextAttributes(); attributes.setEffectColor(HintUtil.QUESTION_UNDERSCORE_COLOR); attributes.setEffectType(EffectType.LINE_UNDERSCORE); highlighter = editor.getMarkupModel() .addRangeHighlighter(offset1, offset2, HighlighterLayer.ERROR + 1, attributes, HighlighterTargetArea.EXACT_RANGE); } else { highlighter = null; } hint.addHintListener(new HintListener() { @Override public void hintHidden(@NotNull EventObject event) { hint.removeHintListener(this); if (highlighter != null) { highlighter.dispose(); } if (myQuestionHint == hint) { myQuestionAction = null; myQuestionHint = null; } } }); showEditorHint(hint, editor, HintManagerImpl.createHintHint(editor, p, hint, constraint), p, flags, 0, false, null); myQuestionAction = action; myQuestionHint = hint; }