Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 100315

Summary: Edtior "virtual" Line Wrapping (not code formatter)
Product: [Eclipse Project] Platform Reporter: Mark A. Ziesemer <bugs>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
LineWrapping in TextPad none

Description Mark A. Ziesemer CLA 2005-06-15 17:36:33 EDT
I think Eclipse should offer "virtual line wrapping", or whatever the proper 
name is for it.  TextPad, EditPlus, even Visual Studio.Net all offer it.  
(Notepad even tries.  :-)

(I would've guessed that this request was already made, but I can't find it on 
Bugzilla or even Google!  So please forgive me if this becomes a duplicate.)

Ideally, this would be a change to the default editor, so it could be used by 
normal text files, JDT, and any other type of text editor.

Example:  I have a line of text 120 characters long.  My editor is sized that 
it can only display 100 characters.  Instead of the window scrolling 
horizontally, the line would “virtually” wrap the remaining 20 characters to 
the next line.  There would be no physical line break, as the code formatter 
creates.  Such a wrapped line would be signified by an empty line number shown 
in the margin to signify that it is a continued line, and optionally indented.

This would allow for another option over the physical line wrapping performed 
by the code formatter, which introduces its own issues by placing line breaks 
in sometimes arbitrary and unusual places.  For example, if I have a number of 
longer String constants, I may want them stored one-per-line, without having to 
reformat the code (and having line numbers change) to get it to show properly 
within the size of my editor.

(It looks like a StyledText widget may already exist to support this, but it’s 
not used by the text editors?)

I’ll attach an image or two of examples from other applications.

Thanks!
Comment 1 Mark A. Ziesemer CLA 2005-06-15 17:42:01 EDT
Created attachment 23253 [details]
LineWrapping in TextPad
Comment 2 Dani Megert CLA 2005-06-16 01:19:05 EDT

*** This bug has been marked as a duplicate of 23579 ***