@Override
    boolean isWriteAllowed(PsiVariable variable, PsiExpression reference) {
      if (variable == myVariable) {
        PsiForStatement forStatement = PsiTreeUtil.getParentOfType(variable, PsiForStatement.class);
        if (forStatement != null) {
          return PsiTreeUtil.isAncestor(forStatement.getUpdate(), reference, false);
        }
      }
      return false;
    }
@Override
    boolean isWriteAllowed(PsiVariable variable, PsiExpression reference)