private boolean isThisReferenceToContainingClass(PsiElement oldExpr) {
    if (!(oldExpr instanceof GrReferenceExpression && PsiUtil.isThisReference(oldExpr))) return false;

    final GrReferenceExpression qualifier = (GrReferenceExpression)((GrReferenceExpression)oldExpr).getQualifier();
    if (qualifier == null) return true;

    final PsiClass contextClass = PsiUtil.getContextClass(myToReplaceIn);
    final PsiElement resolved = qualifier.resolve();
    return myManager.areElementsEquivalent(resolved, contextClass);
  }
private boolean isThisReferenceToContainingClass(PsiElement oldExpr)