Use new STGroup.GROUP_FILE_EXTENSION value
This commit is contained in:
parent
1411a561ab
commit
b822070790
|
@ -8,6 +8,7 @@ December 11, 2012
|
|||
* Fix template issues
|
||||
* GrammarASTWithOptions.getOptions never returns null
|
||||
* Use EnumSet instead of HashSet
|
||||
* Use new STGroup.GROUP_FILE_EXTENSION value
|
||||
|
||||
December 2, 2012
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>ST4</artifactId>
|
||||
<version>4.0.7-rc-1</version>
|
||||
<version>4.0.7-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -115,7 +115,7 @@ public class CodeGenerator {
|
|||
|
||||
public void loadTemplates(String language) {
|
||||
try {
|
||||
templates = new STGroupFile(TEMPLATE_ROOT+"/"+language+"/"+language+".stg");
|
||||
templates = new STGroupFile(TEMPLATE_ROOT+"/"+language+"/"+language+STGroup.GROUP_FILE_EXTENSION);
|
||||
templates.registerRenderer(Integer.class, new NumberRenderer());
|
||||
templates.registerRenderer(String.class, new StringRenderer());
|
||||
templates.setListener(new STErrorListener() {
|
||||
|
|
|
@ -270,7 +270,7 @@ public class ErrorManager {
|
|||
*/
|
||||
public void setFormat(String formatName) {
|
||||
this.formatName = formatName;
|
||||
String fileName = FORMATS_DIR +formatName+".stg";
|
||||
String fileName = FORMATS_DIR +formatName+STGroup.GROUP_FILE_EXTENSION;
|
||||
ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
URL url = cl.getResource(fileName);
|
||||
if ( url==null ) {
|
||||
|
|
Loading…
Reference in New Issue