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