This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 129600

Summary: Newlines between methods - add an option to preserve them
Product: java Reporter: lilianne_blaze <lilianne_blaze>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description lilianne_blaze 2008-03-08 12:15:53 UTC
Please add an option for formatting (alt+shift+f) to preserve empty lines between methods, fields and comments as it
does inside methods' bodies.

I know it seems trivial, but it does help to visually organize code.
Comment 1 lilianne_blaze 2008-03-08 12:17:43 UTC
Trivial example:


  public void a()
  {
    // do something
    
    // do something
  }
  // end of a* 
  
  
  
  
  public void b2()
  {
    b2(0, 0);
  }
  public void b2(int param1, int param2)
  {
    // do something
    
    
    // do something
  }

Press alt+shift+f and you have:

  public void a()
  {
    // do something
    
    // do something
  }
  // end of a* 
  
  public void b2()
  {
    b2(0, 0);
  }

  public void b2(int param1, int param2)
  {
    // do something
    
    
    // do something
  }

Exactly one empty line between methods, visual grouping lost.