@Override
    PsiVariable getVariable(PsiElement element) {
      if (myContext instanceof PsiReferenceExpression ref && myContext.isValid() && PsiUtil.isAccessedForWriting(ref)) {
        return ObjectUtils.tryCast(ref.resolve(), PsiLocalVariable.class);
      }
      return null;
    }
@Override
    PsiVariable getVariable(PsiElement element)