From 564e09ff14fc50012da10aa2b46a89dce3290a7d Mon Sep 17 00:00:00 2001 From: Kevin Glynn Date: Tue, 4 Jan 2011 14:18:51 +0100 Subject: [PATCH] write output files, don't miss out typereptemplate upgrade for interfaces and children --- CSharpTranslator/antlr3/UpdateTxFiles/Main.cs | 16 ++++++++-------- .../UpdateTxFiles/UpdateTranslationTemplate.cs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CSharpTranslator/antlr3/UpdateTxFiles/Main.cs b/CSharpTranslator/antlr3/UpdateTxFiles/Main.cs index 5f767c4..486e477 100644 --- a/CSharpTranslator/antlr3/UpdateTxFiles/Main.cs +++ b/CSharpTranslator/antlr3/UpdateTxFiles/Main.cs @@ -75,14 +75,14 @@ namespace UpdateTxFiles String xmlFDir = Path.GetDirectoryName(xmlFName); Console.WriteLine (xmlFName + ": " + de.Value.Java); -// if (!Directory.Exists(xmlFDir)) -// { -// Directory.CreateDirectory(xmlFDir); -// } -// XmlSerializer s = new XmlSerializer(txTemplate.GetType()); -// TextWriter w = new StreamWriter(xmlFName); -// s.Serialize(w, txTemplate); -// w.Close(); + if (!Directory.Exists(xmlFDir)) + { + Directory.CreateDirectory(xmlFDir); + } + XmlSerializer s = new XmlSerializer(txTemplate.GetType()); + TextWriter w = new StreamWriter(xmlFName); + s.Serialize(w, txTemplate); + w.Close(); } } else diff --git a/CSharpTranslator/antlr3/UpdateTxFiles/UpdateTranslationTemplate.cs b/CSharpTranslator/antlr3/UpdateTxFiles/UpdateTranslationTemplate.cs index f39385c..4618af9 100644 --- a/CSharpTranslator/antlr3/UpdateTxFiles/UpdateTranslationTemplate.cs +++ b/CSharpTranslator/antlr3/UpdateTxFiles/UpdateTranslationTemplate.cs @@ -106,7 +106,7 @@ namespace UpdateTxFiles public void upgrade(OldTSpace.TypeRepTemplate inV, NewTSpace.InterfaceRepTemplate outV) { - upgrade(inV as OldTSpace.TranslationBase, outV as NewTSpace.TranslationBase); + upgrade(inV as OldTSpace.TypeRepTemplate, outV as NewTSpace.TypeRepTemplate); outV.Inherits = inV.Inherits; if (!String.IsNullOrEmpty(inV.Java))