Transforming a Design Project to Source Code

From RAD Studio
Jump to: navigation, search

Go Up to Modeling Project Procedures

You can generate the default Delphi source code for your design project and insert this generated source code into an existing implementation project or create a new implementation project.

To generate the source code from a design project

  1. In the Model View, right-click the node of a design project for which to generate the source code. The design project becomes selected and the context menu opens.
  2. On the context menu, choose Transform to Source. The Choose Destination Project dialog box opens.
  3. In the Existing Projects list, select an available (existing in the current project group) implementation project. This implementation project becomes the target project for the source code transformation. The source code for the selected design project will be generated inside this target project.
  4. Select the Use name mapping files for code generation check box if required.
  5. Click Transform.
The source code generated for the class diagrams existing in the selected design project is added to the target implementation project. The source code is generated on the language used by the target project. The class diagrams are also added to the target project. The diagram roots are preserved.

To transform the source code from a design project into an implementation project

  1. In the Model View, right-click the node of a target implementation project. The target implementation project becomes selected and the context menu opens.
  2. On the context menu, choose Transform Code from Design Project. The Choose Source Project dialog box opens.
  3. In the Existing Projects list, select an available design project for which you want to generate the source code and to insert this source code into the selected implementation project.
  4. Select the Use name mapping files for code generation check box if required.
  5. Click Transform.
The source code generated for the class diagrams existing in the selected design project is added to the target implementation project. The class diagrams are also added to the target implementation project. The diagram roots are preserved.

See Also