TypedCompositeActor model = (TypedCompositeActor) GiottoCodeGenerator.this
.getContainer();
// Preinitialize and resolve types.
CompositeActor toplevel = (CompositeActor) model.toplevel();
Manager manager = toplevel.getManager();
if (manager == null) {
manager = new Manager(toplevel.workspace(), "manager");
toplevel.setManager(manager);
}
manager.preinitializeAndResolveTypes();
TextEffigy codeEffigy = TextEffigy.newTextEffigy(configuration
.getDirectory(), generateGiottoCode(model));
codeEffigy.setModified(true);
configuration.createPrimaryTableau(codeEffigy);
// end the model execution.
manager.stop();
manager.wrapup();
} catch (Exception ex) {
throw new InternalErrorException(object, ex,
"Cannot generate code. Perhaps outside Vergil?");
}
}