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 250179

Summary: Formatting class with static enum will add a blank line
Product: editor Reporter: NwDx
Component: Formatting & IndentationAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Windows 8 x64   
Issue Type: ENHANCEMENT Exception Reporter:

Description NwDx 2015-02-03 13:00:02 UTC
I think that Enum Types need an extra option in the dialog Tools-Editor-Formatting under "Java-> Blank Lines". If you use an Enum as an Inner static Type maybe you don't want that extra blank line:

Before formatting:


public class SomeFactory {

  public static enum Type {
    TXT, XML, DAT
  }




After formatting (with default behavior):

public class SomeFactory {

  public static enum Type {

    TXT, XML, DAT
  }

And a one-liner will be much better to read...