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) throws IOException, TemplateException
    {
        // Determine the output file name
        final int ftlExtLength = ".ftl".length();
        String outFileName = templateFileName.substring(0, templateFileName.length() - ftlExtLength);
        if (outFileName.endsWith(".java"))
        {
            outFileName = convertTemplateNameToJavaName(outFileName, projectProps.getClassName(),
                    projectProps.getProjectType());
        }

        generateFileFromTemplate(templateFileName, projectProps, projectDir, outFileName);
    }
/**
     * 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
     * @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) throws IOException, TemplateException
    {
        final int ftlExtLength = ".ftl".length();
        String outFileName = templateFileName.substring(0, templateFileName.length() - ftlExtLength);
        if (outFileName.endsWith(".java"))
        {
            outFileName = convertTemplateNameToJavaName(outFileName, projectProps.getClassName(),
                    projectProps.getProjectType());
        }
        generateFileFromTemplate(templateFileName, projectProps, projectDir, outFileName);
    }
private void generateFileFromTemplate ( final String templateFileName , final ProjectProperties projectProps , final File projectDir ) throws IOException , TemplateException { final int ftlExtLength = ".ftl" . length ( ) ; String outFileName = templateFileName . substring ( 0 , templateFileName . length ( ) - ftlExtLength ) ; if ( outFileName . endsWith ( ".java" ) ) { outFileName = convertTemplateNameToJavaName ( outFileName , projectProps . getClassName ( ) , projectProps . getProjectType ( ) ) ; } generateFileFromTemplate ( templateFileName , projectProps , projectDir , outFileName ) ; }
Generates a project file from the given template.
Generates a project file from the given template .
// Determine the output file name