void (@NotNull AnActionEvent e) { final DataContext dataContext = e.getDataContext(); final Project project = CommonDataKeys.PROJECT.getData(dataContext); final Module module = LangDataKeys.MODULE_CONTEXT.getData(dataContext); e.getPresentation().setVisible(project != null && module != null); }