Eclipse中@author的修改

什麼東西均可能會被忘掉,我這種記性很差的就更容易忘了。換了電腦後eclipse中的@author變了,因而找了下修改@author的方法:
1. 在eclipse.ini中添加
-vmargs
-Duser.name={author name}
記得必定要在-vmargs以後,不然無效。

2. 設置eclipse參數
windows-->preference
Java-->Code Style-->Code Templates
code-->new Java files
原來的內容是:
${filecomment}
${package_declaration}

${typecomment}
${type_declaration}
添加自定義內容,添加以後內容以下:
${filecomment}
${package_declaration}
/**
* @author 做者 E-mail:
* @version 建立時間:${date} ${time}
* 類說明
*/
${typecomment}
${type_declaration}

3. 設置eclipse參數
windows-->preference
Java-->Code Style-->Code Templates
Comments-->files
按照須要修改配置,而且保證上面項的配置中有${filecomment}這項。windows

相關文章
相關標籤/搜索