void (VirtualFile[] file, final @Nullable Runnable onDone) { switch (file.length) { case 0 -> { myTree.clearSelection(); if (onDone != null) onDone.run(); } case 1 -> { myTree.clearSelection(); TreeUtil.promiseSelect(myTree, new FileNodeVisitor(file[0])).onProcessed(path -> { if (onDone != null) onDone.run(); }); } default -> { myTree.clearSelection(); TreeUtil.promiseSelect(myTree, Stream.of(file).map(FileNodeVisitor::new)).onProcessed(paths -> { if (onDone != null) onDone.run(); }); } } }