AnActionEvent (AnAction action) { final Presentation presentation = new Presentation(); presentation.copyFrom(action.getTemplatePresentation()); return AnActionEvent.createFromAnAction(action, null, "", DataManager.getInstance().getDataContext()); }