Change CodeDialog to go through DiagramController for code generation instead of talking directly to the code generator.