Projects/Tools/CSProjectGenerator/src/com/chilliworks/chillisource/csprojectgenerator/CSProjectGenerator.java
/**
	 * Updates the contents of the files at the given file paths to the project 
	 * and package name given in the options.
	 * 
	 * @author Ian Copland
	 *
	 * @param in_options - The options with which to create the new project.
	 * @param in_filePaths - The array of file paths that should have their
	 * contents updated.
	 */
Updates the contents of the files at the given file paths to the project
and package name given in the options.

@author Ian Copland

@param in_options - The options with which to create the new project.
@param in_filePaths - The array of file paths that should have their
contents updated.
Updates the contents of the files at the given file paths to the project and package name given in the options . @author Ian Copland @param in_options - The options with which to create the new project . @param in_filePaths - The array of file paths that should have their contents updated .
private static void updateFileContents(Options in_options, String[] in_filePaths)
	{
		String tempDirectoryPath = StringUtils.standardiseDirectoryPath(in_options.m_outputDirectory + k_tempDirectory);
		String tempProjectDirectory = StringUtils.standardiseDirectoryPath(tempDirectoryPath + k_templateProjectName);
		for (String filePath : in_filePaths)
		{
			Logging.logVerbose("Updating file contents: " + filePath);
			String fullFilePath = StringUtils.standardiseFilePath(tempProjectDirectory + filePath);
			String fileContents = FileUtils.readFile(fullFilePath);
			if (fileContents == null || fileContents.length() == 0)
			{
				cleanupTemp(in_options);
				Logging.logFatal("Could not read file: " + filePath);
			}
			fileContents = fileContents.replace(k_templatePackageName, in_options.m_packageName);
			fileContents = fileContents.replace(k_templateProjectName.toLowerCase(), in_options.m_projectName.toLowerCase());
			fileContents = fileContents.replace(k_templateProjectName, in_options.m_projectName);
			if (FileUtils.writeFile(fullFilePath, fileContents) == false)
			{
				cleanupTemp(in_options);
				Logging.logFatal("Could not write file: " + filePath);
			}
		}
	}
private static void updateFileContents ( Options in_options , String [ ] in_filePaths ) { String tempDirectoryPath = StringUtils . standardiseDirectoryPath ( in_options . m_outputDirectory + k_tempDirectory ) ; String tempProjectDirectory = StringUtils . standardiseDirectoryPath ( tempDirectoryPath + k_templateProjectName ) ; for ( String filePath : in_filePaths ) { Logging . logVerbose ( "Updating file contents: " + filePath ) ; String fullFilePath = StringUtils . standardiseFilePath ( tempProjectDirectory + filePath ) ; String fileContents = FileUtils . readFile ( fullFilePath ) ; if ( fileContents == null || fileContents . length ( ) == 0 ) { cleanupTemp ( in_options ) ; Logging . logFatal ( "Could not read file: " + filePath ) ; } fileContents = fileContents . replace ( k_templatePackageName , in_options . m_packageName ) ; fileContents = fileContents . replace ( k_templateProjectName . toLowerCase ( ) , in_options . m_projectName . toLowerCase ( ) ) ; fileContents = fileContents . replace ( k_templateProjectName , in_options . m_projectName ) ; if ( FileUtils . writeFile ( fullFilePath , fileContents ) == false ) { cleanupTemp ( in_options ) ; Logging . logFatal ( "Could not write file: " + filePath ) ; } } }
Updates the contents of the files at the given file paths to the project
 and package name given in the options.
Updates the contents of the files at the given file paths to the project and package name given in the options .