void (ConsoleViewImpl consoleView) { Editor editor = consoleView.getEditor(); Set<Shortcut> backShortcuts = Set.of(ActionManager.getInstance().getAction(IdeActions.ACTION_EDITOR_BACKSPACE).getShortcutSet().getShortcuts()); List<AnAction> actions = ActionUtil.getActions(consoleView.getEditor().getContentComponent()); AnAction handler = ContainerUtil.find(actions, a -> Set.of(a.getShortcutSet().getShortcuts()).equals(backShortcuts)); CommandProcessor.getInstance().executeCommand(getProject(), () -> EditorTestUtil.executeAction(editor, true, handler), "", null, editor.getDocument()); }