void (char c, @NotNull Editor editor, @Nullable Project project) { if (c == '\n') { executeAction(IdeActions.ACTION_EDITOR_ENTER, editor, project); } else { DataContext dataContext = DataManager.getInstance().getDataContext(); TypedAction action = TypedAction.getInstance(); action.actionPerformed(editor, c, dataContext); } }