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.
Product Version = NetBeans IDE 8.1 (Build 201510222201) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.8.0_66 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.66-b17 Reproducibility: Happens every time STEPS: * enable Spring MVC supoort * Open Spring application context XML file * click "shift+alt+f" to format ACTUAL: nothing happens EXPECTED: Spring XML should be formatted per editor configuration in ID
Created attachment 157939 [details] IDE log
Correction: this does NOT happen all the time, only sometimes. I can't yet see what scenario would trigger the problem. Thanks.
update: This is always reproducible - the Maven settings.xml in the .m2 directory, which shows up in a all Maven project together with the pom.xml. The format never happens for the settings.xml although the content can be edited.
Works fine for me. The only case when it does not work is when the XML has only root element (attributes of such elements are not formatted).
Created attachment 162671 [details] minimal sample demonstrating failing formatting with a blank line in the comment
Created attachment 162672 [details] minimal sample demonstrating working formatting with no blank line in the comment I found this bug when I had similar behaviour with an XML-file (in my case a maven pom.xml. Other pom files still formatted fine, so I did a bit of comparison and trimming down. My guess is that all occurrences will have a multi-line comment with a blank line in the XML file. That at least triggered the not-formatting-issue in my case (and could be resolved by simply removing the blank separator line in the multiline comment. Attached minimal samples for a working and not working case that demonstrate that the only difference between them is a blank line in the line comment. Both have wrong indentation for the child element. On the formattingfails.xml the code formatting (Alt-Shift-F) does not re-indent. On the formattingworks.xml it properly re-indents.