void (@NotNull AnActionEvent e) { final OrderEntry entry = myPanel.getSelectedEntry(); e.getPresentation().setEnabledAndVisible(entry instanceof ModuleOrderEntry && ((ModuleOrderEntry)entry).getModule() != null || entry instanceof LibraryOrderEntry && ((LibraryOrderEntry)entry).getLibrary() != null); }