void (Graphics g, Rectangle clip) { if (myDocument.getLineCount() == 0) return; int startLineNumber = yPositionToVisibleLineNumber(clip.y); int endLineNumber = yPositionToVisibleLineNumber(clip.y + clip.height) + 1; RangeHighlighter[] segmentHighlighters; final MarkupModel docMarkup = myDocument.getMarkupModel(myProject); if (docMarkup != null) { segmentHighlighters = docMarkup.getAllHighlighters(); for (int i = 0; i < segmentHighlighters.length; i++) { paintSegmentHighlighterAfterEndOfLine(g, (RangeHighlighterEx)segmentHighlighters[i], startLineNumber, endLineNumber); } } segmentHighlighters = getMarkupModel().getAllHighlighters(); for (int i = 0; i < segmentHighlighters.length; i++) { RangeHighlighter segmentHighlighter = segmentHighlighters[i]; paintSegmentHighlighterAfterEndOfLine(g, (RangeHighlighterEx)segmentHighlighter, startLineNumber, endLineNumber); } }