Concepts and an Example : Creating a Sample Profile : Generating Code

Generating Code

Before generating code, you may wish to run Check Profile to verify that the profile complies with the scoping rules. For example, Check Profile makes sure that the settings are legal and do not conflict with each other. The Code Generator also checks the profile when you generate code.

Complete the following steps to check the profile and generate code.

1.
Select Compile > Check Profile.
Note:
You must correct any errors before generating code, but you can continue to generate code with warnings and information messages.
2.
Select Compile > Generate Code.
Note:
The default location for this operation is a sub-directory named according to your current profile name, i.e., it is inside the “prt” sub-directory of your current workarea.
3.
Select Compile > File Management.

The SW Code Management dialog appears
.

 

File Management offers the following options:

Show—Displays a listing of the generated code.
Delete—Deletes the selected file.
Copy—Copies the selected file after you re-name it. (Works the same way as Save as in the File menu.)
Export—Saves the file to another workarea or directory.
Print—Prints the generated code.
4.
To view generated code, select a file and then click Show.

The selected file appears in the xless editor similar to the example in the following figure.
5.
Select Quit and then Dismiss.
6.
Select one of the following:

File > Close to close this profile and leave the Profile Editor open.

File > Exit to close this profile and close the Profile Editor.

The Profile Editor automatically closes any related windows that you left opened and displays a dialog asking if you want to save any unsaved changes to the profile.

.