Android studio 在哪里可以找到Android Studio中可用的变量列表;代码和文件模板;?

Android studio 在哪里可以找到Android Studio中可用的变量列表;代码和文件模板;?,android-studio,android-studio-3.1,android-studio-3.2,Android Studio,Android Studio 3.1,Android Studio 3.2,自定义java代码和文件模板时,从哪里可以获得可用的变量列表 例如,在定制java类时,我知道我可以使用${USER}和${DATE},我(正确地)猜测${YEAR}是可用的。。。但我想找到所有可供使用的预定义变量 我已经查看了Apache的常规VTL语言文档,但没有找到我正在搜索的信息。我找到了列表!在Android Studio中,我进入了文件|新建|编辑文件模板 这将弹出一个对话框“文件和代码模板”,默认选项卡是“文件”。 默认的文件类型是HTML。在描述框中,有一个很长的文本显示它们。用

自定义java代码和文件模板时,从哪里可以获得可用的变量列表

例如,在定制java类时,我知道我可以使用${USER}和${DATE},我(正确地)猜测${YEAR}是可用的。。。但我想找到所有可供使用的预定义变量


我已经查看了Apache的常规VTL语言文档,但没有找到我正在搜索的信息。

我找到了列表!在Android Studio中,我进入了文件|新建|编辑文件模板 这将弹出一个对话框“文件和代码模板”,默认选项卡是“文件”。 默认的文件类型是HTML。在描述框中,有一个很长的文本显示它们。用于此的HTML位于C:\Program Files\Android\Android Studio\lib\java\u resources\u en.jar中的java\u resources\u en.jar内的default.HTML中

Along with static text, code and comments, you can also use predefined variables (listed below) that will then be expanded like macros into the corresponding values.
It is also possible to specify an arbitrary number of custom variables in the format ${<VARIABLE_NAME>}. In this case, before the new file is created, you will be prompted with a dialog where you can define particular values for all custom variables.
Using the #parse directive, you can include templates from the Includes tab, by specifying the full name of the desired template as a parameter in quotation marks. For example:
#parse("File Header.java")
Predefined variables will take the following values:
${PACKAGE_NAME}         name of the package in which the new file is created
${NAME}         name of the new file specified by you in the New <TEMPLATE_NAME> dialog
${USER}         current user system login name
${DATE}         current system date
${TIME}         current system time
${YEAR}         current year
${MONTH}        current month
${MONTH_NAME_SHORT}         first 3 letters of the current month name. Example: Jan, Feb, etc.
${MONTH_NAME_FULL}      full name of the current month. Example: January, February, etc.
${DAY}      current day of the month
${DAY_NAME_SHORT}       first 3 letters of the current day name. Example: Mon, Tue, etc.
${DAY_NAME_FULL}        full name of the current day. Example: Monday, Tuesday, etc.
${HOUR}         current hour
${MINUTE}       current minute
${PROJECT_NAME}         the name of the current project
除了静态文本、代码和注释外,还可以使用预定义变量(如下所列),这些变量将像宏一样展开为相应的值。
还可以以${}格式指定任意数量的自定义变量。在这种情况下,在创建新文件之前,将出现一个对话框,提示您可以在其中为所有自定义变量定义特定值。
使用#parse指令,您可以通过在引号中指定所需模板的全名作为参数,从“包含”选项卡中包含模板。例如:
#解析(“File Header.java”)
预定义变量将采用以下值:
${PACKAGE_NAME}在其中创建新文件的包的名称
${NAME}您在“新建”对话框中指定的新文件的名称
${USER}当前用户系统登录名
${DATE}当前系统日期
${TIME}当前系统时间
${YEAR}本年度
${MONTH}当前月份
${MONTH_NAME_SHORT}当前月份名称的前3个字母。例如:一月、二月等。
${MONTH\u NAME\u FULL}当前月份的全名。例如:一月、二月等。
${DAY}当月的当前日期
${DAY_NAME_SHORT}当前日期名称的前3个字母。例如:周一、周二等。
${DAY\u NAME\u FULL}当天的全名。例如:星期一、星期二等。
${HOUR}当前小时
${MINUTE}当前分钟
${PROJECT_NAME}当前项目的名称