AnActionEvent (@NotNull AnAction action, @Nullable InputEvent event, @NotNull String place, @NotNull DataContext dataContext) { int modifiers = event == null ? 0 : event.getModifiers(); Presentation presentation = action.getTemplatePresentation().clone(); AnActionEvent anActionEvent = new AnActionEvent(event, dataContext, place, presentation, ActionManager.getInstance(), modifiers); anActionEvent.setInjectedContext(action.isInInjectedContext()); return anActionEvent; }