code: public void setElement(RuleElement newElement)
    {
      if (newElement != element)
      {
        NotificationChain msgs = null;
        if (element != null)
          msgs = ((InternalEObject)element).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SimpleAntlrPackage.ELEMENT_WITH_CARDINALITY__ELEMENT, null, msgs);
        if (newElement != null)
          msgs = ((InternalEObject)newElement).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SimpleAntlrPackage.ELEMENT_WITH_CARDINALITY__ELEMENT, null, msgs);
        msgs = basicSetElement(newElement, msgs);
        if (msgs != null) msgs.dispatch();
      }
      else if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, SimpleAntlrPackage.ELEMENT_WITH_CARDINALITY__ELEMENT, newElement, newElement));
    }
docs: <!-- begin-user-doc -->
  <!-- end-user-doc -->
  @generated