void (@NotNull EditorMouseEvent e) { if (e.getArea() != EditorMouseEventArea.EDITING_AREA || !e.isOverText()) return; Editor editor = e.getEditor(); LogicalPosition logicalPosition = e.getLogicalPosition(); int offset = e.getOffset(); for (RangeHighlighter highlighter : editor.getMarkupModel().getAllHighlighters()) { String text = highlighter.getUserData(TOKEN_NAME); if (!StringUtil.isEmpty(text) && (highlighter.getStartOffset() < offset && highlighter.getEndOffset() > offset || !logicalPosition.leansForward && highlighter.getEndOffset() == offset || logicalPosition.leansForward && highlighter.getStartOffset() == offset)) { int hintOffset = highlighter.getStartOffset(); ourAlarm.cancelAllRequests(); ourAlarm.addRequest(() -> { LightweightHint hint = new LightweightHint(HintUtil.createInformationLabel(text)); Point point = HintManagerImpl.getHintPosition(hint, editor, editor.offsetToLogicalPosition(hintOffset).leanForward(true), HintManager.ABOVE); ((HintManagerImpl)HintManager.getInstance()).showEditorHint(hint, editor, point, 0, 0, false); }, DELAY); break; } } }