- Timestamp:
- 04/07/13 21:45:15 (12 years ago)
- Location:
- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability
- Files:
-
- 16 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/UsabilityEvaluator.java
r1138 r1150 63 63 public UsabilityResult using(UsabilityRuleset ruleset) { 64 64 Console.traceln(Level.INFO, "evaluating usability of task tree " + this.taskTree); 65 EvaluationMethodCaller evaluationMethodCaller = new EvaluationMethodCaller(); 65 66 UsabilityResult result = new UsabilityResult(); 66 67 for(UsabilityRule rule : ruleset.evaluationRules()) { 67 Optional<UsabilityDefect> defect = rule.c heck();68 Optional<UsabilityDefect> defect = rule.callEvaluationMethod(evaluationMethodCaller); 68 69 if(defect.isPresent()) { 69 70 result.addDefect(defect.get()); -
trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityMetric.java
r1138 r1150 15 15 package de.ugoe.cs.autoquest.usability.rules; 16 16 17 import com.google.common.base.Optional; 18 19 import de.ugoe.cs.autoquest.usability.result.UsabilityDefect; 20 17 21 /** 18 22 * <p> … … 23 27 */ 24 28 public interface UsabilityMetric { 29 30 public Optional<UsabilityDefect> calculate(); 25 31 26 32 } -
trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityRule.java
r1138 r1150 18 18 19 19 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 20 import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller; 20 21 import de.ugoe.cs.autoquest.usability.result.UsabilityDefect; 21 22 … … 45 46 } 46 47 47 public abstract Optional<UsabilityDefect> c heck();48 public abstract Optional<UsabilityDefect> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller); 48 49 49 50 } -
trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/NoLetterOrDigitRatioMetric.java
r1139 r1150 27 27 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 28 28 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 29 import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller; 29 30 import de.ugoe.cs.autoquest.usability.result.DefectDescriptionResolver; 30 31 import de.ugoe.cs.autoquest.usability.result.UsabilityDefect; … … 61 62 */ 62 63 @Override 63 public Optional<UsabilityDefect> c heck() {64 public Optional<UsabilityDefect> calculate() { 64 65 FilterResult textInputEvents = extractNodesFromTaskTree(); 65 66 float evaluationMetric = calculateEvaluationMetric(textInputEvents.nodesMatchedFilter()); … … 88 89 } 89 90 91 /* (non-Javadoc) 92 * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRule#callEvaluationMetho(de.ugoe.cs.autoquest.usability.EvaluationMethodCaller) 93 */ 94 @Override 95 public Optional<UsabilityDefect> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller) 96 { 97 return evaluationMethodCaller.check(this); 98 } 99 90 100 } -
trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputEntryRepetitionsMetric.java
r1139 r1150 27 27 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 28 28 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 29 import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller; 29 30 import de.ugoe.cs.autoquest.usability.result.DefectDescriptionResolver; 30 31 import de.ugoe.cs.autoquest.usability.result.UsabilityDefect; … … 61 62 */ 62 63 @Override 63 public Optional<UsabilityDefect> c heck() {64 public Optional<UsabilityDefect> calculate() { 64 65 FilterResult textInputEvents = extractNodesFromTaskTree(); 65 66 float evaluationMetric = calculateEvaluationMetric(textInputEvents.nodesMatchedFilter()); … … 103 104 } 104 105 106 /* (non-Javadoc) 107 * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRule#callEvaluationMetho(de.ugoe.cs.autoquest.usability.EvaluationMethodCaller) 108 */ 109 @Override 110 public Optional<UsabilityDefect> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller) 111 { 112 return evaluationMethodCaller.check(this); 113 } 114 105 115 } -
trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputRatioMetric.java
r1139 r1150 25 25 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 26 26 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 27 import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller; 27 28 import de.ugoe.cs.autoquest.usability.result.DefectDescriptionResolver; 28 29 import de.ugoe.cs.autoquest.usability.result.UsabilityDefect; … … 59 60 */ 60 61 @Override 61 public Optional<UsabilityDefect> c heck() {62 public Optional<UsabilityDefect> calculate() { 62 63 FilterResult textInputEvents = extractNodesFromTaskTree(); 63 64 float evaluationMetric = calculateEvaluationMetric(textInputEvents.nodesMatchedFilter(), textInputEvents.nodesNotMatchedFilter()); … … 88 89 } 89 90 91 /* (non-Javadoc) 92 * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRule#callEvaluationMetho(de.ugoe.cs.autoquest.usability.EvaluationMethodCaller) 93 */ 94 @Override 95 public Optional<UsabilityDefect> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller) 96 { 97 return evaluationMethodCaller.check(this); 98 } 90 99 } -
trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/EventTypeFilter.java
r1135 r1150 22 22 import de.ugoe.cs.autoquest.eventcore.gui.IInteraction; 23 23 import de.ugoe.cs.autoquest.eventcore.gui.MouseButtonInteraction; 24 import de.ugoe.cs.autoquest.eventcore.gui.MouseClick; 24 25 import de.ugoe.cs.autoquest.eventcore.gui.MouseInteraction; 26 import de.ugoe.cs.autoquest.eventcore.gui.Scroll; 25 27 import de.ugoe.cs.autoquest.eventcore.gui.TextInput; 26 28 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; … … 38 40 MOUSE_BUTTON_INTERACTION(MouseButtonInteraction.class), 39 41 42 MOUSE_CLICK(MouseClick.class), 43 40 44 MOUSE_INTERACTION(MouseInteraction.class), 41 45 42 46 TEXT_INPUT(TextInput.class), 47 48 SCROLL(Scroll.class), 43 49 44 50 USER_INTERACTION(IInteraction.class); … … 49 55 this.eventTypeClazz = eventTypeClazz; 50 56 } 51 57 52 58 @SuppressWarnings("unchecked") 53 59 @Override -
trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskTreeNodeTypeFilter.java
r1137 r1150 19 19 20 20 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 21 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration; 22 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection; 23 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence; 21 24 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 22 25 … … 30 33 public enum TaskTreeNodeTypeFilter implements TaskTreeNodeFilter<ITaskTreeNode> { 31 34 32 EVENT_TASK_NODE(IEventTask.class); 35 EVENT_TASK_NODE(IEventTask.class), 36 37 ITERATION(IIteration.class), 38 39 SEQUENCE(ISequence.class), 40 41 SELECTION(ISelection.class),; 33 42 34 43 private Class<? extends ITaskTreeNode> nodeTypeClazz; … … 47 56 @Override 48 57 public Predicate filterPredicate() { 49 return Predicates.instanceOf( IEventTask.class);58 return Predicates.instanceOf(nodeTypeClazz); 50 59 } 51 60
Note: See TracChangeset
for help on using the changeset viewer.