1、自動生成類注釋。
如圖;
里面的注釋模板內容為:
/** * @Auther: changtan * @Date: ${YEAR}/${MONTH}/${DAY} ${HOUR}:${MINUTE} * @Description: */
搜索:idea 自定義模板 變量了解更多
2、編輯源文件時,快速添加注釋
如圖:
里面的注釋模板內容為:
/** * @Auther: changtan * @Date: $Date$ $Time$ * @Description: */
點擊OK,Apply完成。
注意,要使用定義的/**添加自定義注釋,要使用Tab鍵,而不能使用回車Enter,否則插入的是默認的空注釋。因為如上圖標注的那樣,“Expand with Tab”。
參考鏈接:
https://www.jianshu.com/p/09139b425cc3
https://blog.csdn.net/fg_411/article/details/104040452
https://blog.csdn.net/qq_34581118/article/details/78409782