I use the automatic Netbeans format (ctrl + alt + f). This is a very good feature!
But I am using StringBuffer.append () to create some xml. I am indenting the .append parameter to represent the node structure of my xml.
msg.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
msg.append( "<root>");
msg.append( "<subNode/>");
my problem: autoformat will move all my parameters to the same column.
msg.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
msg.append("<root>");
msg.append("<subNode/>");
My question is: how can I prevent autoformat from changing the code in the section of my file. I hope to find something similar to "editor-fold".
//<editor-noAutoFormatting>"
msg.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
msg.append( "<root>");
msg.append( "<subNode/>");
source
share