void (@NotNull AnActionEvent e) { e.getPresentation().setEnabledAndVisible( isEnabled(e.getProject()) && (findMethodAtCaret(e) != null || findClassAtCaret(e) != null || !findFilesInContext(e).isEmpty() || e.getData(VcsDataKeys.CHANGES) != null) ); }