void (@NotNull final Editor editor, String text) { final String value = text != null ? text : ""; final Document document = editor.getDocument(); WriteCommandAction.runWriteCommandAction(editor.getProject(), SSRBundle.message("modify.editor.content.command.name"), SS_GROUP, () -> document.replaceString(0, document.getTextLength(), value)); }