boolean (PsiReferenceExpression expression, PsiType type) { PsiClass psiClass = PsiUtil.resolveClassInClassTypeOnly(type); if (psiClass != null) { String qualifiedName = psiClass.getQualifiedName(); if (qualifiedName != null && myClasses.containsKey(qualifiedName)) { PsiElement name = expression.getReferenceNameElement(); registerError(name == null ? expression : name, qualifiedName, expression); return true; } } return false; }