UML2 Modeler provides dedicated launching mechanism for source code generation. As with all other launchers in Eclipse (e.g. the Java Application launcher), the UML2 Modeler launcher can be invoked via Run actions and its launch configurations which are centrally managed from the Launch Configuration Dialog.
In order to have the control over code generation, you have to create launch configuration in the Launch Configuration Dialog. The Launch Configuration Dialog can be invoked via Run > Run Configurations. A new magik code generation launch configuration can be created by double-clicking on the UML2 Modeler node in the tree view on the left.
A UML2 Modeler launch configuration contains tabs allowing you to customize all aspects of the test launch. You can refer to the following documents for more details: