void (Graphics g, Rectangle clip) { int lineHeight = editor.getLineHeight(); int startLine = clip.y / lineHeight; int endLine = Math.min(((clip.y + clip.height) / lineHeight) + 1, editor.getVisibleLineCount()); if (startLine >= endLine) { return; } if (!atLineStart) { g.setColor(JBColor.BLUE); } g.setFont(editor.getColorsScheme().getFont(EditorFontType.PLAIN)); int y = ((startLine + 1) * lineHeight) - editor.getDescent(); FontMetrics fontMetrics = editor.getFontMetrics(Font.PLAIN); for (int line = startLine; line < endLine; line++) { int logicalLine = editor.visualToLogicalPosition(new VisualPosition(line, 0)).line; if (atLineStart) { gutterContentProvider.drawIcon(logicalLine, g, y, editor); } else { String text = gutterContentProvider.getText(logicalLine, editor); if (text != null) { // right-aligned g.drawString(text, maxContentWidth - gap - fontMetrics.stringWidth(text), y); } } y += lineHeight; } }