在Android Studio中更改作者模板 [英] Change Author template in Android Studio
本文介绍了在Android Studio中更改作者模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想更改在AndroidStudio中创建文件时显示的自动作者。
I want to change the automatic author that appears when I create a file in AndroidStudio.
/**
* Created by a556520 on 16/01/14.
*/
public class POI {
作者需要'a556520'但是我希望这看起来像我的名字,而不是员工的数量。那可能吗?
我在设置中找不到。
The author takes 'a556520' but I want that appears my name, and not the number of employee. Is that possible? I didn't find in the settings.
推荐答案
您可以覆盖 $ { USER}
模板文件中的变量
You can overwrite the ${USER}
variable in the template file with the
#set( $VARIABLE = "value")
功能。转到设置 - > 编辑 - > 文件和代码模板 - > 包含 - > 文件标题前置 #set()
函数调用,例如:
function. Go to Settings -> Editor -> File and Code Templates -> Includes -> File Header prepend the #set()
function call, for example:
#set( $USER = "Your name" )
/**
* Created by ${USER} on ${DATE}.
*/
这篇关于在Android Studio中更改作者模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文