Formatted code
Applied minor refactoring
Added setLocationMap()
Renamed TextResourceGenerator to ResourceGenerator to be consistent with
the naming convention for the other Generator classes (the generated
class is called XYZResource and not XYZTextResource)