dirScan("");\r
String filename = null;\r
if (msaorinf.isEmpty()) {\r
- ui.println("No .inf nor .msa file found! Tool Halt!");\r
+ ui.println("No INF nor MSA file found!");\r
System.exit(0);\r
} else {\r
filename = ui.choose("Found .inf or .msa file in the module\nChoose one Please", msaorinf.toArray());\r
}\r
- ModuleReader mr = new ModuleReader(modulepath, this, db);\r
+ ModuleReader mr = new ModuleReader(modulepath, this, db, ui);\r
if (filename.contains(".inf")) {\r
mr.readInf(filename);\r
} else if (filename.contains(".msa")) {\r
new SourceFileReplacer(modulepath, this, db, ui).flush(); // some adding library actions are taken here,so it must be put before "MsaWriter"\r
\r
// show result\r
- if (ui.yesOrNo("Parse Module Information Complete . See details ?")) {\r
+ if (ui.yesOrNo("Parse of the Module Information has completed. View details?")) {\r
ui.println("\nModule Information : ");\r
ui.println("Entrypoint : " + entrypoint);\r
show(protocol, "Protocol : ");\r
\r
ui.println("Errors Left : " + db.error);\r
ui.println("Complete!");\r
- ui.println("Your R9 module is placed at " + modulepath + File.separator + "result");\r
- ui.println("Your logfile is placed at " + modulepath);\r
+ ui.println("Your R9 module was placed here: " + modulepath + File.separator + "result");\r
+ ui.println("Your logfile was placed here: " + modulepath);\r
}\r
\r
private void show(Set<String> hash, String show) {\r
ui.println(show + hash.size());\r
ui.println(hash);\r
}\r
-\r
- public void ensureDir(String objFileWhole) {\r
- Pattern ptnseparate = Pattern.compile("(.*)\\\\[^\\\\]*");\r
- Matcher mtrseparate;\r
- File tempdir;\r
-\r
- mtrseparate = ptnseparate.matcher(objFileWhole);\r
- if (mtrseparate.find()) {\r
- tempdir = new File(mtrseparate.group(1));\r
- if (!tempdir.exists()) tempdir.mkdirs();\r
- }\r
- \r
- }\r
\r
// add '//' to all non-local include lines\r
private void CommentOutNonLocalHFile() throws IOException {\r
while ( ii.hasNext() ) {\r
curFile = ii.next();\r
rd = new BufferedReader(new FileReader(modulepath + File.separator + curFile));\r
- ensureDir(modulepath + File.separator + "temp" + File.separator + curFile);\r
+ Common.ensureDir(modulepath + File.separator + "temp" + File.separator + curFile);\r
outfile = new PrintWriter(new BufferedWriter(new FileWriter(modulepath + File.separator + "temp" + File.separator + curFile)));\r
while ((line = rd.readLine()) != null) {\r
if (line.contains("#include")) {\r