Promise<TreePath> (@NotNull String parentPath, @NotNull PackagingElement<?> element) { Predicate<PackagingElementNode<?>> filter = node -> node.getPackagingElements().stream().anyMatch(element::isEqualTo); return TreeUtil.promiseSelect(myTree, myTree.createVisitorCompositeNodeChild(parentPath, filter)); }