Roundtripping in code-centric mode

In a code-centric scenario, you could use IBM® Rational® Rhapsody® to visualize your code but not add any non-code-related elements to your model. In such a scenario, you could use Rational Rhapsody to reverse engineer your entire code and then use a forced roundtrip to preserve all model change made later.

About this task

The Rational Rhapsody code-centric mode is designed to combine this code-based focus with the ability to add non-code-related elements to your model.

In code-centric mode, the product roundtrips any changes you make to your code into your model, regardless of how drastic these changes are. At the same time, Rational Rhapsody allows you to add non-code-related elements to your model, for example, requirements, and keeps this information in your model permanently. The roundtripping of the changes to your code does not affect in any way the non-code-related elements you have included in your model.

There are a number of ways to initiate the roundtripping of your code changes into your model:

The most important distinction between roundtripping in code-centric mode and roundtripping in model-centric mode is the following: In model-centric mode, code generation is always carried out after the manual code changes have been imported into the model (hence the term "roundtripping"). In code-centric mode, however, Rational Rhapsody never regenerates the code after the changes have been imported into the model (it is only a one-way process).

If you create a file in the folder that contains your source code, the product imports the contained elements into the model the next time you roundtrip.

Note: When you add a new file to the folder containing your source code, the contained elements are imported into the model only if you selected the folder at some point in the Reverse Engineering window, as opposed to specifying individual files.

When you roundtrip code changes into the model, object model diagrams are updated accordingly. To turn off this default behavior, modify the value of the ObjectModelGe::AutoPopulate::EnabledOnUpdateModel property.


Feedback