Bug 228723

Summary: [StyledText] Allow to enter Form Feed (^L) character into editor
Product: [Eclipse Project] Platform Reporter: James Allen <jim.allen>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, niraj.modi, steve_northover
Version: 3.3Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description James Allen CLA 2008-04-24 13:47:40 EDT
I like to use the Form Feed control character (^L) in my C++/Java source code to cause my printed source pages to break at lines that do not disrupt block indentation.
All Eclipse compilers understand (i.e., ignore) this character and the Eclipse Java Editor displays the character as an unprintable character (square) and allows it to be copied from one line to another.
There seems, however, to be no way for me to enter this charater into my source file from the keyboard. (Perhaps this capability exists but I have looked quite extensively.)

I am very impressed with Eclipse - very good work.
Comment 1 Bjorn Freeman-Benson CLA 2008-04-24 15:47:20 EDT
Moving to JDT.
Comment 2 Dani Megert CLA 2008-04-25 02:21:11 EDT
Moving to SWT for comment: is this possible with StyledText or do we have to build a layer on top of it?
Comment 3 Steve Northover CLA 2008-04-25 12:03:07 EDT
By default, StyledText should not allow the user to embed control characters such as ^L into the text that the user types.  It should be pretty easy to detect that the user typed it (using event.keyCode and event.character) insert the character into the text of the control.  I have no idea how the operating system will draw the character and/or if it will conflict with the StyledText line delimiter.  This all needs to be tried in a snippet.

Please don't build a layer dedicated to ^L.  There are enough layers already in the system.
Comment 4 Felipe Heidrich CLA 2009-08-14 09:01:30 EDT
Your bug has been moved to triage, visit http://www.eclipse.org/swt/triage.php for more info.