void (@NotNull AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); if (ActionPlaces.isPopupPlace(e.getPlace())) { VirtualFile vFile = e.getData(CommonDataKeys.VIRTUAL_FILE); e.getPresentation().setEnabledAndVisible(project != null && isPatchFile(vFile)); } else { e.getPresentation().setVisible(true); e.getPresentation().setEnabled(project != null); } }