Creating Template-based Files
Generally, the file name extension for a template-based file is set automatically so you don't need to specify it.
To create a new file from a template
- Do one of the following:
- In the Project tool window, select the directory in which you want to create a new file, and then choose on the main menu.
- Right-click the corresponding directory and select New from the context menu.
- Press Alt+Insert
- Select the desired file type. Generally, all the options except File and Directory correspond to using a file template.
In the dialog that opens, type the name of the file in the corresponding field.
Note that you should not type the file name extension.
You can specify the whole directory structure prepending the new file name. If the nested directories do not yet exist, they will be created:
If required, specify the kind of the new template-based file.
Specify other information as required. For example, you may be asked to define the values of custom variables if the corresponding file template contains such variables and their values are not currently set.
OK. The new file that corresponds to the selected file template will be created
under the target location.
If the names of non-existent sub-directories were specified before the new file name, the whole structure will be created under the target directory:
Sometimes, you may want to change the auto-generated file name extension. To do that, use the Rename refactoring ( ).