void () { if (myDisposed) return; boolean isEditorPreview = isEditorPreview(myProject); boolean hasSplitterPreview = !isCommitToolWindowShown(myProject); //noinspection DoubleNegation boolean needUpdatePreviews = isEditorPreview != (myEditorChangeProcessor != null) || hasSplitterPreview != (mySplitterChangeProcessor != null); if (!needUpdatePreviews) return; if (myEditorChangeProcessor != null) Disposer.dispose(myEditorChangeProcessor); if (mySplitterChangeProcessor != null) Disposer.dispose(mySplitterChangeProcessor); if (isEditorPreview) { myEditorChangeProcessor = new ChangesViewDiffPreviewProcessor(myView, true); Disposer.register(this, myEditorChangeProcessor); myEditorDiffPreview = installEditorPreview(myEditorChangeProcessor, hasSplitterPreview); } else { myEditorChangeProcessor = null; myEditorDiffPreview = null; } if (hasSplitterPreview) { mySplitterChangeProcessor = new ChangesViewDiffPreviewProcessor(myView, false); Disposer.register(this, mySplitterChangeProcessor); mySplitterDiffPreview = installSplitterPreview(mySplitterChangeProcessor); } else { mySplitterChangeProcessor = null; mySplitterDiffPreview = null; } configureDiffPreview(); }