Eclipse set curly Brace wrap Display

Source: Internet
Author: User

Http://www.cnblogs.com/zhwl/archive/2012/12/17/2821806.html

Accustomed to the C code style, with the eclipse style, is really to see the egg pain. Especially the curly braces at the end, which makes me feel pretty awkward. Code blocks do not show up as blocks of code:

So we found a way to modify it.

1) Find the menu Windows->preferences->java->code style->formatter.

2) Click New

3) After OK, select the braces tag, modify the options inside (generally choose Next line) recommend everyone except the last one does not modify the other all choose Next line. Then various apply,ok to the end.

4) Open the Code of a project, reformat (CTRL+SHIFT+F) to show the new style.

If you want to format the entire Java file under the source directory, right click on the src directory, select Source-format.

Eclipse set curly Brace wrap Display

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.