void (MarkupModelEx markupModel) { markupModel.processRangeHighlightersOverlappingWith(myStartOffset, myEndOffset, rangeHighlighter -> { TextAttributes attributes = rangeHighlighter.getTextAttributes(myEditor.getColorsScheme()); EffectDescriptor borderDescriptor = getBorderDescriptor(attributes); if (borderDescriptor != null) { paintBorderEffect(rangeHighlighter.getAffectedAreaStartOffset(), rangeHighlighter.getAffectedAreaEndOffset(), borderDescriptor); } return true; }); }