Can Eclipse's Java editor do soft line wrapping?

By | December 14, 2017
Questions:

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.

Multi-pane Editor Example

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?

Good Editor Example

Answers:

This bug has been finally fixed in Eclipse 4.6 Neon:
https://www.eclipse.org/eclipse/news/4.6/platform.php#word-wrap

EDIT: Here’s a screenshot of a Java editor with the feature active. Screenshot showing this in action

Questions:
Answers:

Nope. Not that is hasn’t been asked for.

There’s a plugin but I’ve never used it.

Questions:
Answers:

February 2014: the new repo de.cdhq.eclipse.wordwrap from Florian Weßling (ColdDevil) does provide good wrapping.
It just got updated to support Auto-Wrapping on Startup:

When it’s activated in the preferences word wrap will be automatically enabled in all open editors when Eclipse is started.

See the project page:

http://dev.cdhq.de/eclipse/word-wrap/img/01_wrappingOff.gifhttp://dev.cdhq.de/eclipse/word-wrap/img/02_wrappingOn_full.gif

Questions:
Answers:

It seems that this is not possible in Eclipse at this time; this feature has been requested and unimplemented since 2003 with 103 users on the CC list.

Questions:
Answers:

There is now a plugin allowing soft wrapping. It is experimental and will break the line numbering.

http://ahtik.com/blog/projects/eclipse-word-wrap/

Leave a Reply

Your email address will not be published. Required fields are marked *