public static ChangeList build( @NotNull Document base, @NotNull Document version, @NotNull Project project) throws FilesTooBigForDiffException { ChangeList result = new ChangeList(base, version, project); ArrayList<Change> changes = result.buildChanges(); Collections.sort(changes, CHANGE_ORDER); result.setChanges(changes); return result; }
@Override public void onApplied() { myType = ChangeType.deriveApplied(myType); for (SimpleChangeSide side : mySides) { ChangeHighlighterHolder highlighterHolder = side.getHighlighterHolder(); highlighterHolder.setActions(new AnAction[0]); highlighterHolder.updateHighlighter(side, myType); } myChangeList.apply(this); }
@NotNull private SimpleChangeSide createSide( @NotNull ChangeList changeList, @NotNull TextRange range1, @NotNull FragmentSide side) { return new SimpleChangeSide( side, new DiffRangeMarker(changeList.getDocument(side), range1, this)); }
@Override protected void removeFromList() { myChangeList.remove(this); }
@Override public void onRangeInvalidated() { myChangeList.remove(this); }