When I run the Formatter it indents string literal lines all the way to the last line of the variable name, even if that exceeds the column guide, as shown in this screenshot:
Ideally, I want all of the lines to be wrapped similar to the way the first line is wrapped, with just a couple of tabs (or 1 tab if possible). I've changed all the Formatter settings for assignment and binary expression and it doesn't affect the Formatter's line wrapping behavior.
Is there a way to make Eclipse wrap lines like NetBeans or maybe with some plugin?
Here's what my Formatter settings are for Line Wrapping:
has an "Enhanced and fixed word wrapping mode".
is dedicated to word wrapping and might do the job.
Here's how and where you do it in Eclipse: Preferences->Java->Code Style->Formatter
, then click the Edit
button and select the Comments
tab. After that, the same place, you can select the Line Wrapping
tab and the Indentation
tab. You can also set margins and tab sizes in Preferences>General>Editors>Text Editors
by editing the Displayed Tab Width
I'll note that the Eclipse version should be Eclipse Project Neon (4.6) M4 or higher because Eclipse 4.6 came with some updated word wrapping out of the box.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With