Question & Answer
Question
How do you generate operation descriptions to implementation file from IBM Rational Rhapsody model?
Cause
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.
- [lang]_CG::Operation::GenerateDescriptionInImplementation
- [lang]_CG::Operation::DescriptionInImplementation
These properties provide the mechanism to allow you having the operation comments easily and generating in implementation file as well.
Answer
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.
Example:
image
- If using [lang]_CG::Operation::DescriptionTemplate instead, the same user-keywords which appear in specification description would be generated in implementation file as well.
Example:
image
- You can also provide a different comment for implementation file by using [lang]_CG::Operation::DescriptionInImplementation property.
Example:
image
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.
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg21642601