Editing code with Dynamic Model-code Associativity
Dynamic model-code associativity (DMCA) changes the code of a model to correspond to the changes you make to a model in the Rhapsody® UI. Conversely, when you edit the code that is associated with the model, dynamic model-code associativity updates the model to correspond to your edits. In this way, the product keeps the model and the code synchronized.
About this task
The following
menu commands control the dynamic model-code associativity in the model:- Bidirectional changes are automatically put through in both directions. Meaning that changes that are made to the model cause new, updated code to be generated, and edits made directly to the code are automatically added to the Rhapsody model.
- Roundtrip changes made directly to the code are brought into the Rhapsody model, but changes made to the model do not automatically generate new code. You can roundtrip only code that has been previously generated by the product; that is, you can only edit code that has been previously generated by Rhapsody and incorporate those changes back to the model.
- Code Generation changes made to the model automatically generate new code, but editing code does not automatically change the model.
- None means dynamic model-code associativity is disabled. The online code view windows become simple text editors
You can also use the following two settings to control dynamic model-code associativity:
ModelCodeAssociativityMode
in therhapsody.ini
file- The
General::Model::ModelCodeAssociativityFineTune
property allows you to change the default dynamic model-code associativity mode. However, this setting is typically set through the menu commands listed previously. (The default isBidirectional
)
Note: Dynamic model‑code associativity is applicable to Rhapsody
Developer for C, C++, and Java, and Rhapsody
Developer for Ada.