boolean (PsiReference reference) { final PsiClass containingClass = ClassUtils.getContainingClass(reference.getElement()); if (containingClass == null) return false; if (problemDescriptionsProcessor.getDescriptions(refEntity) != null) { if (containingClass != ref.get()) { problemDescriptionsProcessor.ignoreElement(refEntity); return false; } } else { final UElement anchor = refEntity instanceof RefMethod ? ((RefMethod)refEntity).getUastElement().getUastAnchor() : ((RefField)refEntity).getUastElement().getUastAnchor(); if (anchor == null) return false; if (isInGeneratedSource(containingClass)) return false; final PsiElement identifier = anchor.getSourcePsi(); final ProblemDescriptor problemDescriptor = createProblemDescriptor(manager, identifier, containingClass); problemDescriptionsProcessor.addProblemElement(refEntity, problemDescriptor); ref.set(containingClass); } return true; }