void () { myUpdating.set(true); try { fireUpdateStarted(); myTree = new DTree(null, "", true); mySource.refresh(true); myTarget.refresh(true); scan(mySource, myTree, true); scan(myTarget, myTree, false); } catch (final IOException e) { LOG.warn(e); reportException(DiffBundle.message("refresh.failed.message", StringUtil.decapitalize(e.getLocalizedMessage()))); } finally { myTree.setSource(mySource); myTree.setTarget(myTarget); myTree.update(mySettings); ArrayList<DirDiffElementImpl> elements = new ArrayList<>(); fillElements(myTree, elements); myElements.clear(); myElements.addAll(elements); myUpdating.set(false); fireUpdateFinished(); } }