void () { Document doc = editor.getDocument(); doc.startGuardedBlockChecking(); try { myAction.getHandler().execute(editor, charTyped, dataContext); } catch (ReadOnlyFragmentModificationException e) { EditorActionManager.getInstance().getReadonlyFragmentModificationHandler(doc).handle(e); } finally { doc.stopGuardedBlockChecking(); } }