- Timestamp:
- 04/19/13 19:51:55 (12 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/testutil/GenerateTaskModelUtil.java
r1152 r1165 15 15 package de.ugoe.cs.autoquest.usability.testutil; 16 16 17 import java.util.List; 17 18 import java.util.logging.Level; 19 20 import com.google.common.collect.Lists; 18 21 19 22 import de.ugoe.cs.autoquest.commands.sequences.CMDcondenseGuiModel; … … 25 28 import de.ugoe.cs.autoquest.plugin.jfc.commands.CMDparseJFC; 26 29 import de.ugoe.cs.autoquest.tasktrees.TaskTreeDecoder; 27 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 28 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 29 import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskTreeBuilder; 30 import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskTreeNodeFactory; 30 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory; 31 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList; 32 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 33 import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession; 34 import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder; 35 import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory; 31 36 import de.ugoe.cs.autoquest.test.CommandRunner; 32 37 import de.ugoe.cs.util.console.GlobalDataContainer; … … 40 45 * @author Alexander Deicke 41 46 */ 42 public class GenerateTask TreeUtil {47 public class GenerateTaskModelUtil { 43 48 44 49 private static final String seqName = "sequences"; … … 46 51 private static final String taskTreeName = "taskTree"; 47 52 48 public static ITaskTree getTaskTreeFromSpec(String spec) { 49 TaskTreeNodeFactory factory = new TaskTreeNodeFactory(); 50 ITaskTreeNode taskTree = new TaskTreeDecoder(new TaskTreeNodeFactory(), new TaskTreeBuilder()).instantiateTaskTree(spec); 51 return factory.createTaskTree(taskTree); 53 public static ITaskModel getTaskModelFromSpec(String spec) { 54 ITaskFactory factory = new TaskFactory(); 55 ITaskInstanceList taskInstances = new TaskTreeDecoder(factory, new TaskBuilder()).decode(spec); 56 List<IUserSession> userSessions = Lists.newArrayList(); 57 userSessions.add((IUserSession) taskInstances); 58 return factory.createTaskModel(userSessions); 52 59 } 53 60 54 public static ITask TreegetTaskTreeFromFile(String filename) {61 public static ITaskModel getTaskTreeFromFile(String filename) { 55 62 new TextConsole(Level.OFF); 56 63 parseTraceFile(filename); … … 60 67 detectTextInputEvents(); 61 68 condenseMouseClicks(); 62 return generateTask Tree();69 return generateTaskModel(); 63 70 } 64 71 … … 88 95 } 89 96 90 private static ITask Tree generateTaskTree() {97 private static ITaskModel generateTaskModel() { 91 98 CommandRunner.runCommand(CMDgenerateTaskTree.class, seqName, taskTreeName); 92 99 GlobalDataContainer dataContainer = GlobalDataContainer.getInstance(); 93 return (ITask Tree) dataContainer.getData(taskTreeName);100 return (ITaskModel) dataContainer.getData(taskTreeName); 94 101 } 95 102
Note: See TracChangeset
for help on using the changeset viewer.