Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [EMF] BinaryResourceImpl uses globale package registry, not the registry of its resource set
[EMF] BinaryResourceImpl uses globale package registry, not the registry of its resource set [message #1015944] Mon, 04 March 2013 06:19 Go to previous message
Markus Scheidgen is currently offline Markus Scheidgen
Messages: 5
Registered: July 2009
Junior Member
When loading, BinaryResourceImpl resolves package URIs only with the global package registry (EPackage.Registry.INSTANCE), even if the resource is part of a resource set. Shouldn't it use the resource sets registry ResourceSet#getPackageRegistry() instead? Bug or feature? Is there a work around?

The current BinaryResoureceImpl (git master, head)
line: 1405
protected EPackageData readEPackage() throws IOException
    {
      int id = readCompressedInt();
      if (ePackageDataList.size() <= id)
      {
        EPackageData ePackageData = new EPackageData();
        String nsURI = readString();
        URI uri = readURI();
        if (resourceSet != null)
        {
          ePackageData.ePackage = EPackage.Registry.INSTANCE.getEPackage(nsURI);
          if (ePackageData.ePackage == null)
          {
            ePackageData.ePackage = (EPackage)resourceSet.getEObject(uri, true);
          }
        }
        else
        {
          ePackageData.ePackage = EPackage.Registry.INSTANCE.getEPackage(nsURI);
        }
        ePackageData.eClassData = new EClassData [ePackageData.ePackage.getEClassifiers().size()];
        ePackageDataList.add(ePackageData);
        return ePackageData;
      }
      else
      {
        return ePackageDataList.get(id);
      }
    }


Thx,
Markus
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:[Teneo] Constraint validation exception, column ... cannot be null
Next Topic:[Teneo] Possible to set fetch="subselect" on a multi-value EAttribute?
Goto Forum:
  


Current Time: Wed May 22 13:27:27 EDT 2013

Powered by FUDForum. Page generated in 0.01604 seconds