Changeset 1158 for trunk/autoquest-core-usability-evaluation/src/main/java
- Timestamp:
- 04/19/13 19:28:32 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/CMDperformUsabilityEvaluation.java
r1152 r1158 36 36 public class CMDperformUsabilityEvaluation implements Command { 37 37 38 private final int task TreeParamaterIndex = 0;38 private final int taskModelParamaterIndex = 0; 39 39 40 40 private final int evaluationResultParameterIndex = 1; … … 49 49 @Override 50 50 public void run(List<Object> parameters) { 51 String nameOfTask Tree = getTaskTreeParameter(parameters);52 Optional<ITaskModel> taskModel = getTaskModelFromDataContainer(nameOfTask Tree);51 String nameOfTaskModel = getTaskModelParameter(parameters); 52 Optional<ITaskModel> taskModel = getTaskModelFromDataContainer(nameOfTaskModel); 53 53 if (taskModel.isPresent()) { 54 54 UsabilityRuleset ruleset = getUsabilityRuleset(); … … 68 68 * @return 69 69 */ 70 private String getTask TreeParameter(List<Object> parameters) {70 private String getTaskModelParameter(List<Object> parameters) { 71 71 try { 72 return (String) parameters.get(task TreeParamaterIndex);72 return (String) parameters.get(taskModelParamaterIndex); 73 73 } catch (Exception e) { 74 throw new IllegalArgumentException("must provide a task treename");74 throw new IllegalArgumentException("must provide a task model name"); 75 75 } 76 76 } … … 96 96 * </p> 97 97 * 98 * @param nameOfTask Tree98 * @param nameOfTaskModel 99 99 * @return 100 100 */ 101 private Optional<ITaskModel> getTaskModelFromDataContainer(String nameOfTask Tree) {102 Object dataObject = GlobalDataContainer.getInstance().getData(nameOfTask Tree);101 private Optional<ITaskModel> getTaskModelFromDataContainer(String nameOfTaskModel) { 102 Object dataObject = GlobalDataContainer.getInstance().getData(nameOfTaskModel); 103 103 if(dataObject != null) { 104 104 if(dataObject instanceof ITaskModel) { 105 ITaskModel task Tree= (ITaskModel) dataObject;106 return Optional.of(task Tree);105 ITaskModel taskModel = (ITaskModel) dataObject; 106 return Optional.of(taskModel); 107 107 } else { 108 CommandHelpers.objectNotType(nameOfTask Tree, "ITaskModel");108 CommandHelpers.objectNotType(nameOfTaskModel, "ITaskModel"); 109 109 return Optional.absent(); 110 110 } 111 111 } 112 CommandHelpers.objectNotFoundMessage(nameOfTask Tree);112 CommandHelpers.objectNotFoundMessage(nameOfTaskModel); 113 113 return Optional.absent(); 114 114 } … … 145 145 @Override 146 146 public String help() { 147 return "peformUsabilityEvaluation <task Tree> {evaluationResult}";147 return "peformUsabilityEvaluation <taskModel> {evaluationResult}"; 148 148 } 149 149
Note: See TracChangeset
for help on using the changeset viewer.