Eclipse文件首部自动加 作者时间

 Window -> Preferences -> Java -> Code Style -> Code templates -> (in right-hand pane) Comments -> double-click Types and make sure it has the following, which it should have by default:

/**
 * @author ${user}
 * ${date}  ${time}
 */

then hit the key combo Shift + Alt + J and that will insert a new javadoc comment above, along with the author tag for your user.

 

 

ref: http://stackoverflow.com/questions/7958530/adding-author-name-in-eclipse-automatically-to-existing-files

posted @ 2017-04-11 21:54  圆旭  阅读(217)  评论(0编辑  收藏  举报