String (PsiExpression @NotNull [] operands) { String[] lines = new String[operands.length]; for (int i = 0; i < operands.length; i++) { PsiExpression operand = operands[i]; PsiLiteralExpression literal = ObjectUtils.tryCast(operand, PsiLiteralExpression.class); if (literal == null) return null; String line; if (ExpressionUtils.hasStringType(literal) && !literal.isTextBlock()) { line = PsiLiteralUtil.getStringLiteralContent(literal); } else { Object value = literal.getValue(); line = value == null ? null : value.toString(); } if (line == null) return null; lines[i] = line; } // IDEA-226395 String[] textBlockLines = getTextBlockLines(lines); int indent = PsiLiteralUtil.getTextBlockIndent(textBlockLines, true, true); if (indent > 0 && textBlockLines.length > 0 && textBlockLines[textBlockLines.length - 1].endsWith("\n")) indent = 0; if (indent > 0) return null; return StringUtil.join(lines); }