Package org.antlr.stringtemplate

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


        setAttribute(viewName, viewState);
    }

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

        }

        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

    }

    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

    }

    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

    }

    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

TOP

Related Classes of org.antlr.stringtemplate.NoIndentWriter

Copyright © 2018 www.massapicom. 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.