void (@NotNull AnActionEvent e) { if (myFindUsagesTitle == null || myProject == null) { e.getPresentation().setVisible(false); return; } PsiElement[] elements = getElements(); e.getPresentation().setEnabled(elements.length > 0); }