void (Editor editor) { EditorActionHandler handler = EditorActionManager.getInstance().getActionHandler(IdeActions.ACTION_EDITOR_ENTER); Caret caret = editor.getCaretModel().getCurrentCaret(); handler.execute(editor, caret, CaretSpecificDataContext.create( DataManager.getInstance().getDataContext(editor.getContentComponent()), caret)); }