use of org.eclipse.wst.dtd.core.internal.emf.DTDEntity in project webtools.sourceediting by eclipse.
the class DTDAttributeImpl method basicSetAttributeTypeReferencedEntity.
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetAttributeTypeReferencedEntity(DTDEntity newAttributeTypeReferencedEntity, NotificationChain msgs) {
DTDEntity oldAttributeTypeReferencedEntity = attributeTypeReferencedEntity;
attributeTypeReferencedEntity = newAttributeTypeReferencedEntity;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY, oldAttributeTypeReferencedEntity, newAttributeTypeReferencedEntity);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.wst.dtd.core.internal.emf.DTDEntity in project webtools.sourceediting by eclipse.
the class DTDParameterEntityReferenceImpl method basicSetEntity.
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetEntity(DTDEntity newEntity, NotificationChain msgs) {
DTDEntity oldEntity = entity;
entity = newEntity;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY, oldEntity, newEntity);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.wst.dtd.core.internal.emf.DTDEntity in project webtools.sourceediting by eclipse.
the class DTDAttributeImpl method basicSetAttributeNameReferencedEntity.
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetAttributeNameReferencedEntity(DTDEntity newAttributeNameReferencedEntity, NotificationChain msgs) {
DTDEntity oldAttributeNameReferencedEntity = attributeNameReferencedEntity;
attributeNameReferencedEntity = newAttributeNameReferencedEntity;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY, oldAttributeNameReferencedEntity, newAttributeNameReferencedEntity);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.wst.dtd.core.internal.emf.DTDEntity in project webtools.sourceediting by eclipse.
the class DTDUtil method loadIncludedDTD.
// load xmiModels for included DTDs
private void loadIncludedDTD(ResourceSet resources, DTD dtd) {
ExternalDTDModel extModel = getExternalDTDModel(resources, dtd.getName());
if (extModel != null) {
// now fill our hash tables for elements and parameter entities
// so that we know what can be referenced by our main dtd
DTDFile file = extModel.getExternalDTDFile();
Collection elementList = file.listDTDElement();
Collection entityList = file.listDTDEntity();
Iterator i = elementList.iterator();
while (i.hasNext()) {
DTDObject object = (DTDObject) i.next();
elementPool.put(getBaseName(object), object);
}
i = entityList.iterator();
while (i.hasNext()) {
DTDEntity entity = (DTDEntity) i.next();
if (entity.isParameterEntity()) {
pePool.put(getBaseName(entity), entity);
}
}
}
}
use of org.eclipse.wst.dtd.core.internal.emf.DTDEntity in project webtools.sourceediting by eclipse.
the class DTDUtil method getName.
// This gets the name with pseudo namespace prefixes if dtdFile is not
// null
public static String getName(DTDObject obj, DTDFile dtdFile) {
// $NON-NLS-1$
String name = "";
if (obj instanceof DTDEntity) {
DTDEntity entity = (DTDEntity) obj;
if (dtdFile != null && !entity.getDTDFile().equals(dtdFile)) {
// $NON-NLS-1$
name = new Path(entity.getDTDFile().getName()).lastSegment() + ": ";
}
// $NON-NLS-1$ //$NON-NLS-2$
name += "%" + ((DTDEntity) obj).getName() + ";";
} else if (obj instanceof DTDElement) {
DTDElement element = (DTDElement) obj;
if (dtdFile != null && !element.getDTDFile().equals(dtdFile)) {
// $NON-NLS-1$
name = new Path(element.getDTDFile().getName()).lastSegment() + ": ";
}
name += ((DTDElement) obj).getName();
} else if (obj instanceof DTDElementContent) {
return ((DTDElementContent) obj).getContentName();
}
return name;
}
Aggregations