void (@Nullable SimpleDiffChange previousChange) { if (getChange().isPartiallyExcluded() && getViewer().myAllowExcludeChangesFromCommit) { assert myHighlighters.isEmpty() && myOperations.isEmpty(); int changeStart1 = getChange().getStartLine(Side.LEFT); int changeStart2 = getChange().getStartLine(Side.RIGHT); RangeExclusionState.Partial exclusionState = (RangeExclusionState.Partial)getChange().getExclusionState(); exclusionState.iterateDeletionOffsets((start, end, isIncluded) -> { myHighlighters.addAll( new DiffDrawUtil.LineHighlighterBuilder(myViewer.getEditor(Side.LEFT), start + changeStart1, end + changeStart1, TextDiffType.DELETED) .withExcludedInEditor(myChange.isSkipped()) .withExcludedInGutter(!isIncluded) .withAlignedSides(myViewer.needAlignChanges()) .done()); return null; }); exclusionState.iterateAdditionOffsets((start, end, isIncluded) -> { myHighlighters.addAll( new DiffDrawUtil.LineHighlighterBuilder(myViewer.getEditor(Side.RIGHT), start + changeStart2, end + changeStart2, TextDiffType.INSERTED) .withExcludedInEditor(myChange.isSkipped()) .withExcludedInGutter(!isIncluded) .withAlignedSides(myViewer.needAlignChanges()) .done()); return null; }); if (exclusionState.getDeletionsCount() == 0) { myHighlighters.addAll( new DiffDrawUtil.LineHighlighterBuilder(myViewer.getEditor(Side.LEFT), changeStart1, changeStart1, TextDiffType.INSERTED) .withExcludedInEditor(myChange.isSkipped()) .withExcludedInGutter(false) .withAlignedSides(myViewer.needAlignChanges()) .done()); } if (exclusionState.getAdditionsCount() == 0) { myHighlighters.addAll( new DiffDrawUtil.LineHighlighterBuilder(myViewer.getEditor(Side.RIGHT), changeStart2, changeStart2, TextDiffType.DELETED) .withExcludedInEditor(myChange.isSkipped()) .withExcludedInGutter(false) .withAlignedSides(myViewer.needAlignChanges()) .done()); } // do not draw ">>" // doInstallActionHighlighters(); } else { super.installHighlighter(previousChange); } }