info.setSymbolicName(bb.getSymbolicName());
Version version = VersionTable.getVersion(bb.getVersion());
info.setVersion(version);
ISigilBundle pb = ModelElementFactory.getInstance().newModelElement(
ISigilBundle.class);
pb.setBundleInfo(info);
Map<Object, Object> meta = new HashMap<Object, Object>();
ModuleDescriptor md = SigilParser.instance().parseDescriptor(uri.toURL());
if (!bb.getId().equals(md.getModuleRevisionId().getName()))
{ // non-default artifact
for (Artifact a : md.getAllArtifacts())
{
if (a.getName().equals(bb.getId()))
{
meta.put(Artifact.class, a);
break;
}
}
}
meta.put(ModuleDescriptor.class, md);
pb.setMeta(meta);
list.add(pb);
Log.debug("ProjectRepository: added " + pb);
Log.debug("ProjectRepository: exports " + bb.getExports());
}