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 10583

Summary: Blank lines needlessly get indented
Product: editor Reporter: David Konecny <dkonecny>
Component: Formatting & IndentationAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: blocker CC: vnicolici
Priority: P4    
Version: 3.x   
Hardware: PC   
OS: Windows ME/2000   
Issue Type: ENHANCEMENT Exception Reporter:

Description David Konecny 2001-03-22 09:23:34 UTC
Blank lines needlessly get indented out to the level of the previous line 
indented. This makes the file larger.

Reported by:  Art Blake <ABlake@healthwatchonline.com>
Build: Netbeans 3.2 beta 9
Comment 1 Jan Chalupa 2001-05-05 21:54:22 UTC
Target milestone -> 3.3
Comment 2 David Konecny 2001-05-22 15:51:00 UTC
Changing the state of the issue to ASSIGNED, because it was cover in 
Requirements document at http://editor.netbeans.org/doc/Requirements.html
Comment 3 Jan Chalupa 2001-11-27 12:26:54 UTC
Target milestone -> 3.3.1.
Comment 4 Marek Grummich 2002-07-22 12:07:20 UTC
Set target milestone to TBD
Comment 5 Marek Grummich 2002-07-22 12:10:34 UTC
Set target milestone to TBD
Comment 6 Roman Strobl 2004-12-07 15:04:19 UTC
Changing subcomponent to formatting.
Comment 7 janicki 2007-09-25 22:19:03 UTC
It seems to me that blank lines need to be indented if you want to start typing something on a blank line.  I would be more annoyed if I had to press tab 
every time I wanted to type some code in a blank line.  (I.e., I like it the way it is.)  

Also, the size of the ".java" file doesn't impact the size of the ".class" file, does it?

Comment 8 Vitezslav Stejskal 2007-09-26 11:19:50 UTC
>> Also, the size of the ".java" file doesn't impact the size of the ".class" file, does it?

Well, of course it does! Otherwise it would be pointless to write code in java :-). But you are right that the amount of
whitespace in .java does not affect the size of bytecode in .class.

Also, please note that you can Source -> Remove Trailing Spaces in your source files.
Comment 9 tthompson 2010-09-23 13:13:23 UTC
I think when I voted for this years ago if you selected a block of code and hit ALT+TAB, it would also add a tab to blank lines.  This doesn't appear to be an issue any more.  I think even blank lines that are indented have the indentation removed when you save the file, at least with the Java editor.  In my opinion, this is how it should work.  Maybe it works differently with other file types?
Comment 10 Dusan Balek 2010-09-24 05:57:25 UTC
Already implemented via Remove Trailing Spaces functionality.