if (impl == null || !impl.isUnresolved())
return;
impl.setUnresolved(false);
BundleReference bundleReference = new BundleReference(impl.getBundleSymbolicName(), impl.getBundleVersion());
BundleReference resolvedBundle = resolver.resolveModel(BundleReference.class, bundleReference);
Bundle bundle = (Bundle)resolvedBundle.getBundle();
if (bundle != null) {
impl.setOSGiBundle(bundle);
} else {
error("CouldNotLocateOSGiBundle", impl, impl.getBundleSymbolicName());
//throw new ContributionResolveException("Could not locate OSGi bundle " +
//impl.getBundleSymbolicName());
return;
}
String bundleName = resolvedBundle.getBundleRelativePath();
String ctURI = bundleName.endsWith(".jar") || bundleName.endsWith(".JAR")?
bundleName.substring(0, bundleName.lastIndexOf(".")) : bundleName;
ctURI = ctURI.replaceAll("\\.", "/");
ctURI = ctURI + ".componentType";