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.
Very often, people use formatting to fix indentation, because everyone has different indentation settings, which leads to total chaos in tabs/spaces mixture. However, formatter sometimes breaks hand-made formatting which fits the given code better - e.g. inline get/setters, space-aligned anonymous inner classes, etc. My suggestion is: Add a "Format indentation" which would _only_ reformat the leading spaces and tabs, taking the level of current structure depth into account. E.g.: class Hello { public String getNote() { return note; } public void setNote( String note ) { this.note = note; } } would become class Hello { public String getNote() { return note; } public void setNote( String note ) { this.note = note; } } and NOT class Hello { public String getNote() { return note; } public void setNote( String note ) { this.note = note; } } Thanks for considering.
Just found that in Options > Editor > Code Templates, there's "On Template Expansion: Reindent Text", so perhaps there's already some code regarding re-indentation (if it's not simply "add as the same whitespace string to each line of the macro as is on the previous line" algorithm).
Fixed in jet-main. Indent action added (without any shortcut initially assigned). http://hg.netbeans.org/jet-main/rev/84747192f415