void (Runnable onDone) { LOG.debug(new RuntimeException("reload a whole tree")); CompletableFuture<?> future = myStructureTreeModel.invalidateAsync(); if (onDone != null) { future.thenRun(() -> myAsyncTreeModel.onValidThread(onDone)); } }