The shortcut key for adding comments to eclipse is Alt + Shift + J. In the menu, it is source-> Generate element comment.

Source: Internet
Author: User

Alt+ Shift +J

Click a blank space and useAlt+ Shift +JThe shortcut key generates the author's name.

Click the method name and useAlt+ Shift +JComment on the method for generating the shortcut key. Make a slight modification to make it easy to write comments.

This annotation can be easily generated by ECLIPSE, which is very helpful for others to understand your project.

------------

How does eclipse generate a document (javadoc ):

Right-click the project list, select Export (export), select javadoc under Java in the Export (export) dialog box, and submit it to the next step. In the javadoc generation dialog box, there are two points to note: javadoc command: select the JDK bin/javadoc.exe destination: to save the path of the generated document. Click Finish to generate the document.

__________________________________________________________________________________________________________

Leave your name on the program you write. It is a normal situation that you should have the right.

 

In eclipse, ALT + Shift + J is named add javadoc comment in the Keys configuration,

In the menu, select Source-> Generate element comment.

/**

* @ Author zhaohengzhan@gmail.com
* Jun 24,200 912: 06: 29 pm

*/

The cursor is added at the top of the class. This content is not included in the method.

 

This is preference-> java-> codestyle-> codetemplates-> commnets-> type

You can edit it as follows:

/**

* @ Author zhaohengzhan@gmail.com
* $ {Date }$ {time}

*/

I have not found the format of time and date. Now I can only use this method.

 

Of course, you can type @ author in the javadoc of the method to automatically complete it,

In preference-> java-> editor-> templates-> commnets, define a @ author,

Same as above.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.