boolean (PsiElement element) { if (!(element instanceof PsiLiteralExpression expression)) { return false; } final PsiType type = expression.getType(); if (!PsiTypes.charType().equals(type)) { return false; } final String charLiteral = element.getText(); if (charLiteral.length() < 2) return false; // Incomplete char literal probably without closing amp final String charText = charLiteral.substring(1, charLiteral.length() - 1); if (StringUtil.unescapeStringCharacters(charText).length() != 1) { // not satisfied with character literals of more than one character return false; } return isInConcatenationContext(expression); }