public static @Nullable HighlightInfo.Builder checkUnicodeBadCharacter(@NotNull PsiElement element) {
    ASTNode node = element.getNode();
    if (node != null && node.getElementType() == TokenType.BAD_CHARACTER) {
      char c = element.textToCharArray()[0];
      boolean printable = StringUtil.isPrintableUnicode(c) && !Character.isSpaceChar(c);
      @NlsSafe String hex = String.format("U+%04X", (int)c);
      String text = AnalysisBundle.message("text.illegal.character", printable ? c + " (" + hex + ")" : hex);
      return HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(element).descriptionAndTooltip(text);
    }

    return null;
  }
public static @Nullable HighlightInfo.Builder checkUnicodeBadCharacter(@NotNull PsiElement element)