String (@NotNull List<? super UExpression> formatParameters, @NotNull Project project, UExpression expression, boolean nested) { String elseStr; if (expression instanceof ULiteralExpression) { Object elseValue = ((ULiteralExpression)expression).getValue(); if (elseValue != null) { elseStr = PsiConcatenationUtil.formatString(elseValue.toString(), false); elseStr = nested ? PsiConcatenationUtil.formatString(elseStr, false) : elseStr; } else { elseStr = "null"; } } else { UStringConcatenationsFacade concatenation = UStringConcatenationsFacade.createFromTopConcatenation(expression); if (concatenation != null) { elseStr = buildUnescapedFormatString(concatenation, formatParameters, project, true); } else { elseStr = "{" + formatParameters.size() + "}"; formatParameters.add(expression); } } return elseStr.replaceAll("([<>|#])", "'$1'"); }