@Nullable
  private static String prepareText(String text, boolean isFirst, boolean isLast, boolean isBeforeInjection) {
    if (isFirst) {
      if (text.startsWith("\"\"\"")) {
        text = text.substring(3);
      }
      else text = StringUtil.trimStart(text, "\"");
    }
    if (isLast) {
      if (text.endsWith("\"\"\"")) {
        text = text.substring(0, text.length() - 3);
      }
      else text = StringUtil.trimEnd(text, "\"");
    }
    if (isBeforeInjection) {
      text = text.substring(0, text.length() - 1);
    }
    if (text.isEmpty()) return null;


    final StringBuilder buffer = new StringBuilder();
    if (text.indexOf('\n') >= 0) {
      GrStringUtil.escapeAndUnescapeSymbols(text, "", "\"$", buffer);
      GrStringUtil.fixAllTripleQuotes(buffer, 0);
    }
    else {
      GrStringUtil.escapeAndUnescapeSymbols(text, "'", "\"$", buffer);
    }
    return GrStringUtil.addQuotes(buffer.toString(), false);
  }
@Nullable
  private static String prepareText(String text, boolean isFirst, boolean isLast, boolean isBeforeInjection)