I like to use Eclipse's Java editor feature that allows the me to split the editor window into several panes so I can look at multiple files at once (See below). When I do this, the editors usually can't display the longest lines, and I have to use the horizontal scroll bar.
I don't want to reformat the source itself because the window widths change depending upon what I'm looking at. So what I'm looking for is a soft line wrap, like many editors support (See below). Can I do this in Eclipse?
There is a "Toggle Word Wrap" command hidden in the "Window > Editor" menu (default shortcut is Alt+Shift+Y). Or you can use the Quick Access bar: Ctrl+3, and type wrap.
:) Also in Window->Preferences->General->Editors->Text there is an option "show print margin". If you turn it on you'll always see vertical gray line that shows you when to break to a new line. You have to set the max line width to a very large number, like 1000.
In preferences Java -> Code Style -> Formatter, edit the profile. Under the Line Wrapping tab is the primary option for line width (Maximum line width:).
Nope. Not that is hasn't been asked for.
There's a plugin but I've never used it.
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