public void generateCode(Appendable out, AlertSink alertSink) throws IOException {
alertSink.addAll(tree.getAlerts());
MessageBundle messageBundle = Util.bundleMessages(alertSink, tree.getMessages());
XmbBundleWriter bundleWriter = new XmbBundleWriter(messageBundle);
bundleWriter.write(XML_ASCII_ESCAPER.escape(out));
}