}
private Set<XBundleRevision> getOptionalResources(BundleManager bundleManager, XBundleRevision brev) {
Set<XBundleRevision> result = null;
for (BundleRequirement req : brev.getDeclaredRequirements(PackageNamespace.PACKAGE_NAMESPACE)) {
XPackageRequirement preq = (XPackageRequirement) req;
if (preq.isOptional()) {
result = new HashSet<XBundleRevision>();
for (XBundle bundle : bundleManager.getBundles(Bundle.INSTALLED)) {
result.add(bundle.getBundleRevision());
}
break;