void () { if (getChange().isPartiallyExcluded() && getViewer().myAllowExcludeChangesFromCommit) { assert myHighlighters.isEmpty() && myOperations.isEmpty(); int deletionStart = myChange.getDeletedRange().start; int additionStart = myChange.getInsertedRange().start; RangeExclusionState.Partial exclusionState = (RangeExclusionState.Partial)getChange().getExclusionState(); exclusionState.iterateDeletionOffsets((start, end, isIncluded) -> { myHighlighters.addAll( new DiffDrawUtil.LineHighlighterBuilder(myEditor, start + deletionStart, end + deletionStart, TextDiffType.DELETED) .withExcludedInEditor(myChange.isSkipped()) .withExcludedInGutter(!isIncluded) .done()); return null; }); exclusionState.iterateAdditionOffsets((start, end, isIncluded) -> { myHighlighters.addAll( new DiffDrawUtil.LineHighlighterBuilder(myEditor, start + additionStart, end + additionStart, TextDiffType.INSERTED) .withExcludedInEditor(myChange.isSkipped()) .withExcludedInGutter(!isIncluded) .done()); return null; }); // do not draw ">>" // doInstallActionHighlighters(); } else { super.installHighlighter(); } }