Examples of eDirectResource()


Examples of org.eclipse.emf.ecore.InternalEObject.eDirectResource()

      return id;
    }
    else
    {
      InternalEObject internalEObject = (InternalEObject)eObject;
      if (internalEObject.eDirectResource() == this || unloadingContents != null && unloadingContents.contains(internalEObject))
      {
        return "/" + getURIFragmentRootSegment(eObject);
      }
      else
      {
View Full Code Here

Examples of org.eclipse.emf.ecore.InternalEObject.eDirectResource()

          boolean result =
            eContainer == owner &&
              (hasNavigableInverse() ?
                 eObject.eBaseStructuralFeatureID(eObject.eContainerFeatureID(), dataClass) == getInverseFeatureID() :
                 InternalEObject.EOPPOSITE_FEATURE_BASE - eObject.eContainerFeatureID() == getFeatureID());
          if (hasProxies() && !result && eContainer == null && eObject.eDirectResource() != null)
          {
            for (int i = 0; i < size; ++i)
            {
              EObject containedEObject = resolveProxy((EObject)data[i]);
              if (containedEObject == object)
View Full Code Here

Examples of org.eclipse.emf.ecore.InternalEObject.eDirectResource()

          boolean result =
            eContainer == owner &&
              (hasNavigableInverse() ?
                 eObject.eBaseStructuralFeatureID(eObject.eContainerFeatureID(), getInverseFeatureClass()) == getInverseFeatureID() :
                 InternalEObject.EOPPOSITE_FEATURE_BASE - eObject.eContainerFeatureID() == getFeatureID());
          if (hasProxies() && !result && eContainer == null && eObject.eDirectResource() != null)
          {
            for (int i = 0; i < size; ++i)
            {
              EObject containedEObject = resolveProxy((EObject)delegateGet(i));
              if (containedEObject == object)
View Full Code Here

Examples of org.eclipse.emf.ecore.InternalEObject.eDirectResource()

      return id;
    }
    else
    {
      InternalEObject internalEObject = (InternalEObject)eObject;
      if (internalEObject.eDirectResource() == this || unloadingContents != null && unloadingContents.contains(internalEObject))
      {
        return "/" + getURIFragmentRootSegment(eObject);
      }
      else
      {
View Full Code Here

Examples of org.eclipse.emf.ecore.InternalEObject.eDirectResource()

      {
        container.eUnset(feature);
      }
    }

    Resource resource = internalEObject.eDirectResource();
    if (resource != null)
    {
      resource.getContents().remove(eObject);
    }
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.InternalEObject.eDirectResource()

      {
        container.eSet(feature, replacementEObject);
      }
    }

    Resource resource = internalEObject.eDirectResource();
    if (resource != null)
    {
      List<EObject> list = resource.getContents();
      list.set(list.indexOf(eObject), replacementEObject);
    }
View Full Code Here

Examples of org.eclipse.emf.ecore.InternalEObject.eDirectResource()

      Set<EObject> crossResourceEObjects = new HashSet<EObject>();       
      eObjects.add(eObject);
      for (@SuppressWarnings("unchecked") TreeIterator<InternalEObject> j = (TreeIterator<InternalEObject>)(TreeIterator<?>)eObject.eAllContents();  j.hasNext(); )
      {
        InternalEObject childEObject = j.next();
        if (childEObject.eDirectResource() != null)
        {
          crossResourceEObjects.add(childEObject);
        }
        else
        {
View Full Code Here

Examples of org.eclipse.emf.ecore.InternalEObject.eDirectResource()

          boolean result =
            eContainer == owner &&
              (hasNavigableInverse() ?
                eObject.eBaseStructuralFeatureID(eObject.eContainerFeatureID(), getInverseFeatureClass()) == getInverseFeatureID() :
                 InternalEObject.EOPPOSITE_FEATURE_BASE - eObject.eContainerFeatureID() == getFeatureID());
          if (hasProxies() && !result && eContainer == null && eObject.eDirectResource() != null)
          {
            for (int i = 0; i < size; ++i)
            {
              EObject containedEObject = resolveProxy((EObject)delegateGet(i));
              if (containedEObject == object)
View Full Code Here

Examples of org.eclipse.emf.ecore.InternalEObject.eDirectResource()

    {
      // Don't remove the adapter if the object is in a different resource
      // and that resource (and hence all its contents) are being cross referenced.
      //
      InternalEObject internalEObject = i.next();
      Resource eDirectResource = internalEObject.eDirectResource();
      if (eDirectResource == null || !eDirectResource.eAdapters().contains(this))
      {
        removeAdapter(internalEObject);
      }
    }
View Full Code Here

Examples of org.eclipse.emf.ecore.InternalEObject.eDirectResource()

      BasicDBObject dbObject = new BasicDBObject(2);
      dbObject.put(Keywords.PROXY_KEY, uriHandler.deresolve(eProxyURI).toString());
      dbObject.put(Keywords.ECLASS_KEY, EcoreUtil.getURI(targetObject.eClass()).toString());
      return dbObject;
    }
    else if (!eReference.isContainment() || (eReference.isResolveProxies() && internalEObject.eDirectResource() != null))
    {
      // Cross-document containment, or non-containment reference - build a proxy

      BasicDBObject dbObject = new BasicDBObject(2);
      dbObject.put(Keywords.PROXY_KEY, uriHandler.deresolve(EcoreUtil.getURI(targetObject)).toString());
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.