You can set warning and code
formatting preferences for UML-to-C++ transformations. For example,
you can specify C++ preface and closing comments, and specify indentation
style preferences.
About this task
You can specify the comments that the transformation inserts
at the beginning and end of the files that it generates. The text
that you specify is inserted into the source code exactly as it appears
in the text area. You must include the appropriate C++ comment notation.
For example, you can specify copyright information, or other authoring
information that must appear in each source file. You can also select
formatting preferences for tab spacing, the display order of class
attributes and operations, and indentation styles.
To set preferences
for the UML-to-C++ transformation:
Procedure
- Click Window > Preferences.
- In
the Preferences window, expand .
- Optional: To specify comment and code formatting
preferences, click UML to C++ transformation,
and complete one or more of the following steps:
- Optional: To specify that the transformation
display a warning message before replacing source UML model elements
with pointers to the generated elements, click UML Visualization and
select the Show warning when replacing UML elements check
box.
Note: If you select this check box, for the appropriate
transformation configuration, on the Main page
of the transformation configuration editor or the Specify a Configuration
Name and Transformation page of the New Transformation Configuration
wizard, you must also click the Mixed radio
button.
- Click Apply and click OK.
Results
The transformation applies the preferences
the next time that you run the transformation.