From 1cb758875701fbb631efe86df9132eabb4357e69 Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Mon, 6 Oct 2014 19:10:32 +0200 Subject: [PATCH] EA-61137 - IOE: PsiJavaParserFacadeImpl.createExpressionFromText --- .../codeInsight/javadoc/JavaDocInfoGenerator.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/java/java-psi-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java b/java/java-psi-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java index 18dbccb258c5..3c9e76151e1d 100644 --- a/java/java-psi-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java +++ b/java/java-psi-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java @@ -639,13 +639,15 @@ public class JavaDocInfoGenerator { String text = o.toString(); PsiType type = variable.getType(); if (type.equalsToText(CommonClassNames.JAVA_LANG_STRING)) { - text = "\"" + StringUtil.escapeLineBreak(StringUtil.shortenPathWithEllipsis(text, 120)) + "\""; + text = "\"" + StringUtil.escapeStringCharacters(StringUtil.shortenPathWithEllipsis(text, 120)) + "\""; + } + else if (type.equalsToText("char")) { + text = "'" + text + "'"; } - else if (type.equalsToText("char")) text = "'" + text + "'"; try { return instance.getElementFactory().createExpressionFromText(text, variable); } catch (IncorrectOperationException ex) { - LOG.error(text, ex); + LOG.info("type:" + type.getCanonicalText() + "; text: " + text, ex); } } }