AsyncPromise<Void> () { AsyncPromise<Void> result = new AsyncPromise<>(); TreeVisitor visitor = path -> { AbstractTreeNode node = TreeUtil.getLastUserObject(AbstractTreeNode.class, path); if (node != null) node.update(); return TreeVisitor.Action.CONTINUE; }; rebuild(false).onProcessed(ignore1 -> myAsyncTreeModel.accept(visitor).onProcessed(ignore2 -> result.setResult(null))); return result; }