Eclipse Accelerator automatically generates comment code, modifies pre-format

Source: Internet
Author: User

Using eclipse to write Java code, you can automatically generate comment code, but automatically generated comment information is pre-set format.

In fact, we can set the format of the information we want to display in eclipse.

Method: Click Windows->preferences->java->code style->code Templates,

Select the comments in the right window to edit the specific comment information.

For example: Set author author information and date information.

Select types, click Edit, you can modify the original template, the original format is as follows:

/**
* @author ${user}
* ${tags}
*/

In the edit interface, you can click Insert Variable, you can add many elements, such as: select Date, so that the date information is automatically generated.

After we have set up the test, the automatically generated comment information is:

/**
* @author ${user}

* 2016-4-1
*/

Eclipse Accelerator automatically generates comment code, modifies pre-format

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.