private static @NotNull String buildReplacementText(@NotNull PsiElement element, @NotNull ActionContext context) {
    final String text = element.getText();
    final int offset = context.offset() - element.getTextOffset();
    final StringBuilder newLiteralText = new StringBuilder();
    final int index1 = indexOfOctalEscape(text, offset);
    final int index2 = indexOfOctalEscape(text, offset + 1);
    final int escapeStart = index2 == offset ? index2 : index1;
    newLiteralText.append(text, 0, escapeStart);
    final int escapeEnd = appendUnicodeEscape(text, escapeStart, newLiteralText);
    newLiteralText.append(text.substring(escapeEnd));
    return newLiteralText.toString();
  }
private static @NotNull String buildReplacementText(@NotNull PsiElement element, @NotNull ActionContext context)