String (PsiLiteralExpression expression) { final PsiType type = expression.getType(); if (PsiTypes.charType().equals(type)) { final String result = StringUtil.unquoteString(expression.getText()); if (result.equals("\"")) return "\\\""; if (result.equals("\\'")) return "'"; return result; } else if (type instanceof PsiPrimitiveType) { return Objects.requireNonNull(expression.getValue()).toString(); } else if (expression.isTextBlock()) { return PsiLiteralUtil.getTextBlockText(expression); } else { return PsiLiteralUtil.getStringLiteralContent(expression); } }