Reputation: 5399
Could anybody share their eclipse formatter settings file or point me to such a file which will prevent my eclipse from doing the following thing:
when I press ctrl+shift+F to format my code, eclipse from this string:
dayArrayList.add(new Day(WeekDay.SATURDAY));
the following string:
dayArrayList.
add(new Day
(WeekDay.SATURDAY));
So I want only really looooooooooong code strings be moved to next line (those, which don't fit into the eclipse window), but eclipse do this almost with all strings.
Thanks in advance!
Upvotes: 0
Views: 1891
Reputation: 11078
You can set the maximum line width in eclipse by:
Window -> Preferences -> Java -> Code style -> Formatter -> Edit
On line wrapping tab, change the default 80 to your preference. Note that you will have to save as a new profile if you are changing the default one.
Upvotes: 0
Reputation: 1755
In Eclipse go to Window->Preferences->Java->Code Style->Formatter
Then Create a new profile and in the Line Weapping Tab you have the Parameter "Maximum line width"
Upvotes: 0
Reputation: 47608
Simply increase the Maximum line width to let's say 140 chars?
The following formatter does this.
Upvotes: 1