void (@Nullable Couple<ASTNode> reparseableRoots, @NotNull StringBuilder result, @NotNull CharSequence newText) { TextRange reparsedRange; if (reparseableRoots == null) { reparsedRange = TextRange.create(0, newText.length()); } else { reparsedRange = TextRange.from(reparseableRoots.first.getStartOffset(), reparseableRoots.second.getTextLength()); } result.append(newText, 0, reparsedRange.getStartOffset()); result.append("<reparse>"); result.append(newText, reparsedRange.getStartOffset(), reparsedRange.getEndOffset()); result.append("</reparse>"); result.append(newText, reparsedRange.getEndOffset(), newText.length()); }