void (@NotNull Project project, @NotNull Document document, @NotNull LineMarkerInfo<?> marker) { ApplicationManager.getApplication().assertIsNonDispatchThread(); ApplicationManager.getApplication().assertReadAccessAllowed(); MarkupModelEx markupModel = (MarkupModelEx)DocumentMarkupModel.forDocument(document, project, true); LineMarkerInfo<?>[] markerInTheWay = {null}; boolean allIsClear; HighlightersRecycler toReuse = new HighlightersRecycler(); synchronized (LOCK) { try { allIsClear = markupModel.processRangeHighlightersOverlappingWith(marker.startOffset, marker.endOffset, highlighter -> { if (HighlightingMarkupGrave.isZombieMarkup(highlighter)) { toReuse.recycleHighlighter(highlighter); return true; } LineMarkerInfo<?> info = getLineMarkerInfo(highlighter); if (info != null) { markerInTheWay[0] = info; return false; } return true; }); if (allIsClear) { createOrReuseLineMarker(marker, markupModel, toReuse); } } finally { toReuse.releaseHighlighters(); } } if (LOG.isDebugEnabled()) { LOG.debug("addLineMarkerToEditorIncrementally: "+marker+" "+(allIsClear ? "created" : " (was not added because "+markerInTheWay[0] +" was in the way)")); } }