if (component == null) {
try {
component = componentFactory.getComponentByComponentType(getComponentType());
} catch (FactoryException e) {
throw new ForceProjectException(e, "Unable to init component");
}
}
component.setName(getDefaultName());
component.setPackageName(Constants.DEFAULT_PACKAGED_NAME);
component.intiNewBody(component.getDefaultTemplateString());
try {
metadataExt = component.getDefaultMetadataExtInstance();
} catch (InstantiationException e) {
throw new ForceProjectException(e, "Unable to init wizard model");
} catch (IllegalAccessException e) {
throw new ForceProjectException(e, "Unable to init wizard model");
}
if (logger.isDebugEnabled()) {
logger.debug("Initialized " + component.getDisplayName() + " model and component controller");
}