Jautodoc of Java Copyright information

Source: Internet
Author: User

Java project development, often need to add some copyright notice or class comments on the encoded file, if a lot of files, manually to add or modify, it will be very troublesome. Tools can be used to meet our requirements.
First, the copyright notice
You can use Jautodoc. Copy the Jautodoc plugin and feature directories to the Eclipse directory, and restart eclipse with the-clean parameter (this parameter is no longer needed). To the eclipse's window->preference menu, java-jautodoc,configure project specific settings, select the Add File header and click the "Edit" button, Enter the copyright information and save it.
In the future to add copyright, press ALT+SHIFT+J, you can.
Similar copyright information is as follows:
/**
*@ project name: ${project_name}
*@ file name: ${file_name}
* @Date: ${date}
* @Copyright: ${year} www.xxx.com Inc. All rights reserved.
* Note: This content is limited to the internal circulation of XXX company, prohibit the leakage and for other commercial purposes
*/
Where ${project_name},${file_name} and ${date}, ${year} are built-in variables, when you edit the template, after you enter $, there will be a lot of similar variable hints displayed.
Second, class comments, method comments, etc.
You can use the Code style feature of Eclipse directly.
Class comments in Window-reference-java-code style-code templates-comments, select Types, then click the "Edit" button, enter the class annotation information, save.
To add copyright later, press Ctrl+alt+j (the shortcut can be viewed and modified in Window-preference-general-keys).
A similar class comment is as follows:
/**
* @Project: ${project_name}
* @Author: Vin
* @Date: ${date}
* @Copyright: ${year} www.xxx.com Inc. All rights reserved.
*/
Similarly, the ${date} Here is also a predefined variable.
Window-preference-java-code style-code templates-comments, select types, you can edit the comments of the class,
Window-preference-java-code style-code templates-comments, select files, edit the comments for the class file
Window-preference-java-code Style-code templates-comments, check methods, editable method comments
Wait a minute.
In Window-preference-java-code style-code Templates-code, edit new class files, add
${filecomment}
${package_declaration}
${typecomment}
${type_declaration}
You can automatically add a file comment and class comment that you set earlier when you create a new class file.
The action of a method comment is similar to the action of a class comment. Can do their own research.
Finally, to use these annotations, in the Window-preference-java-code style, automatically add comments for new methods and types are selected to be applied to the development. or place the cursor in a method or class that needs to be annotated by pressing the ALT+SHIFT+J key

Jautodoc of Java Copyright information

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.