Eclipse Comment Template

Source: Internet
Author: User

The Eclipse Comment template on the web, here to sort out some of the more commonly used.

How to edit a comment template: Window->preference->java->code style->code template and then expand the Comments node is all the elements that need to be annotated. Each of these elements is now introduced:

1. Document (files) Note tags:

[HTML]View PlainCopyprint?
    1. /**
    2. * All rights Reserved, designed by Android_robot
    3. * @Title: ${file_name}
    4. * @Package ${package_name}
    5. * @Description: ${todo} (describe what the file does in a word)
    6. * @author: Android_robot
    7. * @date: ${date} ${time}
    8. * @version V1.0
    9. */


2. Type (Types) Comment Label (note for Class):

[HTML]View PlainCopyprint?
    1. /**
    2. * @ClassName: ${type_name}
    3. * @Description: ${todo} (here is a word describing the role of this class)
    4. * @author: Android_robot
    5. * @date: ${date} ${time}
    6. *
    7. * ${tags}
    8. */


3. Field Comment Label:

[HTML]View PlainCopyprint?
    1. /**
    2. * @Fields ${field}: ${todo} (describe what this variable means in a sentence)
    3. */


4. Constructor Tags:

[HTML]View PlainCopyprint?
    1. /**
    2. * @Title: ${enclosing_type}
    3. * @Description: ${todo} (here is a word describing the effect of this method)
    4. * @param: ${tags}
    5. * @throws
    6. */


5. Method (Methods) Tags:

[HTML]View PlainCopyprint?
    1. /**
    2. * @Title: ${enclosing_method}
    3. * @Description: ${todo} (here is a word describing the effect of this method)
    4. * @param: ${tags}
    5. * @return: ${return_type}
    6. * @throws
    7. */

6. Overlay method (overriding Methods) Label:

[HTML]View PlainCopyprint?
    1. /**
    2. * <p>title: ${enclosing_method}</p>
    3. * <p>description: </P>
    4. * ${tags}
    5. * ${see_to_overridden}
    6. */


7. Delegate method (Delegate Methods) Label:

[HTML]View PlainCopyprint?
    1. /**
    2. * ${tags}
    3. * ${see_to_target}
    4. */


8.getter Method Label:

[HTML]View PlainCopyprint?
    1. /**
    2. * @Title: ${enclosing_method} <BR>
    3. * @Description: Please write your Description <BR>
    4. * @return: ${field_type} <BR>
    5. */


9.setter Method Label:

[HTML]View PlainCopyprint?
    1. /**
    2. * @Title: ${enclosing_method} <BR>
    3. * @Description: Please write your Description <BR>
    4. * @return: ${field_type} <BR>
    5. */


The rest is the default, ^_^

Eclipse Comment Template

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.