@Override
  public PsiVariable getUsedVariable(@NotNull PsiReferenceExpression refExpr) {
    if (isLocalOrMyInstanceReference(refExpr)) {
      return ObjectUtils.tryCast(refExpr.resolve(), PsiVariable.class);
    }
    return null;
  }
@Override
  public PsiVariable getUsedVariable(@NotNull PsiReferenceExpression refExpr)