@Override
  public void visitReferenceExpression(@NotNull GrReferenceExpression ref) {
    GrExpression qualifier = ref.getQualifier();

    if (qualifier != null && !(PsiUtil.isThisOrSuperRef(qualifier))) {
      qualifier.accept(this);

      if (!(qualifier instanceof GrReferenceExpression) || !(((GrReferenceExpression) qualifier).resolve() instanceof PsiClass)) {
        return;
      }
    }

    GroovyResolveResult resolveResult = ref.advancedResolve();
    PsiElement resolved = resolveResult.getElement();
    if (resolved instanceof GrMember) {
      PsiClass containingClass = ((GrMember)resolved).getContainingClass();
      if (isPartOf(myClass, containingClass)) {
        visitClassMemberReferenceElement(ref, (GrMember)resolved, resolveResult);
      }
    }
  }
@Override
  public void visitReferenceExpression(@NotNull GrReferenceExpression ref)