more
[cdsspec-compiler.git] / src / edu / uci / eecs / specCompiler / specExtraction / ParserUtils.java
index c80ce51dcfe844b3016b3e5aade8080089b1cc4f..201bb8c5829bbc43d553cb414c886583d43a15b4 100644 (file)
@@ -57,12 +57,14 @@ public class ParserUtils {
                } catch (ParseException e) {
                        e.printStackTrace();
                }
                } catch (ParseException e) {
                        e.printStackTrace();
                }
-               
+
                return templateStr;
        }
                return templateStr;
        }
-       
+
        public static void write2File(File file, ArrayList<String> content) {
        public static void write2File(File file, ArrayList<String> content) {
-               String newFileName = Environment.GENERATED_FILE_DIR + "/" + file.getName();
+               String newFileName = Environment.GENERATED_FILE_DIR + "/"
+                               + file.getParentFile().getName() + "/" + file.getName();
+
                File newFile = new File(newFileName);
                newFile.getParentFile().mkdirs();
                if (!newFile.exists()) {
                File newFile = new File(newFileName);
                newFile.getParentFile().mkdirs();
                if (!newFile.exists()) {