Package org.eclipse.emf.ecore

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


  public static List<String> resourceOffsets(Resource resource) {
    List<String> result = new ArrayList<String>();
    TreeIterator<Object> iterator = EcoreUtil.getAllContents(resource, true);
    while (iterator.hasNext()) {
      InternalEObject child = (InternalEObject)iterator.next();
      INode node = (INode)child.eAdapters().get(0);
      result.add("" + node.getOffset() + ", " + node.getSemanticElement());
    }
    return result;
  }
 
View Full Code Here


    for (int i = 0; i < dbObjects.size(); i++)
    {
      InternalEObject internalEObject = eObjects[i];
      internalEObject.eSetProxyURI(baseURI.appendSegment(dbObjects.get(i).get(Keywords.ID_KEY).toString()).appendFragment("/"));
      internalEObject.eAdapters().clear();
      values.addUnique(internalEObject);
    }

    resource.getContents().clear();
    resource.getContents().add(eCollection);
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.