Search in sources :

Example 1 with DTDParameterEntityReference

use of org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference in project webtools.sourceediting by eclipse.

the class DTDEntityImpl method basicSetParmEntityRef.

/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetParmEntityRef(DTDParameterEntityReference newParmEntityRef, NotificationChain msgs) {
    DTDParameterEntityReference oldParmEntityRef = parmEntityRef;
    parmEntityRef = newParmEntityRef;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY__PARM_ENTITY_REF, oldParmEntityRef, newParmEntityRef);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) DTDParameterEntityReference(org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference)

Example 2 with DTDParameterEntityReference

use of org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference in project webtools.sourceediting by eclipse.

the class DTDModelBuilder method visitParameterEntityReferenceDecl.

public void visitParameterEntityReferenceDecl(EntityDecl entity) {
    // This is a parameter entity reference.
    // Add the link to the real entity that it references
    DTDParameterEntityReference parmEntRef = getFactory().createDTDParameterEntityReference();
    dtdFile.getDTDObject().add(parmEntRef);
    String entityName = entity.getNodeName();
    // Add the reference to the DTDEntity
    DTDEntity dtdentity = getDTDFile().findEntity(entityName);
    if (dtdentity != null) {
        parmEntRef.setEntity(dtdentity);
    }
    if (entity.getErrorMessage() != null) {
        addErrorMessage(entity.getErrorMessage(), dtdentity);
    }
    // System.out.println("adding PE reference: " + declName);
    super.visitParameterEntityReferenceDecl(entity);
}
Also used : DTDParameterEntityReference(org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference) DTDEntity(org.eclipse.wst.dtd.core.internal.emf.DTDEntity)

Aggregations

DTDParameterEntityReference (org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 DTDEntity (org.eclipse.wst.dtd.core.internal.emf.DTDEntity)1