- String[] list = new File(modulepath).list();\r
- boolean hasInf = false;\r
- String infname = null;\r
- boolean hasMsa = false;\r
- String msaname = null;\r
- \r
- for (int i = 0 ; i < list.length ; i++) {\r
- if (new File(list[i]).isDirectory()) {\r
- ;\r
- } else {\r
- if (list[i].contains(".c") || list[i].contains(".C")) {\r
- localmodulesources.add(list[i]);\r
- } else if (list[i].contains(".h") || list[i].contains(".H")) {\r
- localmodulesources.add(list[i]); //the case that several .inf or .msa found is not concerned\r
- } else if (list[i].contains(".dxs")) {\r
- localmodulesources.add(list[i]);\r
- } else if (list[i].contains(".uni")) {\r
- localmodulesources.add(list[i]);\r
- } else if (list[i].contains(".inf")) {\r
- if (ui.yesOrNo("Found .inf file : " + list[i] + "\nDo you want to use this file as this module's .inf?")) {\r
- hasInf = true;\r
- infname = list[i];\r
- } else {\r
- continue;\r
- }\r
- } else if (list[i].contains(".msa")) {\r
- if (ui.yesOrNo("Found .msa file : " + list[i] + "\nDo you want to use this file as this module's .msa?")) {\r
- hasMsa = true;\r
- msaname = list[i];\r
- } else {\r
- continue;\r
- }\r
- }\r
- }\r
- }\r
+ Common.toDoAll(modulepath, ModuleInfo.class.getMethod("enroll", String.class), this, null, Common.FILE);\r