Eclipse modify the default javadoc comment content

The default @author ${user} modification displayed when Eclipse adds javadoc

I don't know if I remember, when we added the java doc of the class, we typed /** and then pressed Enter, and the result was

/**

*

* @author XXX

*

*/

If we want to modify this XXX, how many ways are there ?

1. This XXX defaults to the computer name. If you don't want to modify it every time, you can modify the computer name. It is estimated that there is no developer who wants to do this?

2. Modify Window->Preferences->Java->Code Style->Code Templates, select Comments, and then find Types

/**

* @author ${user} <-- modify this variable to your own annotation name.

*

* ${tags}

*/

Relatively good, but what if the ${user} variable is used elsewhere?

3. Find eclipse.ini in the Eclipse directory, use Notepad, etc. to open the editor, find -vmargs, and then press Enter (note that it must be a newline, otherwise it is useless) and then enter the startup parameters:

-Duser.name=whateveryouwant will do.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326500629&siteId=291194637