IBM Support

How to change order of types generated in the code in Rational Rhapsody

Question & Answer


Question

How do you change order of types generated in the code and displayed in the browser of IBM Rational Rhapsody?

Cause

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.

Answer

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:

  1. Locate the source artifact header file in the browser for the particular file/class/package

  2. 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

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.0.2;8.0.1;8.0;7.6.1.2;7.6.1.3;7.6.1.1;7.6.1;7.6.0.1;7.6","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21640713