- On the main menu, choose for Windows and Linux or for Mac OS. Then click File Templates.
- In the File Templates dialog box that opens switch to the Templates tab.
-
Click the Add button
on the toolbar and specify the template name,
the file extension, and the body of the template, which can contain:
- Plain text.
- #parse directives to work with template includes.
-
Predefined variables to be expanded into corresponding values in the format
${<variable_name>}.
The available predefined file template variables are:
- ${PACKAGE_NAME} - the name of the target package where the new class or interface will be created.
- ${USER} - login name of the current user.
- ${NAME} - the name of the file that will be created.
- ${DATE} - the current system date.
- ${TIME} - the current system time.
- ${YEAR} - the current year.
- ${MONTH} - the current month.
- ${DAY} - the current day of the month.
- ${HOUR} - the current hour.
- ${MINUTE} - the current minute.
- Custom variables to define their names during the file creation.
- To have a variable or directive rendered "as is" upon template expansion, escape the $ or # character in reposition.
- Apply the changes and close the dialog box.
- Open the File Templates dialog box and switch to the Templates tab.
- Click the Copy button
on the toolbar and change the template name,
extension, and source code as required.
- Apply the changes and close the dialog box.
- Open the desired file in the editor.
- On the main menu, choose .
- In the File Templates dialog box that opens specify the new template name and edit the source code, if necessary.
- Apply the changes and close the dialog box.
- In the File Templates dialog box, switch to the Includes tab.
- Click the Add button
on the toolbar
and specify include template name, extension, and the source code.
- In the Templates tab, select the desired template and click the Edit button.
- To include a template, insert the #parse directive in the source code.

