void (boolean userForcedRefresh) { fireUpdateStarted(); myUpdating.set(true); myTable.getEmptyText().setText(StatusText.getDefaultEmptyText()); JBLoadingPanel loadingPanel = getLoadingPanel(); loadingPanel.startLoading(); ModalityState modalityState = ModalityState.current(); ApplicationManager.getApplication().executeOnPooledThread(() -> { EmptyProgressIndicator indicator = new EmptyProgressIndicator(modalityState); ProgressManager.getInstance().executeProcessUnderProgress(() -> { try { if (myDisposed) return; startAndSetUpdater(new Updater(loadingPanel, 100)); text.set(CommonBundle.getLoadingTreeNodeText()); myTree = new DTree(null, "", true); mySource.refresh(userForcedRefresh); myTarget.refresh(userForcedRefresh); scan(mySource, myTree, true); scan(myTarget, myTree, false); } catch (IOException e) { LOG.warn(e); reportException(DiffBundle.message("refresh.failed.message", StringUtil.decapitalize(e.getLocalizedMessage()))); } finally { if (myTree != null) { myTree.setSource(mySource); myTree.setTarget(myTarget); myTree.update(mySettings); ApplicationManager.getApplication().invokeLater(this::fireUpdateFinished, ModalityState.any()); applySettings(); } } }, indicator); }); }