void (@NotNull final AnActionEvent e) { final Presentation presentation = e.getPresentation(); final Editor editor = e.getData(CommonDataKeys.EDITOR); presentation.setEnabled(editor != null && LookupManager.getActiveLookup(editor) != null); }