*/
private static void _instantiateLibrary(final CompositeEntity library,
final ModelDirectory directory, Configuration configuration,
File file, final CompositeEntity libraryContainer,
final PtolemyEffigy finalLibraryEffigy) throws Exception {
ChangeRequest request = new ChangeRequest(configuration, file.toURI()
.toURL().toString()) {
protected void _execute() throws Exception {
// The library is a class!
library.setClassDefinition(true);
library.instantiate(libraryContainer, library.getName());
finalLibraryEffigy.setContainer(directory);
}
};
libraryContainer.requestChange(request);
request.waitForCompletion();
}