How do I modify Eclipse code formatting?

后端 未结 5 718
醉酒成梦
醉酒成梦 2020-12-01 09:30

When I reformat code with Eclipse, it turns method headers like this:

public void myMethod(String param) {

into method headers like this:

5条回答
  •  醉梦人生
    2020-12-01 09:59

    In my version of Eclipse, I found the option under Window->Preferences->Java->Code Style->Formatter, then clicked the Edit.. button.

    In the new window, go to the Line Wrapping tab and find Method Declarations. You want to change the Line wrapping policy. The Force split check box seems to do the same.

提交回复
热议问题