void (@NotNull Document document, int startOffset, int endOffset, @NotNull CharSequence newText) { try { myDuringModification = true; document.replaceString(startOffset, endOffset, newText); } finally { myDuringModification = false; } }