@Override
  public void addTypeReference(UElement uElement, PsiType psiType, RefManager refManager, @Nullable RefJavaElement refMethod) {
    if (!(psiType instanceof PsiClassType)) return;
    final RefClass ownerClass = getOwnerClass(refManager, uElement);
    if (ownerClass == null) return;
    psiType = psiType.getDeepComponentType();
    PsiClass psiClass = PsiUtil.resolveClassInType(psiType);
    if (psiClass != null && refManager.belongsToScope(psiClass)) {
      RefClassImpl refClass = (RefClassImpl)refManager.getReference(psiClass);
      if (refClass != null) {
        refClass.addTypeReference(ownerClass);
        if (refMethod != null) {
          refClass.addClassExporter(refMethod);
        }
      }
    }
    else {
      ((RefManagerImpl)refManager).fireNodeMarkedReferenced(psiClass, uElement.getSourcePsi());
    }
  }
@Override
  public void addTypeReference(UElement uElement, PsiType psiType, RefManager refManager, @Nullable RefJavaElement refMethod)