void (@NotNull AnActionEvent e) { super.update(e); if (e.getPresentation().isEnabledAndVisible()) { final RefEntity[] elements = InspectionTree.getSelectedRefElements(e); for (RefEntity element : elements) { if (!((RefElement) element).isEntry()) { return; } } e.getPresentation().setEnabled(false); } }