android实用小技巧——android studio新传类时的说明信息常规写法(附带额外写法)

在多人协作开发一个项目的时候,往往会对代码进行修改。但总和的代码块数量众多,如何快速的找到是谁写在什么时候写的就成了关键。接下来教大家的就是在新建类时的系统自动生成注释信息、作者、时间的方法。

设置信息:

File—>Settings—>Editor—>File and Code Templates

然后:

Includes—>File Header—>设置说明信息—>Apply

操作实例:

 

 四

 

代码:

/**
 *author:  ${USER}
 *创建时间:${DATE}
 *Describe:
 */

除了添加以上的作者,日期外,还可以添加其他额外的信息,如下:

${PACKAGE_NAME} name of the package in which the new file is created

${USER} current user system login name

${TIME} current system time

${YEAR} current year

${DATE} current system date

${MONTH_NAME_SHORT} first 3 letters of the current month name

${MONTH_NAME_FULL} full name of the current month.

${MONTH} current month

${DAY} current day of the month

${HOUR} current hour

${MINUTE} current minute

${PROJECT_NAME} the name of the current project

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值