void (@NotNull FileSystemTree fileSystemTree, @NotNull AnActionEvent e) { VirtualFile parent = fileSystemTree.getNewFileParent(); e.getPresentation().setEnabled(parent != null && parent.isDirectory()); }