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, setNode
private 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.Adapter
isAdapterForType
in interface org.eclipse.wst.sse.core.internal.provisional.INodeAdapter
public 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.INodeAdapter
public void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
notifyChanged
in interface org.eclipse.emf.common.notify.Adapter
public void update(java.lang.Object oldValue, java.lang.Object newValObject, int index)
update
in class TranslatorAdapter
private 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 TranslatorAdapter
public void save()
save
in class TranslatorAdapter
public org.eclipse.emf.common.notify.Notifier getTarget()
getTarget
in interface org.eclipse.emf.common.notify.Adapter
public void setTarget(org.eclipse.emf.common.notify.Notifier target)
setTarget
in interface org.eclipse.emf.common.notify.Adapter