Pankratz
Pankratz

Reputation: 21

Eclipse Code formatter: keep complete function signature in one line

how is it done? cant find the option? why is it anyways, that so many people format their code that way? i really dont like it...

int
foo(int);  //dont like

int foo(int); //like

Upvotes: 2

Views: 382

Answers (2)

Tod
Tod

Reputation: 8252

Start with the Window->Preferences menu. I like to type "code" into the search box to limit the options. Then follow the steps in the image ** You can format almost everything.
I can't answer why some people would like the return value on a line by itself; I've never met anyone that did.

enter image description here

Upvotes: 1

apiri
apiri

Reputation: 1633

By default, Eclipse shouldn't be reformatting your code unless you have it do so through the Format command.

However, if you're working with other people's codes and want to format it to your liking it is possible to have Eclipse apply formatting.

You can adjust how this works by locating the Code Style section under the language you are using under the Preferences menu.

Upvotes: 1

Related Questions