void (@NotNull AnActionEvent e) { Project project = getEventProject(e); VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE); e.getPresentation().setEnabledAndVisible(project != null && underSymlink(file)); }