Simply go to: Window - Preferences - Java - Code Style - Code Templates - Comments - Types - Edit... and change ${user} to whatever you want. Also go to: Window - Preferences - Java - Editor - Templates - @author - Edit... and change ${user} to whatever you want.
Shift + Alt + J will help you add author name in existing file.
For windows, it's in the same directory as eclipse.exe file, as shown in below image. You can reach this location by first right clicking on Eclipse app and click on “Show Package Contents” and then in the next window navigate to Contents/Eclipse directory, as shown in below images.
I'm not sure if there's a way in Eclipse itself. But from what I can find, ${user}
uses the value of the user.name
environment variable; therefore, you can pass -Duser.name=My Name
in eclipse.ini to override it.
Or, if you prefer, you can modify the shortcut to point to:
C:/java/eclipse/eclipse.exe -vmargs -Duser.name="cleverUserNameToUseInSourceCode"
as shown in this blog entry.
Windows > Preferences > Java > Code Style > Code Templates > Comments
Select Types
and edit the template to insert another value (possibly a fixed one for now, or change the user.name property as mmyers suggests)
/**
* @author myUserValue
*
* ${tags}
*/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With