PsiClass (PsiFile containingFile, Project project, XmlAttribute attribute) { final String attributeValue = attribute.getValue(); if (!StringUtil.isEmptyOrSpaces(attributeValue)) { final GlobalSearchScope customScope = GlobalSearchScope.projectScope(project).intersectWith(containingFile.getResolveScope()); return JavaPsiFacade.getInstance(project).findClass(attributeValue, customScope); } return null; }