- Timestamp:
- 02/07/14 11:40:42 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/commands/CMDpseudomizeHTMLTextInputs.java
r1276 r1352 42 42 public void run(List<Object> parameters) { 43 43 String path; 44 boolean pseudomizeSearchInputs = false; 45 boolean pseudomizeFileInputs = false; 44 46 45 47 try { 46 48 path = (String) parameters.get(0); 49 50 for (int i = 1; i < parameters.size(); i++) { 51 if ("includeSearchInputs".equals(parameters.get(i))) { 52 pseudomizeSearchInputs = true; 53 } 54 else if ("includeFileInputs".equals(parameters.get(i))) { 55 pseudomizeFileInputs = true; 56 } 57 else { 58 throw new IllegalArgumentException("unknown parameter: " + parameters.get(i)); 59 } 60 } 47 61 } 48 62 catch (Exception e) { … … 56 70 } 57 71 58 pseudomizeTextInputsInDirectory(directory );72 pseudomizeTextInputsInDirectory(directory, pseudomizeSearchInputs, pseudomizeFileInputs); 59 73 60 74 } … … 67 81 * @param directory the directory to be treated next 68 82 */ 69 private void pseudomizeTextInputsInDirectory(File directory) { 83 private void pseudomizeTextInputsInDirectory(File directory, 84 boolean pseudomizeSearchInputs, 85 boolean pseudomizeFileInputs) 86 { 70 87 if (directory.isDirectory()) { 71 88 File[] children = directory.listFiles(); 72 89 73 90 for (File child : children) { 74 pseudomizeTextInputsInDirectory(child); 91 pseudomizeTextInputsInDirectory 92 (child, pseudomizeSearchInputs, pseudomizeFileInputs); 75 93 } 76 94 } 77 95 else if (directory.isFile()) { 78 HTMLLogTextInputPseudomizer pseudomizer = new HTMLLogTextInputPseudomizer(); 96 HTMLLogTextInputPseudomizer pseudomizer = 97 new HTMLLogTextInputPseudomizer(pseudomizeSearchInputs, pseudomizeFileInputs); 79 98 pseudomizer.pseudomizeFile(directory); 80 99 } … … 88 107 @Override 89 108 public String help() { 90 return "pseudomizeHTMLTextInputs <directory> ";109 return "pseudomizeHTMLTextInputs <directory> [includeFileInputs] [includeSearchInputs]"; 91 110 } 92 111
Note: See TracChangeset
for help on using the changeset viewer.