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 195053 - [70cat] Source Format of XML doesn't re-indent comments
Summary: [70cat] Source Format of XML doesn't re-indent comments
Status: RESOLVED DUPLICATE of bug 156217
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-03 21:59 UTC by esmithbss
Modified: 2011-10-21 11:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description esmithbss 2011-02-03 21:59:56 UTC
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.
Comment 1 Svata Dedic 2011-10-21 11:48:20 UTC

*** This bug has been marked as a duplicate of bug 156217 ***