X-Git-Url: http://plrg.eecs.uci.edu/git/?p=cdsspec-compiler.git;a=blobdiff_plain;f=src%2Fedu%2Fuci%2Feecs%2FspecCompiler%2FspecExtraction%2FParserUtils.java;h=201bb8c5829bbc43d553cb414c886583d43a15b4;hp=c80ce51dcfe844b3016b3e5aade8080089b1cc4f;hb=b870b2732f7a88f0804510bd5c88d0b5d6d4ddd3;hpb=d6df0bb6bee6a71ea185b4dffbf52bb7f1fff551 diff --git a/src/edu/uci/eecs/specCompiler/specExtraction/ParserUtils.java b/src/edu/uci/eecs/specCompiler/specExtraction/ParserUtils.java index c80ce51..201bb8c 100644 --- a/src/edu/uci/eecs/specCompiler/specExtraction/ParserUtils.java +++ b/src/edu/uci/eecs/specCompiler/specExtraction/ParserUtils.java @@ -57,12 +57,14 @@ public class ParserUtils { } catch (ParseException e) { e.printStackTrace(); } - + return templateStr; } - + public static void write2File(File file, ArrayList 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()) {