Eclipse settings Comment Templates for classes and methods

Source: Internet
Author: User
Tags ord

I. Opening the Settings template window: Window->preference->java->code style->code Template expands comments, the most common is the comments of classes and methods, I've listed both of these setup methods.
1. Select types, this is to set the automatic comment template for the class, I set the template as follows:
/** @version: (version, specific version of the information itself to decide)
* @Description: (function description for Class)
* @author: ZMP (author, My Computer is my own use, so directly write their own name pinyin abbreviation)
* @date: D a t e " >< Span id= "mathjax-span-1" class= "math" > d at e date{time} (date)  
*/ 

When you're done, the edit window will close  
2. Select Methods this is the method to set the automatic comment template, the following is the method template I set:  
/* @Description: (method function description)  
* ${tags} (Show method parameters and return values)  
* / 

When you're done, the edit window closes, then you click Apply or OK, and the template is saved.  
The effect is as follows: (class comment/ * Then enter automatically, method comments/ then enter automatically come out)  
 
The above template is I prefer to use, if you usually have other template parameters to add, Just add it directly inside the template

Eclipse Settings class and method 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.