Previously wanted to implement the addition of code author information, but do not know how to achieve, today finally on the Internet inadvertently find a solution
Eclipse automatically generates feature settings such as author, date comment, and more
when using Eclipse when you write Java code, the automatically generated comment information is generated in a pre-set format.
Modify author, date comment format: Open windows->preferences->java->code style->code Templates, click Comments in the right window, you can see a lot of options, We can edit this comment information template.
If we want to set the author information and date information at the beginning of a Java file.
Select types, click Edit, and
/**
* @author ${user}
* ${tags}
Span style= "Color:rgb (51,51,51)" >
 */  
Delete the ${user}, change it to the name you want to display, delete ${tags}, click Insert Variable, select Date, and the date information will be generated automatically. When you need to add a comment, click Sources->ganarate Element Comment, or use the shortcut key Alt+shift+j, Eclipse automatically adds a comment before the class.
The specification for annotations is as follows:
File Comment Tags:
/**
* <p>title: ${file_name}</p>
* <p>description: </p>
* <p>copyright:copyright (c) 2007</p>
* <p>Company:LTGames</p>
* @author LINRZ
* @date ${date}
* @version 1.0
*/
Type Comment Label (note for Class):
/**
* <p>title: ${type_name}</p>
* <p>description: </p>
* <p>Company:LTGames</p>
* @author LINRZ
* @date ${date}
*/
Field Comment Label:
/** ${field}*/
Constructor Tags:
/**
* <p>title: </p>
* <p>description: </p>
* ${tags}
*/
Method Tags:
/**
* <p>title: ${enclosing_method}</p>
* <p>description: </p>
* ${tags}
*/
Override method Label:
/* (non-Javadoc)
* <p>title: ${enclosing_method}</p>
* <p>description: </p>
* ${tags}
* ${see_to_overridden}
*/
Represent method Tags:
/**
* ${tags}
* ${see_to_target}
*/
Getter Method Tags:
/**
* @return ${bare_field_name}
*/
Setter Method Tags:
/**
* @param ${param} to set the ${bare_field_name}
*/
Eclipse Auto-complete feature settings , the default is type "." There will be code hints, otherwise only press the "alt+/" key combination. The following settings allow you to display code hints as you want .
1), Direct settings
Open Eclipse, Window, perferences->java->editor->content Assist, the option that appears on the right, has an auto activation T Riggersor for Java, you'll see only one "." in the text box . Exist. Indicates: Only input "." Then there will be code hints, this is the place to modify, we are directly in the "." In the back of the abcdefghigklmnopqrstuvwxyz, so just type "." Or any letter will have a code hint. If you're not enjoying it, you can then enter "0123456789" or
"_" or something that might be used, and then click "OK".
2), through the import and export file features of Eclipse
Open File--export-> general->Preferences, click "Next", tick "Export all" and select Save Path, "Finish" to complete. Use Notepad to open the file that you just exported with the ". epf" suffix.
[HTML]View Plaincopy
- / instance/com.android.ide.eclipse.ddms/ emulatorcontrol.track.name = 141 &NBSP;&NBSP;
- /instance/com.android.ide.eclipse.ddms/threadpanel.stack.col4 = 51 &NBSP;&NBSP;
- /instance/org.eclipse.jdt.ui/content_assist_autoactivation_triggers_java =.&NBSP;&NBSP;
- /instance/com.android.ide.eclipse.ddms/threadpanel.stack.col3 = 49 &NBSP;&NBSP;
- /instance/com.android.ide.eclipse.ddms/threadpanel.stack.col2 = 350 &NBSP;&NBSP;
- /instance/com.android.ide.eclipse.ddms/threadPanel.stack.col1=121
At the end of the third line is "." is to modify the place, as long as in the "." Enter the characters you want to enter. Save after you have changed, open File-- import-> general-
> Preferences, select the file you just modified tick "Import all", click "Finish" to complete.
Of course, you can also set some other parameters as needed