If you frequently modify generated C++ code outside RSARTE, you can propagate the changes made back to the model. You can do it using a special command which runs code-to-model synchronization, it is present in the context menu of a transformation configuration in the Project Explorer, as well as on a generated target project.
A dialog lists available options for synchronization. If you want to review each change that will be propagated, you should unmark default setting for “Silent synchronization” checkbox. In case if there are unloaded models in your workspace, you can review available loading options.
The code-to-model synchronization console will appear once the synch process is started. It will report all updated code snippets and the final status.
If you want to automate the synchronization process, RSARTE provides an Ant task. Here is an example how it can be invoked:
The Ant task supports the following attributes:
Workspace-relative path to the TC that you want to synchronize.
Set it to true to enable additional logging during the code-to-model synchronization.
A map file that defines which source files that should be synchronized. It may also define projects that should be imported to your workspace as part of the code-to-model synchronization. Here is an example of the map file syntax:
All attributes are optional but one of transformConfig or mapFile must be set (but not both at the same time). If you run the code-to-model synchronization Ant task outside of RSARTE, make sure to use the org.eclipse.ant.ui.antRunner application. The command-line should be like this:
C:\rsarte-oxygen\eclipse\eclipse.exe -nosplash -application org.eclipse.ant.ui.antRunner -data C:\empty-workspace -buildfile C:\temp\cm_synch.ant synch
More detailed information about this feature can be found here. Still have questions? Mail us to email@example.com
Development team of Rational Software Architect Real-Time Edition