void (@NotNull AnActionEvent e) { final PsiClass target = getComponentInContext(e.getDataContext()); final Presentation presentation = e.getPresentation(); presentation.setEnabledAndVisible(target != null); }