Eclipse formatting custom code style styles

Source: Internet
Author: User

Shift+ctrl+f is the formatting of the current code style

Formatting the entire project, right-Jian--soruce-formatter

To set the first "{" In Class,method, in the class name, on the same line as the method name, to be in:
Windows->prrferences->java->code style->formatter->edit->braces, all set to Sameline. To display in a new row, is set to next line.


Set "Formatter": Eclipse built-in templates cannot be exported, you need to create a new one. Enter a template name and select the file to initialize the settings. This part mainly sets the format of the code after formatting, including indentation, blank lines, curly brackets and so on. Specific things in accordance with their own hobbies, you slowly determine it. Then click Export to Save as an. xml file.

Eclipse formatting custom code style styles

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.