How to generate operation descriptions to implementation file from Rhapsody model
How do you generate operation descriptions to implementation file from IBM Rational Rhapsody model?
In Rhapsody versions prior to 8.0.3, the info added on operation [Description] tab can only be generated in specification files. It required extra efforts to make Rhapsody generate operation descriptions in implementation file so that it was not ideal for maintenance.
From Rhapsody ver 8.0.3 and later, the following new properties have been introduced in the tool.
These properties provide the mechanism to allow you having the operation comments easily and generating in implementation file as well.
You have three options to accomplish this task.
- In the details, set [lang]_CG::Operation::GenerateDescriptionInImplementation = UseSpecificationText
Then the text added on [Description] tab is used as operation comments for both specification file and implementation file.
- If using [lang]_CG::Operation::DescriptionTemplate instead, the same user-keywords which appear in specification description would be generated in implementation file as well.
- You can also provide a different comment for implementation file by using [lang]_CG::Operation::DescriptionInImplementation property.
Note: During roundtripping, any changes made to the comments on implementation file that precedes the operation definition are ignored. You can also check the corresponding information for Generating operation descriptions in implementation files at IBM product info center.