boolean registerInstanceExpression(PsiExpression instanceExpression, final PsiClass contextClass) {
    if (myInstanceExpression == null) {
      if (instanceExpression != null) {
        final PsiType type = instanceExpression.getType();
        if (!(type instanceof PsiClassType)) return false;
        final PsiClass hisClass = ((PsiClassType) type).resolve();
        if (hisClass == null || !InheritanceUtil.isInheritorOrSelf(hisClass, contextClass, true)) return false;
      }
      myInstanceExpression = Ref.create(instanceExpression);
      return true;
    }
    else {
      if (myInstanceExpression.get() == null) {
        myInstanceExpression.set(instanceExpression);

        return instanceExpression == null;
      }
      if (instanceExpression != null) {
        return PsiEquivalenceUtil.areElementsEquivalent(instanceExpression, myInstanceExpression.get());
      }
      return myInstanceExpression.get() instanceof PsiThisExpression;
    }
  }
boolean registerInstanceExpression(PsiExpression instanceExpression, final PsiClass contextClass)