Examples of EMF2DOMAdapter


Examples of org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapter

      for (int i = 0; i < writeCount; i++)
        xmlModel.releaseFromEdit();
      for (int ii = 0; ii < readCount; ii++)
        xmlModel.releaseFromRead();
    }
    EMF2DOMAdapter adapter = (EMF2DOMAdapter) EcoreUtil.getAdapter(resource.eAdapters(), EMF2DOMAdapter.ADAPTER_CLASS);
    if (adapter != null) {
      adapter.removeAdapters(adapter.getNode());
    }
    xmlModel = null;
    xmlModelId = null;
  }
View Full Code Here

Examples of org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapter

  }

  private void setRootNodeAdapterNotificationEnabled(boolean b) {
    EObject root = resource.getRootObject();
    if (root != null) {
      EMF2DOMAdapter adapter = (EMF2DOMAdapter) EcoreUtil.getExistingAdapter(root, EMF2DOMAdapter.ADAPTER_CLASS);
      if (adapter != null) {
        adapter.setNotificationEnabled(b);
        if (b)
          adapter.updateDOM();
      }
    }
  }
View Full Code Here

Examples of org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapter

  protected EMF2DOMAdapter createAdapter(Node node, Translator childMap) {

    //Assert.isNotNull(childMap.getChildAdapterClass());
    Assert.isNotNull(node);

    EMF2DOMAdapter adapter = primGetExistingAdapter(node,childMap);

    if (adapter != null) {
      if (adapter.isMOFProxy() || adapter.getTarget() == null) {
        removeDOMAdapter(node, adapter);
        if (adapter.getTarget() != null) {
          adapter.getTarget().eAdapters().remove(adapter);
        }
        adapter = null;
      }
    }
    if (adapter == null) {
View Full Code Here

Examples of org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapter

    // Only add the adapter if this is an child node that will not be
    // adapted. For instance a subtree that maps to a MOF attribute
    // setting.
    if (childNode.getNodeType() == Node.ELEMENT_NODE) {
      EMF2DOMAdapter attrAdapter = primGetExistingAdapter(childNode);

      if (attrAdapter == null || attrAdapter.getNode() != getNode()) {
        // If the node is adapted, but not by this adapter then remove
        // it. This happens to non-object children when the parent tag
        // name is changed.
        removeDOMAdapter(childNode, attrAdapter);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.