* has already been checked in the isEnable method.
*/
private void createChildInstance(AbstractComponent component) {
// acquire the ComponentRegistry through the access object. The ComponentRegistry
// will be injected through the OSGi declarative services model
ComponentRegistry registry = ComponentRegistryAccess.getComponentRegistry();
if (registry != null) {
// use the ComponentRegistry service to create a new instance of a component
ExampleComponent ec = registry.newInstance(ExampleComponent.class, component);
// additional information can be collected here to populate a model. This simply
// sets a unique name
ec.setDisplayName("newComponentFromMenu"+newCount.incrementAndGet());