public static void checkIsIdentifier(@NotNull PsiManager manager, String text) throws IncorrectOperationException{
    if (!PsiNameHelper.getInstance(manager.getProject()).isIdentifier(text)){
      throw new IncorrectOperationException(JavaPsiBundle.message("0.is.not.an.identifier", text) );
    }
  }
public static void checkIsIdentifier(@NotNull PsiManager manager, String text)