String generateReplacementText(@NotNull SortableList list) {
      StringBuilder sb = new StringBuilder();
      boolean newLineRequired = list.generate(sb);
      if (newLineRequired) {
        sb.append("\n");
      }
      sb.append("}");
      return sb.toString();
    }
String generateReplacementText(@NotNull SortableList list)