Changing the order of types in the generated code

Types are generated in code in the order in which they appear in the browser. This behavior can be a problem if one type depends on another that is defined later.

About this task

For example, you can define a type FirstType as:

typedef SecondType %s

Next, define a type SecondType as:

typedef int %s

These two types defined in this order would result in a compilation error. To avoid this kind of error, you can control the order in which types are generated using the Edit Type Order in Code window, which is accessible through the menu for the Types category for an individual package or a class.

To edit the order of types:

Procedure

  1. Right-click the Types category (or a package or a class) and select Edit Type Order. The Edit Type Order in Code window opens.
    Edit Type Order in Code window
  2. Select the type you want to move.
  3. Click Up to generate the type earlier or Down to generate it later.
  4. Click OK.

Feedback