List<RangeHighlighter> (@NotNull UnifiedFragmentBuilder builder, @NotNull ToggleableLineRange toggleableLineRange) { LineFragmentData fragmentData = toggleableLineRange.getFragmentData(); if (!fragmentData.isFromActiveChangelist()) return Collections.emptyList(); List<RangeHighlighter> result = new ArrayList<>(); RangeExclusionState exclusionState = fragmentData.getExclusionState(); if (fragmentData.isPartiallyExcluded()) { RangeExclusionState.Partial partialExclusionState = (RangeExclusionState.Partial)exclusionState; Range lineRange = toggleableLineRange.getLineRange(); partialExclusionState.iterateDeletionOffsets((start, end, isIncluded) -> { for (int i = start; i < end; i++) { result.add(createLineCheckboxToggleHighlighter(builder, i + lineRange.start1, Side.LEFT, !isIncluded)); } return null; }); partialExclusionState.iterateAdditionOffsets((start, end, isIncluded) -> { for (int i = start; i < end; i++) { result.add(createLineCheckboxToggleHighlighter(builder, i + lineRange.start2, Side.RIGHT, !isIncluded)); } return null; }); } else { result.add(createBlockCheckboxToggleHighlighter(builder, toggleableLineRange)); } if (LocalTrackerDiffUtil.shouldShowToggleAreaThumb(toggleableLineRange)) { ContainerUtil.addIfNotNull(result, createToggleAreaThumb(builder, toggleableLineRange)); } return result; }