private static PsiClass getClassFromThisExpression(PsiThisExpression thisExpression, PsiElement context) {
      final PsiJavaCodeReferenceElement qualifier = thisExpression.getQualifier();
      if (qualifier == null) {
        return PsiTreeUtil.getParentOfType(context, PsiClass.class);
      }
      else {
        final PsiElement target = qualifier.resolve();
        return target instanceof PsiClass ? (PsiClass)target : null;
      }
    }
private static PsiClass getClassFromThisExpression(PsiThisExpression thisExpression, PsiElement context)