void (@NotNull TreePath path, @NotNull Consumer<? super TreePath> consumer) { AsyncTreeModel model = (AsyncTreeModel)tree.getModel(); model.resolve(path).onError(promise::setError).onSuccess(consumer); }