In file templates, you can use text, code, comments, and
predefined variables. A list of predefined variables is available below. When you use these variables in templates, they expand into
corresponding values later in the editor. It is also possible to specify custom variables. Custom variables use the following format: ${VARIABLE_NAME}, where VARIABLE_NAME is a name for your variable (for example, ${MY_CUSTOM_FUNCTION_NAME}). Before the IDE creates a new file with custom variables, you see a dialog where you can define values for custom variables in the template. By using the #parse directive, you can include templates from the Includes tab. To include a template, specify the full name of the template as a parameter in quotation marks (for example, #parse("File Header"). |
List of predefined variables | ||
|
Current system date | |
|
Current day of the month | |
|
First three letters of the current day name (Mon, Tue, and so on) | |
|
Full name of the current day (Monday, Tuesday, and so on) | |
|
Path to the directory of the new file (relative to the project root) | |
|
Dollar sign ($). This variable is used to escape the dollar character, so that it is not treated as a prefix of a template variable. | |
|
Name of the new file | |
|
Current hour | |
|
Current minute | |
|
Current second | |
|
Current month | |
|
The first 3 letters of the current month name (Jan, Feb, and so on) | |
|
Full name of the current month (January, February, and so on) | |
|
Name of the new entity (file, type, interface, and so on) | |
|
Name of your organization specified in the project settings | |
|
Name of the IDE | |
|
Name of the current project | |
|
Current system time | |
|
System login name of the current user | |
|
Current year |