Accepted answer

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.


The best way to change your format is to go to Window-> Preferences-> Java-> Code Style-> Formatter. Inside the formatter window, eclipse has a couple of built in styles, but the best way is create a new profile of your own by pressing on New. You can change the format as you please on the edit tab

As shown in the image

You can change parentheses and curly braces positioning along with other stuff.


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


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.


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.

Related Query

More Query from same tag