public class ModelObjectAdapter extends TranslatorAdapter implements org.eclipse.emf.common.notify.Adapter, org.eclipse.wst.sse.core.internal.provisional.INodeAdapter
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<org.eclipse.emf.ecore.EStructuralFeature,TranslatorAdapter> |
childAdapters |
private org.eclipse.emf.ecore.EObject |
eobject |
private SSESyncResource |
resource |
private org.eclipse.emf.common.notify.Notifier |
target |
node| Constructor and Description |
|---|
ModelObjectAdapter(SSESyncResource resource,
org.eclipse.emf.ecore.EObject eobject,
org.w3c.dom.Element node) |
| Modifier and Type | Method and Description |
|---|---|
private TranslatorAdapter |
createOrGetChildAdapter(org.eclipse.emf.ecore.EStructuralFeature feature) |
org.eclipse.emf.common.notify.Notifier |
getTarget() |
private void |
insertElement(org.w3c.dom.Element element)
Inserts an element under the current node, attempting to preserve proper node ordering.
|
boolean |
isAdapterForType(java.lang.Object type) |
void |
load()
Populates all child model objects from the child nodes in the dom tree.
|
void |
notifyChanged(org.eclipse.wst.sse.core.internal.provisional.INodeNotifier notifier,
int eventType,
java.lang.Object changedFeature,
java.lang.Object oldValue,
java.lang.Object newValue,
int pos) |
void |
notifyChanged(org.eclipse.emf.common.notify.Notification notification) |
private void |
removeDomChild(org.eclipse.emf.ecore.EStructuralFeature feature)
Removes the dom child matching the feature.
|
void |
save()
Populates all child dom objects from the model children.
|
void |
setTarget(org.eclipse.emf.common.notify.Notifier target) |
void |
update(java.lang.Object oldValue,
java.lang.Object newValObject,
int index) |
absoluteIndexOf, createWSAfter, createWSBefore, formatNode, getElementText, getFirstChildWithName, getNode, getNthChildWithName, namedIndexOf, removeChildElement, setNodeprivate SSESyncResource resource
private org.eclipse.emf.ecore.EObject eobject
private org.eclipse.emf.common.notify.Notifier target
private java.util.Map<org.eclipse.emf.ecore.EStructuralFeature,TranslatorAdapter> childAdapters
public ModelObjectAdapter(SSESyncResource resource, org.eclipse.emf.ecore.EObject eobject, org.w3c.dom.Element node)
public boolean isAdapterForType(java.lang.Object type)
isAdapterForType in interface org.eclipse.emf.common.notify.AdapterisAdapterForType in interface org.eclipse.wst.sse.core.internal.provisional.INodeAdapterpublic void notifyChanged(org.eclipse.wst.sse.core.internal.provisional.INodeNotifier notifier,
int eventType,
java.lang.Object changedFeature,
java.lang.Object oldValue,
java.lang.Object newValue,
int pos)
notifyChanged in interface org.eclipse.wst.sse.core.internal.provisional.INodeAdapterpublic void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
notifyChanged in interface org.eclipse.emf.common.notify.Adapterpublic void update(java.lang.Object oldValue,
java.lang.Object newValObject,
int index)
update in class TranslatorAdapterprivate TranslatorAdapter createOrGetChildAdapter(org.eclipse.emf.ecore.EStructuralFeature feature)
private void removeDomChild(org.eclipse.emf.ecore.EStructuralFeature feature)
feature - private void insertElement(org.w3c.dom.Element element)
element - position - public void load()
load in class TranslatorAdapterpublic void save()
save in class TranslatorAdapterpublic org.eclipse.emf.common.notify.Notifier getTarget()
getTarget in interface org.eclipse.emf.common.notify.Adapterpublic void setTarget(org.eclipse.emf.common.notify.Notifier target)
setTarget in interface org.eclipse.emf.common.notify.Adapter