Stencil Configuration

<< >>

Navigation:  CodeStencil > Stencils >

Stencil Configuration

 

As a stencil creator, the ability to add stencil configuration to your stencil is available to you automatically out of the box. You do not need to create an interface for your stencil end-users for configuring your stencil.

 

One of the strengths of CodeStencil is the ability to create a highly configurable environment for the stencils you create. For example, you may want to configure the way code is generated for a specific table, or set of tables, this is where the stencil configuration feature excels.

 

You define the configuration settings for the loaded stencils by creating a Form Node.

 

Now, during code generation, as the code generation engine moves downwards through the nodes, once it hit a FORM node, it will pop-up a configuration grid:

 

CS_clip0149

 

If you have problems getting the Configuration Setting to display as a pop-up grid, please review: Conditions For Configuration

 

1.Name: This is the name of the configuration setting.

2.Value: This is the assigned value for the setting.

3.ADD Button: When this is clicked, it add a configuration item setting to the list. The added item is in this form ( by default):

 Name: #ConfigurationSetting#

 Value: ??

This can then be updated to reflect the actual setting.

 

To EDIT a setting, you have to Double-click on the record, and it will then open an update form. For example, to edit the "ShowColumnChooser" setting, DOUBLE-CLICK on the selected row:

 

CS_clip0150

 

1.The display on this contracted panel indicates the data type this setting is based on. You can always change this into any of the configuration data types.

CS_clip0151

 

2.Name: You can change the name of the setting here.

3.True/False: True when checked, False when unchecked.

 

 

Configuration Data Types

There are 3 type of data types that can be used for configuration purposes. These are String, Boolen, Table. Depending on the data type selected, different field becom available in the update form;

 

String: You can specify a string.

 

CS_clip0152

 

Boolen: You can set a configuration setting to be true or false

 

CS_clip0153

 

Table: You can use this data type to select table names to manipulate the way code is generated.

 

CS_clip0154