void (CaretEvent e) { if (myStickySelection) { int selectionStart = Math.min(myStickySelectionStart, getDocument().getTextLength() - 1); mySelectionModel.setSelection(selectionStart, myCaretModel.getVisualPosition(), myCaretModel.getOffset()); } final IndentGuideDescriptor newGuide = myIndentsModel.getCaretIndentGuide(); if (!Comparing.equal(myCurrentCaretGuide, newGuide)) { repaintGuide(newGuide); repaintGuide(myCurrentCaretGuide); myCurrentCaretGuide = newGuide; if (myCurrentHint != null) { myCurrentHint.hide(); myCurrentHint = null; } if (newGuide != null) { final Rectangle visibleArea = getScrollingModel().getVisibleArea(); final int line = newGuide.startLine; if (logicalLineToY(line) < visibleArea.y) { TextRange textRange = new TextRange(myDocument.getLineStartOffset(line), myDocument.getLineEndOffset(line)); myCurrentHint = EditorFragmentComponent.showEditorFragmentHint(EditorImpl.this, textRange, false, false); } } } }