Bug 45157 - Source Formatter: Clear all Blank lines needs to have the ability to set a number of lines to keep.
Summary: Source Formatter: Clear all Blank lines needs to have the ability to set a nu...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 45039
Blocks:
  Show dependency tree
 
Reported: 2003-10-18 11:28 EDT by Robert (Kraythe) Simmons CLA
Modified: 2003-12-17 05:51 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert (Kraythe) Simmons CLA 2003-10-18 11:28:10 EDT
 
Comment 1 Robert (Kraythe) Simmons CLA 2003-10-18 11:33:37 EDT
Ooops ... Wrong button ... here is the description: 

in the formatter there is a checkbox on the New Lines tab that says clear all 
blank lines. I would like this changed so that you can clear all blank lines 
above a certain value. So If I set "keep" to 1 then anywhere the formatter 
encounters 2 blank lines in a row it will compress them to one blank line. 


Input: 

public class foo {


  /** some attribute. */
  public int someAttr = 0;

  
  public foo() {
    // intitialize
    someAttr = -1;

    for (int idx=0; idx<1000;idx++) 
    }
  }
}

With code keep blank lines = 1 it is .. 

public class foo {

  /** some attribute. */
  public int someAttr = 0;
  
  public foo() {
    // intitialize
    someAttr = -1;

    for (int idx=0; idx<1000;idx++) 
    }
  }
}

With code keep blank lines = 0 it is .. 

public class foo {
  /** some attribute. */
  public int someAttr = 0;
  public foo() {
    // intitialize
    someAttr = -1;
    for (int idx=0; idx<1000;idx++) 
    }
  }
}

Comment 2 Olivier Thomann CLA 2003-10-20 13:36:16 EDT
This is doable when the new code formatter preference page is ready.
Comment 3 Olivier Thomann CLA 2003-12-04 10:07:49 EST
Could you please check the new formatter preferences page in the latest
integration build and let me know if it works as expected?
Then I can close it.
Comment 4 Olivier Thomann CLA 2003-12-04 22:23:28 EST
This is done by changing the values for blank lines using the new code formatter
preference page.
Comment 5 Olivier Thomann CLA 2003-12-05 07:56:03 EST
Fixed in HEAD.
Comment 6 David Audel CLA 2003-12-17 05:51:52 EST
Verified for 3.0M6