How do you change order of types generated in the code and displayed in the browser of IBM Rational Rhapsody?
In Rational Rhapsody when types are added to the browser, they are sorted in an alphabetical order and the same order is followed in the generated code. You would however like to change the order.
You can change the order of the types in the generated code by following one of the below methods:
Method 1: In Rational Rhapsody browser, Right-click on Types > Edit Type Order and move the types up and down as required
Method 2: Enable viewing of Source Artifacts via View > Browser Display Options > Show Source Artifacts
Once done apply the following steps:
- Locate the source artifact header file in the browser for the particular file/class/package
- Navigate to Features > Elements and rearrange the order
Note: When you change the ordering using Step 1, the order is not displayed in the browser until you enable the option View > Browser Display Options > Enable Ordering
This will sort the order for the types in the browser as well as the generated code