Aqua
 
Get Aqua

File templates

Last modified: 11 October 2024

File templates are specifications of the default contents for new files that you create using the File | New menu or the New section of the context menu in the Project tree.

Depending on the type of file you are creating, templates provide initial code and formatting expected in all files of that type (according to industry or language standards, your corporate policy, or for other reasons).

Aqua provides predefined templates for all supported file types suggested when you create a new file. The set of suggested file types depends on the module and configuration, as well as the properties of your current location in the Project tool window. For example, Aqua will not suggest creating a Java class file outside of the Java source or test directories.

For example, if you right-click a directory in the Project tool window and select New (or press AltInsert), you will see a list of files that you can create in this context. These files have corresponding file templates configured in the settings.

By default, the list of templates contains only predefined templates provided by Aqua. Some of them are internal, which means they cannot be deleted or renamed. Aqua shows the names of internal templates in bold. The names of templates that you modified, as well as custom templates that you created manually, are shown in blue.

The following procedures describe how to create file templates. Similar procedures can be used for creating include templates.