void (@NotNull Editor editor, char charTyped, @NotNull DataContext dataContext) { if (editor.isViewer()) { return; } Document doc = editor.getDocument(); doc.startGuardedBlockChecking(); try { final String str = String.valueOf(charTyped); CommandProcessor.getInstance().setCurrentCommandName(EditorBundle.message("typing.in.editor.command.name")); EditorModificationUtil.typeInStringAtCaretHonorMultipleCarets(editor, str, true); } catch (ReadOnlyFragmentModificationException e) { EditorActionManager.getInstance().getReadonlyFragmentModificationHandler(doc).handle(e); } finally { doc.stopGuardedBlockChecking(); } }