mil.dod.th.ose.sdk/src/mil/dod/th/ose/sdk/those/ProjectGenerator.java
private void generateFileFromTemplate(final String templateFileName, final ProjectProperties projectProps,
            final File projectDir, final String outFileName) throws IOException, TemplateException
    {
        // Get the template
        final Template template = m_TemplateConfig.getTemplate(templateFileName);

        // Generate the file based on the template and project properties
        final File outFile = m_FileService.getFile(projectDir, outFileName);
        final Writer outWriter = m_FileService.createFileWriter(outFile);
        final Map<String, Object> dataModel = projectProps.getProperties();
        m_OutStream.println("Generating file: " + outFile);
        template.process(dataModel, outWriter);
        outWriter.flush();
        outWriter.close();
    }
/**
     * Generates a project file from the given template.
     * 
     * @param templateFileName
     *            Template file name
     * @param projectProps
     *            Project properties containing variables used for replacement in the templates
     * @param projectDir
     *            Directory to create project file in
     * @param outFileName
     *            Filename to use for the created file
     * @throws IOException
     *             if there is a file I/O error
     * @throws TemplateException
     *             if there is an error processing the template
     */
Generates a project file from the given template.


Generates a project file from the given template .
private void generateFileFromTemplate(final String templateFileName, final ProjectProperties projectProps,
            final File projectDir, final String outFileName) throws IOException, TemplateException
    {
        final Template template = m_TemplateConfig.getTemplate(templateFileName);
        final File outFile = m_FileService.getFile(projectDir, outFileName);
        final Writer outWriter = m_FileService.createFileWriter(outFile);
        final Map<String, Object> dataModel = projectProps.getProperties();
        m_OutStream.println("Generating file: " + outFile);
        template.process(dataModel, outWriter);
        outWriter.flush();
        outWriter.close();
    }
private void generateFileFromTemplate ( final String templateFileName , final ProjectProperties projectProps , final File projectDir , final String outFileName ) throws IOException , TemplateException { final Template template = m_TemplateConfig . getTemplate ( templateFileName ) ; final File outFile = m_FileService . getFile ( projectDir , outFileName ) ; final Writer outWriter = m_FileService . createFileWriter ( outFile ) ; final Map < String , Object > dataModel = projectProps . getProperties ( ) ; m_OutStream . println ( "Generating file: " + outFile ) ; template . process ( dataModel , outWriter ) ; outWriter . flush ( ) ; outWriter . close ( ) ; }
Generates a project file from the given template.
Generates a project file from the given template .
// Get the template // Generate the file based on the template and project properties