diff -r e2f24eea8543 -r 2bba68ef47c1 java/sql-dk/src/info/globalcode/sql/dk/formatting/AbstractXmlFormatter.java --- a/java/sql-dk/src/info/globalcode/sql/dk/formatting/AbstractXmlFormatter.java Sat Aug 15 10:20:39 2015 +0200 +++ b/java/sql-dk/src/info/globalcode/sql/dk/formatting/AbstractXmlFormatter.java Sat Aug 15 10:34:18 2015 +0200 @@ -47,17 +47,14 @@ * * @author Ing. František Kučera (frantovo.cz) */ -@PropertyDeclaration(name = COLORFUL, type = Boolean.class, description = COLORFUL_DESCRIPTION) -@PropertyDeclaration(name = AbstractXmlFormatter.PROPERTY_INDENT, type = String.class, description = "tab or sequence of spaces used for indentation of nested elements") -@PropertyDeclaration(name = AbstractXmlFormatter.PROPERTY_INDENT_TEXT, type = Boolean.class, description = "whether to indent text nodes") +@PropertyDeclaration(name = COLORFUL, defaultValue = "false", type = Boolean.class, description = COLORFUL_DESCRIPTION) +@PropertyDeclaration(name = AbstractXmlFormatter.PROPERTY_INDENT, defaultValue = AbstractXmlFormatter.PROPERTY_INDENT_DEFAULT, type = String.class, description = "tab or sequence of spaces used for indentation of nested elements") +@PropertyDeclaration(name = AbstractXmlFormatter.PROPERTY_INDENT_TEXT, defaultValue = "true", type = Boolean.class, description = "whether text with line breaks should be indented; if not original whitespace will be preserved.") public abstract class AbstractXmlFormatter extends AbstractFormatter { private static final Logger log = Logger.getLogger(AbstractXmlFormatter.class.getName()); public static final String PROPERTY_INDENT = "indent"; - /** - * Whether text with line breaks should be indented (default). Otherwise original whitespace - * will be preserved. - */ + protected static final String PROPERTY_INDENT_DEFAULT = "\t"; public static final String PROPERTY_INDENT_TEXT = "indentText"; private static final TerminalColor ELEMENT_COLOR = TerminalColor.Magenta; private static final TerminalColor ATTRIBUTE_NAME_COLOR = TerminalColor.Green; @@ -73,7 +70,7 @@ super(formatterContext); boolean colorful = formatterContext.getProperties().getBoolean(COLORFUL, false); out = new ColorfulPrintWriter(formatterContext.getOutputStream(), false, colorful); - indent = formatterContext.getProperties().getString(PROPERTY_INDENT, "\t"); + indent = formatterContext.getProperties().getString(PROPERTY_INDENT, PROPERTY_INDENT_DEFAULT); indentText = formatterContext.getProperties().getBoolean(PROPERTY_INDENT_TEXT, true); if (!indent.matches("\\s*")) {