void (@NotNull TreeVisitor visitor, boolean allowLoading, @NotNull Consumer<? super TreePath> consumer) { AsyncTreeModel model = (AsyncTreeModel)tree.getModel(); model.accept(visitor, allowLoading).onError(promise::setError).onSuccess(consumer); }