private static void processGString(PsiElement element, String quote, StringBuilder buffer) {
    final ASTNode node = element.getNode();

    for (ASTNode child = node.getFirstChildNode(); child != null; child = child.getTreeNext()) {
      final IElementType type = child.getElementType();
      if (type == GroovyTokenTypes.mGSTRING_BEGIN || type == GroovyTokenTypes.mGSTRING_END) continue;
      if (type == GroovyElementTypes.GSTRING_INJECTION) {
        buffer.append(child.getText());
      }
      else {
        String value = child.getText();
        int prev = 0;
        if (!isInjection(child.getTreePrev())) {
          buffer.append(quote);
        }
        for (int pos = value.indexOf("\\n"); pos >= 0; pos = value.indexOf("\\n", prev)) {
          int end = checkForR(value, pos);
          buffer.append(value, prev, end);
          prev = end;
          buffer.append(quote);
          buffer.append("+\n");
          buffer.append(quote);
        }
        buffer.append(value.substring(prev));
        if (!isInjection(child.getTreeNext())) {
          buffer.append(quote);
        }
      }
    }
  }
private static void processGString(PsiElement element, String quote, StringBuilder buffer)