Java Development tools @author How to change in eclipse

Source: Internet
Author: User

Link Address: http://jingyan.baidu.com/article/c843ea0b999e1577931e4af3.html

Java development tools in Eclipse @author How to change, when developing in order to indicate the copyright information. With the Eclipse development tool, the default is the system user, then how to modify it

Method/Step
    1. Note A class of developers, the default is the system users, many times the author is not what we need, such as

    2. The following steps describe how to change the required author information, open your development software, locate the properties

    3. Click Properties to open the Software Properties Management dialog box, as

    4. Find Preferences->java->code Style->code template->types, such as

    5. Select types, select the Edit button on the right, go to the edit page, edit the author you need

    6. Type in the Java class you have developed, such as format

    7. Press ENTER, then the author will appear for you to set the

      END
Automatically add comments (author, time) link address in Eclipse: Http://www.cnblogs.com/dartagnan/archive/2011/03/29/2003425.htmlEclipse automatically add comments (author, Time

Method one: Settings in eclipse automatically generate comments when new classes are created


Windows-->preference
Java-->code Style-->code Templates
Code-->new Java Files
Edit it

${filecomment}
${package_declaration}
/**
* @author author E-mail:
* @version creation time: ${date} ${time}
* Class Description
*/
${typecomment}
${type_declaration}

Method Two:

Open the parameter Settings panel from the menu window->preference and select:
Java-code Style--code Templates



Select Comments on the right, place the files item, and then choose "Edit" on the right to enter edit mode:



After entering edit mode, you can customize the annotations. You can also insert some variables, such as year, date, and so on.



Finally, make sure that the Code-and New Java files have: "${filecomment}"



Of course, with the "Export" and "import" functions, you can export your own templates for use on other machines.




The above is a file comment, and the method in the class automatically adds a comment similar to the types below files.

Eclipse shortcut key: Alt+shift+j after selecting your method

Category: Eclipse

Java Development tools @author How to change in eclipse

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.