Reverse Engineering - Using Legacy Code
If you have legacy code, you might want to use reverse engineering by Rhapsody, so you can refer to existing artifacts in your model.
The best way is to create a new Rhapsody project and reverse engineer existing source files into a new package.
This package can be used by reference in your Rhapsody model where you are modelling AUTOSAR SW-Cs.
Legacy code may consist of existing runnables and functions, but also of data.
Please refer to AUTOSAR section Legacy code.
Creating Package for Reverse Engineered Code
To create a package with reverse engineered code, perform the following steps:
- select File | New to create a new Rhapsody project.
This is where the reverse engineered package will reside, but it does not alter any existing source code or its location.
- select No: do not enable the UML perspective toolbar
- select Tools | Reverse Engineering
- select Continue
- select Code centric without code generation
- browse to the folder of the code you want to reverse engineer
- select the source files you want to reverse engineer
- select Single top level package
Using Package for Reverse Engineered Code
To use the result in your Rhapsody model where you are modelling your SW-Cs:
- select File | Add to Model
- point to the created package file