EA-61137 - IOE: PsiJavaParserFacadeImpl.createExpressionFromText

This commit is contained in:
Anna Kozlova
2014-10-07 13:31:30 +02:00
parent f6d39ec36b
commit 1cb7588757
@@ -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);
}
}
}