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 180123 - xml format option doesn't generate new lines
Summary: xml format option doesn't generate new lines
Status: RESOLVED WORKSFORME
Alias: None
Product: xml
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: PC All
: P3 normal with 2 votes (vote)
Assignee: _ alexpetrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-01 15:37 UTC by franci
Modified: 2010-05-14 18:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot-XML_before_format.png (65.33 KB, image/png)
2010-05-14 13:50 UTC, _ alexpetrov
Details
screenshot-XML_after_format.png (57.44 KB, image/png)
2010-05-14 13:50 UTC, _ alexpetrov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description franci 2010-02-01 15:37:35 UTC
in version 6.7.1 and older, the option format generates new lines, so the following xml text

<?xml version="1.0" encoding="UTF-8"?>
<root><a><b><c value="1"/><d value="2"/></b></a></root>

becomes this one

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <a>
        <b>
            <c value="1"/>
            <d value="2"/>
        </b>
    </a>
</root>

but int 6.8 this option does format but without generaing new lines, so the text becomes this other

<?xml version="1.0" encoding="UTF-8"?>
<root><a><b><c value="1"/><d value="2"/></b></a></root>

so it can't be used as xml indentation tool as I used to.

I don't know if this is a bug or a feature, but at least there should be an option to decide if new lines should be added or not.
Comment 1 _ alexpetrov 2010-05-14 13:49:24 UTC
I'm not able to reproduce this bug on:
Product Version: NetBeans IDE Dev (Build 201005122200)
Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16
System: Linux version 2.6.18-8.el5 running on i386

I've performed all steps from this bug description and got the correct result (see the attached screen shots "screenshot-XML_before_format.png" and "screenshot-XML_after_format.png").
Comment 2 _ alexpetrov 2010-05-14 13:50:06 UTC
Created attachment 99009 [details]
screenshot-XML_before_format.png
Comment 3 _ alexpetrov 2010-05-14 13:50:38 UTC
Created attachment 99010 [details]
screenshot-XML_after_format.png
Comment 4 franci 2010-05-14 18:03:35 UTC
this bug was fixed many builds ago, I think it was fixed in early builds of 6.9