Jeff Axelrod
Jeff Axelrod

Reputation: 28188

Can Eclipse's Java editor do soft line wrapping?

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

Upvotes: 19

Views: 5811

Answers (5)

Blaisorblade
Blaisorblade

Reputation: 6488

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

Upvotes: 6

VonC
VonC

Reputation: 1324937

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

Upvotes: 5

Barth
Barth

Reputation: 15715

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/

Upvotes: 1

Jeff Axelrod
Jeff Axelrod

Reputation: 28188

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.

Upvotes: 3

Dave Newton
Dave Newton

Reputation: 160201

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

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

Upvotes: 10

Related Questions