IBM Support

How to make Rhapsody generate class constructor parameters on multiple lines

Technote (FAQ)


Question

How do you make IBM Rational Rhapsody generate parameters of class constructor on multiple lines?

Cause

With Rhapsody 8.0.3 or earlier, no matter how many parameters are added to class constructor, Rhapsody will generate the whole info within one line, which causes the source readability to be reduced.

In Rhapsody 8.0.4, a new model property CG_[Lang]::Class::MultiLineInitializerList is introduced in the product to improve the code readability.


Answer

You can use this new property and Rhapsody Code Generator will automatically generate constructor parameters on multiple lines.


Review the below code examples:

  • When CG_[Lang]::Class::MultiLineInitializerList is unchecked, all the arguments are generated in one line.



  • When CG_[Lang]::Class::MultiLineInitializerList is checked, the arguments are generated crossing multiple lines.


Related information

How to generate the argument list of an operation

Document information

More support for: Rational Rhapsody
General Information

Software version: 8.0.4

Operating system(s): Linux, Windows

Reference #: 1649299

Modified date: 15 October 2013