if (includeOptional || !required[i].isOptional())
addBundleAndDependencies((BundleDescription)required[i].getSupplier(), bundleIds, includeOptional);
}
ImportPackageSpecification[] importedPkgs = desc.getImportPackages();
for (int i = 0; i < importedPkgs.length; i++) {
ExportPackageDescription exporter = (ExportPackageDescription)importedPkgs[i].getSupplier();
// Continue if the Imported Package is unresolved of the package is optional and don't want optional packages
if (exporter == null || (!includeOptional && Constants.RESOLUTION_OPTIONAL.equals(importedPkgs[i]
.getDirective(Constants.RESOLUTION_DIRECTIVE))))
continue;
addBundleAndDependencies(exporter.getExporter(), bundleIds, includeOptional);
}
BundleDescription[] fragments = desc.getFragments();
for (int i = 0; i < fragments.length; i++) {
if (!fragments[i].isResolved())
continue;