public static boolean isStringOrCharacterLiteral(final PsiElement place) {
    return place instanceof PsiLiteralExpression && PsiUtil.isJavaToken(place.getFirstChild(), ElementType.TEXT_LITERALS);
  }
public static boolean isStringOrCharacterLiteral(final PsiElement place)