MikeS
MikeS

Reputation: 3921

Eclipse Annoying Default Formatting

My original code:

ListView myListView = (ListView) view.findViewById(R.id.myListView);

Code after format (annoying!):

ListView myListView = (ListView) view
                .findViewById(R.id.myListView);

What setting do I adjust to prevent eclipse's format from making this particular change? I'm looking in the formatter settings, but haven't been able to find it yet as I'm not quite sure how I would describe this change...

Upvotes: 1

Views: 98

Answers (2)

MikeS
MikeS

Reputation: 3921

It turns out what I actually wanted was...

Preferences > Java > Code Style > Formatter > Line Wrapping > Function Calls, then to set the Line wrapping policy to Do not wrap (5 of 5).

Upvotes: 0

reprogrammer
reprogrammer

Reputation: 14718

One way to avoid the line wrapping is to increase the value of field "Maximum line width" on the "Line Wrapping" tab of Preferences > Java > Code Style > Formatter > Edit...

Upvotes: 3

Related Questions