bundle.getBundleContext().registerService(ModuleDescriptor.class.getName(), descriptor, null);
}
private void registerSpeakeasyWebResourceDescriptor(Bundle bundle, DocumentFactory factory, Plugin plugin, String type)
{
SpeakeasyWebResourceModuleDescriptor descriptor = new SpeakeasyWebResourceModuleDescriptor(moduleFactory, hostContainer, bundleContext, descriptorGeneratorManager);
Element element = factory.createElement("scoped-web-resource")
.addAttribute("key", type)
.addAttribute("scan", "/" + type);
element.addElement("transformation")
.addAttribute("extension", "css")
.addElement("transformer")
.addAttribute("key", "cssVariables")
.addAttribute("imagesModuleKey", plugin.getKey() + ":" + "images-" + bundle.getLastModified())
.addAttribute("fullModuleKey", plugin.getKey() + ":" + "css-" + bundle.getLastModified());
descriptor.init(plugin, element);
bundle.getBundleContext().registerService(ModuleDescriptor.class.getName(), descriptor, null);
}