// Initialize configured design sources
Iterator<DesignSource> collections = designSources.iterator();
while (collections.hasNext()) {
final DesignSource designSource = (DesignSource) collections.next();
try {
String colClassName = designSource.getImplClassName();
Class colClass = WGACore.getLibraryLoader().loadClass(colClassName);
if (!(WGADesignSource.class.isAssignableFrom(colClass))) {
_core.getLog().error("Error registering design source " + designSource.toString() + ". Class " + colClassName + " is no design source implementation.");
continue;
}
LocalizedInformation locInfo = new LocalizedInformation() {
public String getTitle(Locale locale) {
return designSource.getTitle();
}
public String getDescription(Locale locale) {
return designSource.getDescription();
}
};
WGADesignSource col = (WGADesignSource) core.getModuleRegistry().instantiate(colClass);
col.init(_core, designSource.getUid(), locInfo, designSource.getOptions());
_core.getLog().info("Registering design source '" + designSource.toString() + "' of type '" + designSource.getImplClassName() + "'");
_designSources.put(designSource.getUid(), col);
}
catch (Exception e) {
_core.getLog().error("Error initializing design source " + designSource.toString(), e);
}
}
}