void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); if (SelectInContextImpl.createContext(event) == null) { presentation.setEnabledAndVisible(false); } else { presentation.setEnabledAndVisible(true); } }