Chapter 3 Building Structural Diagrams


Class property sheet Script tab

The Script tab allows you to customize the object's creation script by, for example, adding descriptive information about the script.

Examples

If a development project archives all the creation scripts that are generated, a header script can be inserted before each creation script, indicating the date, time, and any other information specific to the generated script.

If an organization requires that generated scripts are filed using a naming system which may be independent from a script name, a header script could direct a generated script to be filed under a different name than the name indicated in the creation script.

Scripts can be customized as follows:

Script tools

The following tools and shortcut keys are available on the Script tab:

Tool Description Shortcut Key

Open Editor Contextual menu Shift + F11

Edit With - Opens the default editor you previously defined or allows you to select another editor if you click the down arrow beside this tool ctrl + E

Import Folder - Available in the Imports tabbed page only. Opens a selection window to select packages to import. The packages are added where the cursor is positioned. They are prefixed by the keyword 'import'

Import Classifier - Available in the Imports tabbed page only. Opens a selection window to select classifiers to import. The classifiers are added where the cursor is positioned. They are prefixed by the keyword 'import'

For more information on defining a default editor, see section Defining a text editor, in chapter Using the PowerDesigner Interface in the General Features Guide .

Formatting variables in customized scripts

Variables have a syntax that can force a format on their values in the following ways:

When a variable does not specify formatting, its values have the same format as in the OOM. You can use the following formatting syntax with variables:

Format code Format of variable value in script
.L Lowercase characters
.T Removes blank spaces
.U Uppercase characters
.c Upper-case first letter and lower-case next letters
.n Maximum length where n is the number of characters
.nJ Justifies to fixed length where n is the number of characters

You embed formatting options in variable syntax as follows:

%.format:variable%

 


Copyright (C) 2006. Sybase Inc. All rights reserved.