String (String text, PsiElement token) { StringBuilder buffer = new StringBuilder(text.length()); @NonNls String breaker = getLineBreaker(token); final String[] lines = LineTokenizer.tokenize(text.toCharArray(), false, true); for (int i = 0; i < lines.length; i++) { buffer.append(escapeCharCharacters(lines[i], token)); if (i != lines.length - 1) { buffer.append(breaker); } else if (text.endsWith("\n")) { buffer.append("\\n"); } } text = buffer.toString(); return text; }