Runnable (@Nullable List<? extends SimpleDiffChange> changes, boolean isContentsEqual) { List<SimpleDiffChange> nonSkipped = changes != null ? ContainerUtil.filter(changes, it -> !it.isSkipped()) : null; FoldingModelSupport.Data foldingState = myFoldingModel.createState(nonSkipped, getFoldingModelSettings()); return () -> { myFoldingModel.updateContext(myRequest, getFoldingModelSettings()); clearDiffPresentation(); if (isContentsEqual && !DiffUtil.isUserDataFlagSet(DiffUserDataKeysEx.DISABLE_CONTENTS_EQUALS_NOTIFICATION, myContext, myRequest)) { myPanel.addNotification(TextDiffViewerUtil.createEqualContentsNotification(getContents())); } myModel.setChanges(ContainerUtil.notNullize(changes), isContentsEqual); myAlignedDiffModel.realignChanges(); myFoldingModel.install(foldingState, myRequest, getFoldingModelSettings()); myInitialScrollHelper.onRediff(); myContentPanel.repaintDivider(); myStatusPanel.update(); }; }