@Override
    boolean isWriteAllowed(PsiVariable variable, PsiExpression reference) {
      return variable == myCounterVariable && PsiTreeUtil.isAncestor(myCounter, reference, false);
    }
@Override
    boolean isWriteAllowed(PsiVariable variable, PsiExpression reference)