protected List<EPackageInfo> createEPackageInfosFromGenModel(
     URI genModelURI, Resource genModelResource) {
   //		ResourceSet resourceSet = createResourceSet(genModelURI);
   //		Resource resource = resourceSet.getResource(genModelURI, true);
   List<EPackageInfo> ePackageInfos = Lists.newArrayList();
   for (TreeIterator<EObject> i = genModelResource.getAllContents(); i.hasNext(); ) {
     EObject next = i.next();
     if (next instanceof GenPackage) {
       GenPackage genPackage = (GenPackage) next;
       EPackage ePackage = genPackage.getEcorePackage();
       URI importURI;
       if (ePackage.eResource() == null) {
         importURI = URI.createURI(ePackage.getNsURI());
       } else {
         importURI = ePackage.eResource().getURI();
       }
       EPackageInfo ePackageInfo =
           new EPackageInfo(
               ePackage,
               importURI,
               genModelURI,
               genPackage.getQualifiedPackageInterfaceName(),
               genPackage.getGenModel().getModelPluginID());
       ePackageInfos.add(ePackageInfo);
     } else if (!(next instanceof GenModel)) {
       i.prune();
     }
   }
   return ePackageInfos;
 }
 private void collectGenPackagesRequiredPluginIDs(
     Collection<GenPackage> genPackages, Set<String> pluginIDs) {
   for (GenPackage nextPackage : genPackages) {
     pluginIDs.add(nextPackage.getGenModel().getModelPluginID());
   }
 }