use of com.intellij.openapi.diff.impl.processing.DiffFragmentsProcessor in project intellij-community by JetBrains.
the class TodoCheckinHandlerWorker method getLineFragments.
private static ArrayList<LineFragment> getLineFragments(final String fileName, String beforeContent, String afterContent) throws VcsException {
try {
DiffFragment[] woFormattingBlocks = DiffPolicy.LINES_WO_FORMATTING.buildFragments(DiffString.create(beforeContent), DiffString.create(afterContent));
DiffFragment[] step1lineFragments = new DiffCorrection.TrueLineBlocks(ComparisonPolicy.IGNORE_SPACE).correctAndNormalize(woFormattingBlocks);
return new DiffFragmentsProcessor().process(step1lineFragments);
} catch (FilesTooBigForDiffException e) {
throw new VcsException("File " + fileName + " is too big and there are too many changes to build a diff", e);
}
}
Aggregations