In Eclipse (Helios) I have this XML source file:
<?xml version="1.0" encoding="utf-8"?>
<!--
I wanted to
===========
save this format of the comments.
-->
<x>
</x>
On formatting the file (Ctrl+Shift+F) I got the comment reformatted.
<?xml version="1.0" encoding="utf-8"?>
<!-- I wanted to =========== save this format of the comments. -->
<x>
</x>
Is there an option to switch off pretty-printing comment sections?
I'm using Eclipse 3.6.0.
In Windows > Preferences > XML > XML Files > Editor:
Uncheck the Join lines option.
You can select only part of your XML file for formatting and leave out the comment part.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With