Summary: | [formatter] Removing empty lines between import groups | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Konstantin Scheglov <Konstantin.Scheglov> | ||||||||
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> | ||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||
Severity: | normal | ||||||||||
Priority: | P3 | CC: | daniel_megert, Olivier_Thomann, satyam.kandula, srikanth_sankaran | ||||||||
Version: | 3.6 | ||||||||||
Target Milestone: | 3.6 M5 | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Description
Konstantin Scheglov
2009-12-19 03:16:14 EST
>1. open compilation unit with empty lines between import groups; >2. do formatting, I use Ctrl+Shift+F >3. note that empty lines were removed. Works fine for me using I20091215-1320. Can you please provide more detailed steps. Try to provide a test case that we can apply on a new workspace. >5. But if you don't do manual formatting and instead just save, then >"formatting action on save" also will remove empty lines. Sounds like a different bug. This bug here is about formatting only. Created attachment 154836 [details]
Source with empty lines
Open this file and format it.
Created attachment 154837 [details]
Formatting profile
This is a regression introduced while fixing bug 199265. The problem occurs only when a profile set no blank line to preserve (i.e. Blank lines to preserve = 0). Created attachment 154866 [details]
Proposed patch
Test also if there are some lines to preserve between groups to know whether a call to getPreserveEmptyLines(int) method is necessary or not...
Released for 3.6M5 in HEAD stream. Verified for 3.6M5 using Build id: I20100122-0800 Verified. |