void (@NotNull DiffRequest request, boolean force, @Nullable ScrollToPolicy scrollToChangePolicy) { if (!force && request == myActiveRequest) return; request.putUserData(DiffUserDataKeysEx.SCROLL_TO_CHANGE, scrollToChangePolicy); DiffUtil.runPreservingFocus(myContext, () -> { myState.destroy(); myToolbarStatusPanel.setContent(null); myContentPanel.setContent(null); myTopPanel.setBorder(null); myDiffInfoWrapper.setContent(null); myToolbarGroup.removeAll(); myRightToolbarGroup.removeAll(); myPopupActionGroup.removeAll(); ActionUtil.clearActions(myMainPanel); ProgressManager.getInstance().executeNonCancelableSection(() -> { onAssigned(myActiveRequest, false); myActiveRequest = request; onAssigned(myActiveRequest, true); FrameDiffTool frameTool = null; try { frameTool = findFittedTool(myToolOrder, myContext, myActiveRequest, myForcedDiffTool); myState = createState(frameTool); try { myState.init(); } catch (Throwable e) { myState.destroy(); throw e; } } catch (Throwable e) { LOG.error(e); myState = new ErrorState(new ErrorDiffRequest(DiffBundle.message("error.cant.show.diff.message"), e), frameTool); myState.init(); } }); }); myEventDispatcher.getMulticaster().onViewerChanged(); }