Recovering lost roundtrip annotations

To roundtrip your code, IBM® Rational® Rhapsody® uses special annotations inserted by the code generator into the implementation file.

About this task

The symbols are as follows:

Language Annotation Symbols
Ada Element:

--++ <ElementType> <ElementName>

Body:

--+[ <ElementType> <ElementName> --+]

C Element:

/*## <ElementType> <ElementName> */

Body:

/*#[ <ElementType> <ElementName> */ /*#]*/

C++ and Java Element:

//## <ElementType> <ElementName>

Body:

//#[ <ElementType> <ElementName> //#]

Note: If you edit or delete these annotations, the product cannot trace your code back to the model.

To recover corrupted roundtrip annotations:

Procedure

  1. Rename the damaged file.
  2. Regenerate code for this class. This regeneration produces a new file with the correct annotations.
  3. Copy your changes from the damaged file into the newly generated file.
  4. Try to roundtrip again.

Results

If you have modified any of the files, the following message is displayed:

File <filename> has been modified externally. Do you want to roundtrip?

If you modified the file contents, you must roundtrip to add the modifications to the model. Choose Yes to confirm the roundtrip. The product updates the model and the generated code reflects your manual modifications.

If you choose No, the product overwrites the modified files, and your changes are lost.


Feedback