Examples of NoIndentWriter


Examples of org.antlr.stringtemplate.NoIndentWriter

    }   
   
    public void renderOn(HtmlCanvas canvas) throws IOException {
        // provide the complete context variables map to the template
        template.setAttributes(canvas.getPageContext().attributes);
        template.write(new NoIndentWriter(canvas.getOutputWriter()));
    }
View Full Code Here

Examples of org.antlr.stringtemplate.NoIndentWriter

        setAttribute(viewName, viewState);
    }

    @Override
    public void write(Writer writer) throws IOException {
        NoIndentWriter templateWriter = new NoIndentWriter(writer);
        write(templateWriter);
    }
View Full Code Here

Examples of org.antlr.stringtemplate.NoIndentWriter

        }

        final File file = new File(folder, context.getJavaName() + ".java");

        try (OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(file), Charsets.UTF_8)) {
            template.write(new NoIndentWriter(osw));
            osw.flush();
        }
    }
View Full Code Here

Examples of org.antlr.stringtemplate.NoIndentWriter

    }

    public String getRemoteModelName(StringTemplateGroup group, Message message) throws IOException
    {
        StringWriter writer = new StringWriter(16);
        NoIndentWriter out = new NoIndentWriter(writer);

        StringTemplate messageBlock = group.getInstanceOf("remote_model_name");
        messageBlock.setAttribute("message", message);
        messageBlock.setAttribute("name", message.getName());
        messageBlock.write(out);
View Full Code Here

Examples of org.antlr.stringtemplate.NoIndentWriter

    }

    public String getRemoteModelSchemaName(StringTemplateGroup group, Message message) throws IOException
    {
        StringWriter writer = new StringWriter(16);
        NoIndentWriter out = new NoIndentWriter(writer);

        StringTemplate messageBlock = group.getInstanceOf("remote_model_schema_name");
        messageBlock.setAttribute("message", message);
        messageBlock.setAttribute("name", message.getName());
        messageBlock.write(out);
View Full Code Here

Examples of org.antlr.stringtemplate.NoIndentWriter

    }

    public static String extendBy(StringTemplateGroup group, Message extend, Message by) throws IOException
    {
        StringWriter stringer = new StringWriter(16);
        NoIndentWriter out = new NoIndentWriter(stringer);

        StringTemplate messageBlock = group.getInstanceOf("extend_by");
        messageBlock.setAttribute("message", extend);
        messageBlock.setAttribute("by", by);
        messageBlock.write(out);
View Full Code Here

Examples of org.stringtemplate.v4.NoIndentWriter

    writeFile(tmpdir, "t.stg", templates);
    STGroup group = new STGroupFile(tmpdir+"/"+"t.stg");
    ST st = group.getInstanceOf("main");
    StringWriter sw = new StringWriter();
    NoIndentWriter w = new NoIndentWriter(sw);
    st.write(w);
    String result = sw.toString();
    String expected =
      "abc" + newline +
      "abc" + newline +
View Full Code Here

Examples of org.stringtemplate.v4.NoIndentWriter

        ST template = new ST(text, delimiterStart, delimiterStop);
        for (Map.Entry<String, Object> entry : variableMap.entrySet()) {
            template.add(entry.getKey(), entry.getValue());
        }
        log.debug("StringTemplate is writing using attributes: {}", variableMap);
        template.write(new NoIndentWriter(buffer));

        // now lets output the results to the exchange
        Message out = exchange.getOut();
        out.setBody(buffer.toString());
        out.setHeaders(exchange.getIn().getHeaders());
View Full Code Here

Examples of org.stringtemplate.v4.NoIndentWriter

        ST template = new ST(text, delimiterStart, delimiterStop);
        for (Map.Entry<String, Object> entry : variableMap.entrySet()) {
            template.add(entry.getKey(), entry.getValue());
        }
        log.debug("StringTemplate is writing using attributes: {}", variableMap);
        template.write(new NoIndentWriter(buffer));

        // now lets output the results to the exchange
        Message out = exchange.getOut();
        out.setBody(buffer.toString());
        out.setHeaders(exchange.getIn().getHeaders());
View Full Code Here

Examples of org.stringtemplate.v4.NoIndentWriter

        ST template = new ST(text);
        for (Map.Entry<String, Object> entry : variableMap.entrySet()) {
            template.add(entry.getKey(), entry.getValue());
        }
        log.debug("StringTemplate is writing using attributes: {}", variableMap);
        template.write(new NoIndentWriter(buffer));

        // now lets output the results to the exchange
        Message out = exchange.getOut();
        out.setBody(buffer.toString());
        out.setHeaders(exchange.getIn().getHeaders());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.