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
时间: 2024-10-10 13:01:08