开发者

How do I get the Intellij code autoformatter to keep an annotated field on one line?

开发者 https://www.devze.com 2022-12-14 21:08 出处:网络
Whenever I run the IntelliJ autoformatter - it converts this: @Autowired private CustomerDao customerDao;

Whenever I run the IntelliJ autoformatter - it converts this:

@Autowired private CustomerDao customerDao;

i开发者_运维问答nto this:

@Autowired 
private CustomerDao customerDao;

How can I stop it from doing that?


Navigate to Preferences → Editor → Code Style → Java → Wrapping and Braces tab, then locate the section Field annotations and check the option Do not wrap after single annotation.

In IntelliJ v14:

How do I get the Intellij code autoformatter to keep an annotated field on one line?

0

精彩评论

暂无评论...
验证码 换一张
取 消