How to avoid annotations generated in model source file by IBM Rational Rhapsody
How do you make IBM Rational Rhapsody not generate annotations in model source file.
By default, Rhapsody would include annotations like "ignore", "auto-generated" in generated source files during code generation.
With these annotations, Rhapsody could understand the code structure and further correctly perform other code related operations like roundtrip, incremental code generation and etc.
If you don't have plan to use roundtrip, probably you prefer to not having auto-generated annotations in your source file.
Remove auto-generated annotations from source files would likely cause parser error and other potential issues hence it's not a recommended practise.
- Possible Solutions
1. Set property [Lang]_CG::ModelElement::SimplifyAnnotations to "None" to remove annotations of model elements from source file.
2. Remove keyword $annotation from corresponding property located under [Lang]_CG::WriterTemplates category.
Example: To remove annotations generated inside of operation body, use property C_CG::WriterTemplates::GlobalOperationImp for RiC model and CPP_CG::WriterTemplates::OperationImp property when working with RiC++ model.
3. Most of auto-generated annotations would be removed from source file after applying above solutions. You could consider utilizing Rhapsody Post Processor feature to completely remove the rest annotations if needed.
More support for:
Software version: 8.0.6, 8.1, 8.1.1, 8.1.2, 220.127.116.11
Operating system(s): Windows
Reference #: 1701541
Modified date: 27 May 2015