Saleh Feek
Saleh Feek

Reputation: 2076

eclipse auto formate : How to stop new line after dot of method call?

When I press Ctrl+Shift+F

This line:

A

winterwell.jtwitter.Status status = twitter.updateStatus(statuses[0]);

Is formatted like this

B

winterwell.jtwitter.Status status = twitter  
     .updateStatus(statuses[0]);

I want to keep it like in A.

Upvotes: 2

Views: 1999

Answers (2)

jirislav
jirislav

Reputation: 359

In my case helped Eclipse restart after I realised setting Maximum line width to 500 didn't help :-D

.. probably some kind of bug of:

Eclipse Java EE IDE for Web Developers.

Version: Luna Service Release 2 (4.4.2) Build id: 20150219-0600

Upvotes: -1

invertigo
invertigo

Reputation: 6438

That is occurring because of your Maximum line width setting. You might want to increase yours, or look at the other options available for wrapping.

Go to Window > Preferences... Java > Code Style > Formatter > Edit... enter image description here

Maximum line width enter image description here

Upvotes: 4

Related Questions