The Round Trip feature keeps your code and model synchronized. Because Round Trip traces all model and code changes, you can freely change entity specifications without discarding code changes made outside the tool.

For example, Round Trip prevents a job from being damaged by code editions or changes when the following steps are performed:

  1. A Class Base is created within the tool.
  2. The Operation getInstance is added to the Class.
  3. Code is generated.
  4. With an external tool, a programmer adds some code to that operation.
  5. With a modeling tool, a name of the operation is changed to Instance.
  6. Code is generated.

If the tool rewrites the whole code, these changes are made without corrupting the programmer’s job. The name of the operation is changed, but the internals remain the same.

Round Trip catches all changes in your project and controls the following actions:

  • If the source code is not changed, you are not allowed to refresh the UML model. The Refresh command from the set shortcut menu is unavailable.
  • If the model is changed but the code remains the same (new members were added or their headers were changed), refresh is not allowed, and the Refresh command from the set shortcut menu is unavailable. When generating code according to changes, all changes in the model are written to the signatures of class members, leaving the old implementation in place.
  • If the code is changed but the model remains the same, refresh can be executed; code will reverse to the UML models. If the Code Generation Options dialog box appears when you attempt to generate code, you can select a code action that differs from the UML model.
  • If the code and model are changed while refreshing, all changes in the code are treated as new items and added to the model.
  • If data in the model file is deleted, it will be restored while refreshing, even when the code has not been changed or the data itself is unimportant.