RangeHighlighter (final MarkupModel markupModel, final TreeMap<Integer, LineData> executableLines, @Nullable final String className, final int line, final int lineNumberInCurrent, @NotNull final CoverageSuitesBundle coverageSuite) { // Use maximum layer here for coverage markers to be visible in diff view var highlighter = markupModel.addLineHighlighter(lineNumberInCurrent, HighlighterLayer.SELECTION - 1, null); Function<Integer, Integer> newToOldConverter = newLine -> { var oldLineMapping = myMapper.canGetFastMapping() ? myMapper.getNewToOldLineMapping() : null; return oldLineMapping != null ? oldLineMapping.getOrDefault(newLine.intValue(), -1) : newLine; }; Function<Integer, Integer> oldToNewConverter = newLine -> { var newLineMapping = myMapper.canGetFastMapping() ? myMapper.getOldToNewLineMapping() : null; return newLineMapping != null ? newLineMapping.getOrDefault(newLine.intValue(), -1) : newLine; }; var markerRenderer = coverageSuite.getLineMarkerRenderer(line, className, executableLines, isCoverageByTestApplicable(coverageSuite), coverageSuite, newToOldConverter, oldToNewConverter, CoverageDataManager.getInstance(myProject).isSubCoverageActive()); highlighter.setLineMarkerRenderer(markerRenderer); final LineData lineData = className != null ? executableLines.get(line) : null; var editor = myEditor; if (lineData != null && lineData.getStatus() == LineCoverage.NONE && editor != null) { highlighter.setErrorStripeMarkColor(markerRenderer.getErrorStripeColor(editor)); highlighter.setThinErrorStripeMark(true); highlighter.setGreedyToLeft(true); highlighter.setGreedyToRight(true); } return highlighter; }