@Override
    boolean isWriteAllowed(PsiVariable variable, PsiExpression reference) {
      if (myVariable == variable) {
        if (PsiUtil.skipParenthesizedExprUp(reference.getParent()) ==
            PsiTreeUtil.getParentOfType(myExpression, PsiAssignmentExpression.class)) {
          return true;
        }
        PsiForStatement forStatement = PsiTreeUtil.getParentOfType(variable, PsiForStatement.class);
        if (forStatement != null && forStatement == PsiTreeUtil.getParentOfType(myVariable, PsiForStatement.class)) {
          return PsiTreeUtil.isAncestor(forStatement.getUpdate(), reference, false) ||
                 PsiTreeUtil.isAncestor(forStatement.getCondition(), reference, false);
        }
      }
      return false;
    }
@Override
    boolean isWriteAllowed(PsiVariable variable, PsiExpression reference)