List<ResourceLocation> resourceLocations = new ArrayList<ResourceLocation>();
for (String element : currentStore.getBundleClassPath())
{
ResourceLocation resourceLocation = currentStore.registerClassPathElement(element);
if (resourceLocation == null)
{
for (FragmentGeneration fragment : solution.getFragments())
{
resourceLocation = fragment.getArchiveStore().registerClassPathElement(element);
if (resourceLocation != null) break;
}
}
if (resourceLocation != null) resourceLocations.add(resourceLocation);
}
for (FragmentGeneration fragment : solution.getFragments())
{
ArchiveStore archiveStore = fragment.getArchiveStore();
for (String element : archiveStore.getBundleClassPath())
{
ResourceLocation resourceLocation = archiveStore.registerClassPathElement(element);
if (resourceLocation != null) resourceLocations.add(resourceLocation);
}
fragment.setHost(bundleGeneration);
bundleGeneration.getFragments().add(fragment);