void (@NotNull AnActionEvent e) { VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE); boolean isDirectory = file != null && file.isDirectory(); e.getPresentation().setEnabledAndVisible(isDirectory && ExtensionsRootType.getInstance().getPath(file) != null); }