Formatting the IDL output that UML-to-CORBA transformations generate

You can edit the JET files in the templates folder of the .JETEmitters project to customize the format of the IDL code that the transformation generates.

About this task

You can change the format of IDL code that the transformation generates by editing the JET files in the templates folder of the .JETEmitters project. The JET files that specify the default format of the IDL code have .idljet as a file extension.

This example demonstrates how to change the default indentation character and line length of the IDL code that the transformation generates. These IDL elements are specified in the SettingsTemplate.idl file in the templates folder of the .JETEmitters project.

To customize the format of the IDL code that the UML-to-CORBA transformation generates:

Procedure

  1. In the Project Explorer view, in the templates folder of the .JETEmitters project, right-click the appropriate JET file; then click Open With > Text editor.
  2. Locate the appropriate method or parameter in the JET template and change the method or parameter value.
  3. To save your changes, click File > Save.

Results

The settings are applied the next time that you run the transformation.

Example

For example, to change the indentation character in the IDL code that the transformation generates, right-click the SettingsTemplate.idljet file, then click Open With > Text editor. Locate this line in the file: <%setIndentSpaces(" "); //$NON-NLS-1$%>. To insert a tab character instead of four spaces, change this line to: <%setIndentSpaces("\t"); //$NON-NLS-1$%>. Click File > Save.

Feedback