void () { processUnsuccessfulSelections(toSelect, o -> { if (myUi.getTree().isRootVisible() || !myUi.getTreeStructure().getRootElement().equals(o)) { addSelection(o); } return o; }, originallySelected); processAdjusted(adjusted, originallySelected).doWhenDone(new TreeRunnable("UpdaterTreeState.restore: on done") { @Override public void perform() { myUi.expand(toExpand, new TreeRunnable("UpdaterTreeState.restore: after on done") { @Override public void perform() { myUi.clearUpdaterState(); setProcessingNow(false); } }, true); } }); }