void (@NotNull TextMergeChange change, @NotNull Side side, boolean resolveChange) { if (change.isResolved(side)) return; if (!change.isChange(side)) { markChangeResolved(change); return; } ThreeSide sourceSide = side.select(ThreeSide.LEFT, ThreeSide.RIGHT); ThreeSide oppositeSide = side.select(ThreeSide.RIGHT, ThreeSide.LEFT); Document sourceDocument = getContent(sourceSide).getDocument(); int sourceStartLine = change.getStartLine(sourceSide); int sourceEndLine = change.getEndLine(sourceSide); List<String> newContent = DiffUtil.getLines(sourceDocument, sourceStartLine, sourceEndLine); if (change.isConflict()) { boolean append = change.isOnesideAppliedConflict(); if (append) { myModel.appendChange(change.getIndex(), newContent); } else { myModel.replaceChange(change.getIndex(), newContent); } if (resolveChange || change.getStartLine(oppositeSide) == change.getEndLine(oppositeSide)) { markChangeResolved(change); } else { change.markOnesideAppliedConflict(); markChangeResolved(change, side); } } else { myModel.replaceChange(change.getIndex(), newContent); markChangeResolved(change); } }