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 Dev (Build 201102030000) Operating System = Windows XP version 5.1 running on x86 Java; VM; Vendor = 1.6.0_22 Runtime = Java HotSpot(TM) Client VM 17.1-b03 When reformatting XML code, if a comment is indented too far and the code is being reformatted to a lower indentation level (example :Default is 4 spaces, but user wants 2), the code is reformatted but the comments are not. To Reproduce: 1) Create an XML file with comments indented inline with the code -- Make sure you use tabs for indenting initially. (ex) <?xml version="1.0" encoding="UTF-8"?> <project name="RebuildDatabase" default="all" basedir="."> <!-- ================================================================= --> <!-- Include additional capabilities. --> <!-- ================================================================= --> <taskdef resource="net/sf/antcontrib/antcontrib.properties"> <classpath> <pathelement location="${common.upstream.jars}/ant-contrib/ant-contrib-1.0b3.jar"/> </classpath> </taskdef> </project> 2) Now change the indent size in the options for all files from the default of 4/8 to 2/2. 3) Format the code using the "Source=>Format" menu RESULT: The code is reformatted, but the comments are not.
*** This bug has been marked as a duplicate of bug 156217 ***