String (PsiExpression expression) { if (!(expression instanceof PsiLiteralExpression)) { throw new IllegalArgumentException(); } final String text = expression.getText(); // don't need CommentTracker because literal can't contain comment final int length = text.length(); if (text.charAt(0) == '"') { if (length == 1 || !text.endsWith("\"") || endsWithEscapedQuote(text)) { return text + '"'; } } return text; }