Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350694 - leading and trailing newline characters should be configurable from the whitespace dialog
Summary: leading and trailing newline characters should be configurable from the white...
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-29 08:15 EDT by za_creature CLA
Modified: 2011-06-29 09:48 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description za_creature CLA 2011-06-29 08:15:53 EDT
Build Identifier: Build id: I20110613-1736

Since 3.7.0 there is now a dialog window that allows users to choose which whitespace characters should be displayed. They seem to be divided context-wise into three categories: leading, trailing and in between. This feature, while very cool and useful for PHP developers (since having leading or trailing white space within a source can lead to a host of trouble, such as corrupt binary output or the inability to set headers) is almost perfect, except for one point:
The newline characters (\r and \n) can only be checked at trailing. I believe that in the case of newline characters, the leading, trailing and in between should work at a global level (per file) and should mean before first non-whitespace character (leading), after the last non-whitespace character (trailing) and in between for the rest of the lines. This way, PHP developers can easily spot newlines after the ?> tag without having distracting \n markers

Reproducible: Always
Comment 1 Deepak Azad CLA 2011-06-29 09:24:14 EDT
(In reply to comment #0)
> The newline characters (\r and \n) can only be checked at trailing. I believe
> that in the case of newline characters, the leading, trailing and in between
> should work at a global level (per file) 
Changing the meaning of leading, trailing, in between for \r and \n would be confusing. And I do not think the gains are significant. If I understand correctly you just want to know if there are any new lines at the end of the file but not otherwise. To do this you can enable line numbers in the editor, if there are empty line numbers at the end of the file you will see the line numbers on the left.

Closing this as WONTFIX.
Comment 2 za_creature CLA 2011-06-29 09:48:34 EDT
I guess that works too. Thanks for the quick reply