Bug 359214

Summary: Smart "Allow whitespaces at the end of the line" setting
Product: [Eclipse Project] JDT Reporter: Marvin Fröhlich <eclipse>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, remy.suen
Version: 3.6.2   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Marvin Fröhlich CLA 2011-09-28 08:00:42 EDT
Build Identifier: 20100917-0705

Many developers don't care about whitespaces while typing, which leads to pretty ugly indented and "whitespaced" code, that other developers, who care and rely more on it, have to deal with then.

Many editors have a setting called something like "Allow whitespaces at the end of the line". Especially Microsoft programming editors often force you to use it, which sucks, since they're simply not smart enough. And I think Eclipse can do better :).

This setting normally automatically erases all whitespaces from the very right of a line up to the first and rightmost non-whitespace character when you leave the line. This is evil, because this normally also erases indentation whitespaces from empty lines, which must never be done.

A setting in Eclipse should allow the user to select, whether to also erase indentation whitespaces or not. And this feature should be usable as instant action (when leaving a line) or as separately selectable save-trigger-action. It must be usable apart from the formatter, since I would never allow one of my team to use save-format-trigger, because they tend to destroy the format here and there.

Reproducible: Always
Comment 1 Dani Megert CLA 2011-09-28 08:11:28 EDT
> This setting normally automatically erases all whitespaces from the very right
You mean when 'Allow whitespace...' is disabled?
Comment 2 Marvin Fröhlich CLA 2011-09-28 09:29:39 EDT
Yes
Comment 3 Dani Megert CLA 2011-09-29 03:31:32 EDT

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