void (int y, @NotNull List<? extends GutterMark> row, @NotNull LineGutterIconRendererProcessor processor) { if (row.isEmpty()) return; int middleCount = 0; int middleSize = 0; int x = getIconAreaOffset() + 2; for (GutterMark r : row) { if (!checkDumbAware(r)) continue; final Icon icon = scaleIcon(r.getIcon()); GutterIconRenderer.Alignment alignment = ((GutterIconRenderer)r).getAlignment(); if (alignment == GutterIconRenderer.Alignment.LINE_NUMBERS && !isLineNumbersShown()) { alignment = GutterIconRenderer.Alignment.LEFT; } switch (alignment) { case LEFT -> { processor.process(x, y + getTextAlignmentShift(icon), r); x += icon.getIconWidth() + getGapBetweenIcons(); } case CENTER -> { middleCount++; middleSize += icon.getIconWidth() + getGapBetweenIcons(); } case LINE_NUMBERS -> processor.process(getLineNumberAreaOffset() + getLineNumberAreaWidth() - icon.getIconWidth(), y + getTextAlignmentShift(icon), r); } } final int leftSize = x - getIconAreaOffset(); x = getIconAreaOffset() + myIconsAreaWidth; for (GutterMark r : row) { if (!checkDumbAware(r)) continue; if (((GutterIconRenderer)r).getAlignment() == GutterIconRenderer.Alignment.RIGHT) { Icon icon = scaleIcon(r.getIcon()); x -= icon.getIconWidth(); processor.process(x, y + getTextAlignmentShift(icon), r); x -= getGapBetweenIcons(); } } int rightSize = myIconsAreaWidth + getIconAreaOffset() - x + 1; if (middleCount > 0) { middleSize -= getGapBetweenIcons(); x = getIconAreaOffset() + leftSize + (myIconsAreaWidth - leftSize - rightSize - middleSize) / 2; for (GutterMark r : row) { if (!checkDumbAware(r)) continue; if (((GutterIconRenderer)r).getAlignment() == GutterIconRenderer.Alignment.CENTER) { Icon icon = scaleIcon(r.getIcon()); processor.process(x, y + getTextAlignmentShift(icon), r); x += icon.getIconWidth() + getGapBetweenIcons(); } } } }