private static boolean isInGeneratedSource(PsiClass containingClass) {
    VirtualFile virtualFile = PsiUtilCore.getVirtualFile(containingClass);
    if (virtualFile != null) {
      boolean isGeneratedSource = JavaProjectRootsUtil.isInGeneratedCode(virtualFile, containingClass.getProject());
      if (isGeneratedSource) {
        return true;
      }
    }
    return false;
  }
private static boolean isInGeneratedSource(PsiClass containingClass)