void (boolean rootsChanged) { if (rootsChanged) { if (getApplication().isUnitTestMode()) { doRefresh(); } else { getApplication().executeOnPooledThread(this::doRefresh); } } else { getApplication().invokeLater(() -> isRefreshing = false, ModalityState.nonModal()); } }