Eclipse/myeclipse use of annotation templates and formatting templates

Source: Internet
Author: User
Tags rar

in the complete life cycle of a project, its maintenance costs are often several times the cost of its development. Therefore, the maintainability and reusability of a project is the key to measuring the quality of a project. Annotations are an essential part of maintainability.

Note Template Import steps  

Installation method:
Open Eclipse/myeclipse
Select Window-->preferences-->java-->code-->code Templates Right Point import Select the template you have written. xml file You can import it in .

How to use:
When creating a new class, tick the "Generate comments" option. The newly created class automatically adds comments that are defined in your comment template. Or use the shortcut key shift+alt+j.

The following is a comment line template codetemplates.xml, which can be imported directly using. Source (see annex) for your reference

format Template Import steps

Open Eclipse/myeclipse
Select Window-->preferences-->java-->code-->code style-->formatter--> Right Point import Select the template you have written. xml file You can import it in .

How to use:
1. Use the shortcut key ctrl+shift+f.

2. Select Window-->preferences-->java->editor->save actions-> tick format Source Code

This way, the code is automatically formatted when Eclipse MyEclipse saves the code.

Below is a code formatting template codeformatter.xml that can be imported directly using. Source (see annex) for your reference

    • Codeformatter.rar (2 KB)

    • Download number of times: 3242

    • Codetemplates.rar (1.1 KB)

    • Download number of times: 3004


Eclipse/myeclipse use of annotation templates and formatting templates

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.