Installs macros and scripts located in subdirectories.
(File f2, String dir)
| 1211 | |
| 1212 | /** Installs macros and scripts located in subdirectories. */ |
| 1213 | private static void installSubdirectorMacros(File f2, String dir) { |
| 1214 | if (dir.endsWith("Launchers")) return; |
| 1215 | String[] list = f2.list(); |
| 1216 | if (list==null) return; |
| 1217 | for (int i=0; i<list.length; i++) { |
| 1218 | String name = list[i]; |
| 1219 | boolean hasUnderscore = name.indexOf('_')>=0; |
| 1220 | if (validMacroName(name,hasUnderscore)) { |
| 1221 | if (macroFiles==null) macroFiles = new Vector(); |
| 1222 | macroFiles.addElement(dir+"/"+name); |
| 1223 | } |
| 1224 | } |
| 1225 | } |
| 1226 | |
| 1227 | private static boolean validMacroName(String name, boolean hasUnderscore) { |
| 1228 | return (hasUnderscore&&name.endsWith(".txt")) || name.endsWith(".ijm") |
no test coverage detected