} 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
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