void (String markedText) { myConsole.setInputText(markedText); EditorTestUtil.CaretAndSelectionState state = EditorTestUtil.extractCaretAndSelectionMarkers(myConsole.getEditorDocument()); EditorTestUtil.setCaretsAndSelection(myConsole.getConsoleEditor(), state); PsiDocumentManager.getInstance(getProject()).commitAllDocuments(); }