Eclipse automatically generates method annotation shortcuts

Source: Internet
Author: User

Reprinted from: http://blog.csdn.net/hui1502/article/details/7023758

The annotation format of the automatically generated method, for example

/**
* @ Param Str
* @ Return
* @ Throws parseexception
*/

The shortcut key is Alt + Shift + J. Place the cursor on the method name and press the shortcut key. Will generate the format of the above method comment, the specific content must be filled in by yourself.

This format is also generated when the cursor is placed on the class name, but only author is used to automatically fill in your system user name.

This operation, right-click the method, source, generate element comment

another option is to automatically comment out/uncomment Code Ctrl +/or Ctrl + 7 (which seems to be an effect ), three or five lines of code. You do not need to write a single line of code by hand. You can use the mouse to select the line to be commented out, and press Ctrl +/to automatically add a slash to the beginning of the line //, then, the comment is canceled.

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.