Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365360 - Code formatting of ant xml files doesn't respect CDATA elements that contain tags (xml, html, etc)
Summary: Code formatting of ant xml files doesn't respect CDATA elements that contain ...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.7.1   Edit
Hardware: Macintosh Mac OS X
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-01 15:14 EST by Beau Scott CLA
Modified: 2019-11-14 03:09 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Beau Scott CLA 2011-12-01 15:14:31 EST
-- Configuration Details --
Product: Eclipse 1.4.1.20110909-0613 (org.eclipse.epp.package.java.product)
Installed Features:
 org.eclipse.platform 3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK

When formatting an ant file that contains a CDATA section with XML-style tags, the formatter over outdents subsequent nodes.

Sample build.xml (before formatting [and formatted as it *should* appear after formatting):
------------------
@ 
<?xml version="1.0" encoding="UTF-8"?>
<project name="myproject">
  <target name="main">
    <echo>
      <![CDATA[<tag>Some Nested XML</tag>]]>
    </echo>
    <echo>I should be parallel with the other echo tag above</echo>
  </target>
</project>
@
------------------

File *after* formatting:
------------------
@
<?xml version="1.0" encoding="UTF-8"?>
<project name="myproject">
  <target name="main">
    <echo>
      <![CDATA[<tag>Some Nested XML</tag>]]>
    </echo>
  <echo>I should be parallel with the other echo tag above</echo>
</target>
</project>
@ 
------------------

Notice the second echo tag is outdented one level more than it should be, as is the rest of the document.
Comment 1 Lars Vogel CLA 2019-11-14 03:09:18 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.