How do I modify Eclipse code formatting?

血红的双手。 提交于 2019-11-27 08:15:52
tangens

Have a look at Window>Preferences>Java>Code Style>Formatter.

There you can configure almost everything. Your case is found at

Line Wrapping>Method Declarations>Parameters.

Colin Gislason

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.

MarkPowell

Go into preferences: Java -> Code Style -> Formatter

Restore Defaults or edit what's there.

Additionally, Code Style -> Code Templates will allow you to define generate code formatting.

Note that this is for Eclipse Workspace as a whole, the same Preferences can be accessed under the project preferences if you want to get more fine grained at a per project level.

Imran khan

In eclipse you can define your code formatting use Code Style ,

for MAC System :--> Eclipse --> Preference -- > java--> code Style

for Window System :--> Window->Preferences->Java->Code Style->Formatter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!