parser.parseOptionFile(conf);
Reader reader;
Writer writer;
GLConstantFixer fixer = new GLConstantFixer();
ArrayList<String> files = new ArrayList<String>(sourceMap.keySet());
Collections.sort(files); // Just to make sure we have the same order.. shouldn't matter on anything but lets be careful.
for (String file : files)
{
String text = sourceMap.get(file);
getLogger().debug("Processing file: " + file);
getLogger().debug("processing comments");
text = McpCleanup.stripComments(text);
getLogger().debug("fixing imports comments");
text = McpCleanup.fixImports(text);
getLogger().debug("various other cleanup");
text = McpCleanup.cleanup(text);
getLogger().debug("fixing OGL constants");
text = fixer.fixOGL(text);
getLogger().debug("formatting source");
reader = new StringReader(text);
writer = new StringWriter();
formatter.format(reader, writer);