The Edit Template Dialog allows maintenance of a template and specifying its structure and properties.
It contains the following pages:
Edit Template Dialog - General Page |
Name
The Name edit box allows specifying the name for the template. This name would be short as possible though it should be meaningful enough to recognize the template. Please note that template name should be unique within current scope.
Description
The Description edit box allows specifying the description for the template.
Group
The Group combobox allows specifying the group this template belongs to. The group defines the name of the file in which this template will be stored after saving of the template list. Allocation of templates across scopes and groups allows better controlling them and provides easy way to share them between team members.
Active
The Active checkbox allows specifying whether this template is available for use.
Code
The Code editor pane allows typing the code of the template. The code of the template consists of code fragments and optionally template fields within them. Each field is represented by its name enclosed by # sign. In general, it's enough just to state fields in the template code and they will be automatically added to the template. To specify properties for the desired template fields the Fields page is used.
Paste
The Paste button allows pasting the content of the clipboard along with ability to customize block to be paste. The Customize the Clipboard Content to be Paste dialog is showing after pressing the Paste button. This dialog provides options to discover and extract template fields and allows removal of block indent if desired.
Insert Field
The Insert Field action list button allows insertion of fields to the template code. Pressing the core button inserts default field (or last inserted one) while pressing the button with triangle icon allows choosing other fields to insert.
Edit Template Dialog - Options Page |
The Options page allows specifying miscellaneous properties of template. The following options are available:
This group provides options those control general template behavior.
Format Expanded String
The Format Expanded String option specifies whether template code should be formatted and indented according to the current indent level and code style.
Complete on Fill
The Complete on Fill option allows specifying whether the running template should be completed when all template fields are filled.
Complete on Change
The Complete on Change option allows whether the running template should be completed when there is any change occurred in the document outside of template.
This group provides options those allow specifying the context applicable to expand this template.
Code
This option specifies whether this template can be expanded in Java code (reserved words, identifiers, expressions etc.).
Shorten Full Class Names
This option specifies whether all known classes' references from the template code should be shorten as well as appropriate import statements should be added.
This group provides options those allow specifying the document type applicable to expand this template.
Edit Template Dialog - Fields Page |
The Fields page allows maintaining the fields are belonging to the template is being editing.
Fields
The Fields table shows the list of fields defined in the template and it allows selection of particular field to maintain. In this table each field occupies one row and each table column represents particular fields' attribute. The Name and Expression columns show the name and calculate expression for the field. The In Use column shows whether this field is used somewhere in the template code.
New
The New button allows creation of a new field.
Edit
The Edit button allows maintenance of currently selected field.
Copy
The Copy button allows creation of a new field using currently selected field as a prototype.
Remove
The Remove button allows removal of currently selected field.
Inline
The Inline button allows removal of currently selected field and replacing all field occurrences by the field default value if any or by the field name otherwise.
Edit Template Dialog - Shortcuts Page |
The Shortcuts page allows assigning keyboard shortcuts to the template for the each key maps installed in the JBuilder.
Shortcuts
The Shortcuts table shows the list of key maps along with shortcuts assigned to the template for the each particular key map.
Change
The Change button allows assigning or changing the shortcut for the selected key map. On pressing this button the Assign Key Stroke dialog is showing that allows defining the shortcuts attributes.
Remove
The Remove button allows removal of shortcut for the selected key map.
See also: Edit Template Field Dialog, Smart.Templates, Productivity! General Property Page