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.
Reformat on save does not fix invalid indentation in following case: 1) turn on Reformat modified lines on save 2) have a code: public static void main(String[] args) { MyList<String> c = new MyList<String>(); c.add("aaaa"); System.out.println(""); } 3) put caret on the begging of the text on line 'c.add' 4) press backspace several times 5) save the file -> the line is not move to correct indentation level and stays as it is (does not matter if you move cursor to another line before saving) Interesting is that if the line is moved to invalid position by space the reformat works fine Product Version: NetBeans IDE 7.3 RC2 (Build 201302050851) Java: 1.7.0_13; Java HotSpot(TM) 64-Bit Server VM 23.7-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_13-b20 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb) User directory: C:\Users\jprox\AppData\Roaming\NetBeans\7.3rc2 Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\7.3rc2
The problem seems to be that REMOVE document events don't mark given lines as modified (only INSERT document events do so).
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss