void (@NotNull AnActionEvent e) { VirtualFile[] roots = e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY); Project project = e.getProject(); e.getPresentation().setEnabled(roots != null && roots.length > 0 && project != null); }