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:


  • Insert scripts at the beginning (Header page) and the end (Footer page) of a script

  • Insert scripts before and after a class or interface creation command (Imports page)

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 "Specifying text editors" in the Models chapter of the Core Features Guide.

Formatting Variables in Customized Scripts

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


  • Force values to lowercase or uppercase characters

  • Truncate the length of values

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%


Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com