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 188422 - XMLModel.removeChildNodes does not fix up whitespace
Summary: XMLModel.removeChildNodes does not fix up whitespace
Status: RESOLVED WONTFIX
Alias: None
Product: xml
Classification: Unclassified
Component: XDM (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-06 20:56 UTC by Jesse Glick
Modified: 2015-09-17 13:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Suggested impl assuming plain old DOM (2.41 KB, application/x-)
2010-07-06 20:56 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2010-07-06 20:56:10 UTC
Created attachment 100631 [details]
Suggested impl assuming plain old DOM

Assume an XDMModel on which has been called setPretty(true) and setIndentation("    "). If you start with

<root/>

and use insertBefore to add a child, it is correctly rendered as

<root>
    <child/>
</root>

But if you now call removeChildNodes to delete that child, you get

<root>
    <!--(end of line)-->
</root>

rather than

<root/>

again as expected. These should be inverse operations.
Comment 1 Sergey Lunegov 2010-07-07 08:39:58 UTC
Nikita, please take a look.
Comment 2 Martin Balin 2015-09-17 13:16:55 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.