Bug 112460 - [formatting] Whitespace after empty javadoc lines.
Summary: [formatting] Whitespace after empty javadoc lines.
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-13 07:41 EDT by Hilbert Schraal CLA
Modified: 2011-10-11 05:57 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 Hilbert Schraal CLA 2005-10-13 07:41:34 EDT
When formatting Java code (shift + ctrl + f), empty javadoc lines will get
trailing whitespace. This is not desirable. It e.g. generates loads of errors
when using the checkstyle plugin.

e.g.

/**
 * Messages for the SWT Calendar.
 * 
 * @author schraal
 */

(note the trailing space in the empty javadoc line).
Comment 1 Olivier Thomann CLA 2007-03-07 14:38:57 EST
Closing as INVALID since the editor removes trailing spaces on save now.
Comment 2 Sei Syvalta CLA 2011-10-03 08:32:26 EDT
Eclipse Java EE IDE for Web Developers.

Version: Indigo Service Release 1
Build id: 20110916-0149

Under "Java" - "Editor" - "Save Actions", enable:
- Perform selected actions on save
 - Format source code
  - Format all lines
- Additional actions
 - Remove trailing white spaces on all lines

This results in empty spaces after empty javadoc lines.

The end result is that if you use "format on save" action you cannot prevent the trailing spaces of appearing (perhaps because of the order the actions are executed).

There seems to be discussion about the issue also in stackoverflow: http://stackoverflow.com/questions/7008340/eclipse-formatter-adds-space-in-empty-comment-lines

Could this issue be reopened or should I create a new issue?
Comment 3 Sei Syvalta CLA 2011-10-11 05:57:03 EDT
Created a distinct issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=360523