throwContainerCreateException("ContainerTypeDescription cannot be null", null, method); //$NON-NLS-1$
ContainerTypeDescription cd = getDescription0(containerTypeDescription);
if (cd == null)
throwContainerCreateException("ContainerTypeDescription '" //$NON-NLS-1$
+ containerTypeDescription.getName() + "' not found", null, method); //$NON-NLS-1$
IContainerInstantiator instantiator = null;
try {
instantiator = cd.getInstantiator();
} catch (Exception e) {
throwContainerCreateException("createContainer cannot get IContainerInstantiator for description : " //$NON-NLS-1$
+ containerTypeDescription, e, method);
}
// Ask instantiator to actually create instance
IContainer container = instantiator.createInstance(containerTypeDescription, parameters);
if (container == null)
throwContainerCreateException("Instantiator returned null for '" //$NON-NLS-1$
+ cd.getName() + "'", null, method); //$NON-NLS-1$
// Add to containers map if container.getID() provides a valid value.
ID containerID = container.getID();