Applies to Java simple source files that are created by invoking New | Java Class/File | Simple source file in the Project tool window.

This built-in template is editable. Along with Java expressions and comments, you can also use the predefined variables (listed below) that will then be expanded like macros into corresponding values.

It is also possible to specify custom variables. 自定义变量使用以下格式:${VARIABLE_NAME},其中 VARIABLE_NAME 是变量的名称(例如,${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. 要包含模板,请在引号中以形参形式指定模板的全名(例如,#parse("File Header.java"))。
预定义变量接受以下值:
${PACKAGE_NAME}   在其中创建新纪录的软件包名称
${NAME}   您在创建新类对话框中指定的新记录的名称
${USER}   当前用户的系统登录名
${DATE}   当前系统日期
${TIME}   当前系统时间
${YEAR}   当前年份
${MONTH}   当前月份
${MONTH_NAME_SHORT}   当前月份名称的前 3 个字母(Jan、Feb 等)
${MONTH_NAME_FULL}   当前月份的全名(January、February 等)。
${DAY}   当月几号
${HOUR}   当前小时
${MINUTE}   当前分钟
${PROJECT_NAME}   当前项目的名称