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.
Test: http://services.netbeans.org/synergy/client/app/#/assignment/1397/v/1 Having this code: public class EmptyLines { int i; int j; 1. From formatting -> blank lines options set the minimum number of blank line before field to 3 2. Hit ALT + SHIFT + F to format the code The actual result is this: public class EmptyLines { int i; int j; Expected result: A minimum of 3 Blank lines were added also before int i; field.
Build: 201508230002 The actual behaviour now is public class EmptyLines { int i; int j; while it should be public class EmptyLines { int i; int j;
reproducible
Issue is reproducible. Product Version: NetBeans IDE Dev (Build 201508310002) Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23 Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
This is as designed behaviour. The number of blank lines before the first class member is given by the 'Minimum Blank Lines After Class Header' option. Similarly, the number of blank lines after the last class member is given by the 'Minimum Blank Lines Before Class Closing Brace' option.
As you wrote it is MINIMUM number of blank lines. The value '3' set for minimum number of blank lines before field does also fit to minimum number of blank lines after class header = '1'. 1 would be minimum and the maximum is not defined.