Changeset 2045 for trunk/autoquest-ui-core/src/main/java
- Timestamp:
- 10/20/15 10:14:57 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/autoquest/commands/usability/CMDevaluateUsability.java
r1146 r2045 43 43 @Override 44 44 public String help() { 45 return "evaluateUsability <tasktree> {< evaluationResult>}";45 return "evaluateUsability <tasktree> {<maxCount>} {<evaluationResult>}"; 46 46 } 47 47 … … 53 53 @Override 54 54 public void run(List<Object> parameters) { 55 String tasktreeName; 56 String evaluationResult; 55 String tasktreeName = null; 56 String evaluationResult = null; 57 int maxCount = Integer.MAX_VALUE; 57 58 try { 58 tasktreeName = (String) parameters.get(0); 59 if (parameters.size() > 1) { 60 evaluationResult = (String) parameters.get(1); 61 } 62 else { 63 evaluationResult = "usabilityEvaluationResult"; 59 for (Object parameter : parameters) { 60 if (tasktreeName == null) { 61 tasktreeName = (String) parameter; 62 } 63 else { 64 try { 65 maxCount = Integer.parseInt((String) parameter); 66 } 67 catch (Exception e) { 68 if (evaluationResult == null) { 69 evaluationResult = (String) parameter; 70 } 71 else { 72 throw new IllegalArgumentException("unrecognized Parameter"); 73 } 74 } 75 } 64 76 } 65 77 } 66 78 catch (Exception e) { 67 79 throw new IllegalArgumentException("must provide a task tree name"); 80 } 81 82 if (evaluationResult == null) { 83 evaluationResult = "usabilityEvaluationResult"; 68 84 } 69 85 … … 81 97 82 98 UsabilityEvaluationResult result = 83 new UsabilityEvaluationManager().evaluateUsability(taskTree );99 new UsabilityEvaluationManager().evaluateUsability(taskTree, maxCount); 84 100 85 101 if (GlobalDataContainer.getInstance().addData(evaluationResult, result)) {
Note: See TracChangeset
for help on using the changeset viewer.