Bug 309835 - [formatter] adds blank lines on each run
Summary: [formatter] adds blank lines on each run
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.6 M7   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-20 11:57 EDT by Filip Hrbek CLA
Modified: 2010-04-27 09:25 EDT (History)
2 users (show)

See Also:


Attachments
A sample project that demonstrates how to reproduce the problem (5.77 KB, application/zip)
2010-04-20 11:57 EDT, Filip Hrbek CLA
no flags Details
Proposed patch (13.98 KB, patch)
2010-04-26 06:38 EDT, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Hrbek CLA 2010-04-20 11:57:19 EDT
Created attachment 165456 [details]
A sample project that demonstrates how to reproduce the problem

Under certain format settings the auto formatter adds blank lines on each run.

It looks like it happens if the maximum length of the comment line is exceeded exactly by 1 character with an unbreakable line.

A sample project is included. See instructions in the class comments how to reproduce the problem.
Comment 1 Dani Megert CLA 2010-04-20 12:15:46 EDT
Can reproduce using I20100414-1200.
Comment 2 Frederic Fusier CLA 2010-04-23 08:43:32 EDT
The given formatter settings also have then 'Never join lines' activated for comments. Without it, the output is correct...

There's also another issue when using the Eclipse built-in profile. The formatter wrongly concatenate the long word with the previous one (Reporter) and also is unstable as it also concatenate the concatenated words with the previous one (Bug) if I format again... :-(

I'm investigating...
Comment 3 Frederic Fusier CLA 2010-04-26 06:38:31 EDT
Created attachment 166058 [details]
Proposed patch

Fix several issues while splitting javadoc comment lines
Comment 4 Frederic Fusier CLA 2010-04-26 06:39:55 EDT
(In reply to comment #3)
> Created an attachment (id=166058) [details]
> Proposed patch
> 
> Fix several issues while splitting javadoc comment lines

Released for 3.6M7 in HEAD stream.

Note that it was in fact released yesterday, hence the fix is in I20100425-2000 build...
Comment 5 Olivier Thomann CLA 2010-04-27 09:25:42 EDT
Verified for 3.6M7 using I20100426-0852.