Changeset 725 for trunk/quest-core-tasktrees/src/main/java/de/ugoe
- Timestamp:
- 08/31/12 10:27:50 (12 years ago)
- Location:
- trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees/manager/TaskTreeManager.java
r710 r725 1 1 package de.ugoe.cs.quest.tasktrees.manager; 2 2 3 import java.util.logging.L ogger;3 import java.util.logging.Level; 4 4 5 5 import de.ugoe.cs.quest.eventcore.Event; … … 11 11 import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNode; 12 12 import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNodeFactory; 13 import de.ugoe.cs.util.console.Console; 13 14 14 15 /** … … 22 23 /** */ 23 24 private static final int MAX_EVENTS_TILL_RULE_APPLICATION = 100; 24 25 /** */26 private static Logger LOG = Logger.getLogger(TaskTreeManager.class.getName());27 25 28 26 /** */ … … 51 49 */ 52 50 public void handleNewEvent(Event event) { 53 addEventTask(taskTreeNodeFactory.createNewEventTask(event.getType(), event.getTarget()));51 handleEventTask(taskTreeNodeFactory.createNewEventTask(event.getType(), event.getTarget())); 54 52 } 55 53 … … 58 56 */ 59 57 public synchronized ITaskTree getTaskTree() { 60 LOG.info("applying rulestemporal relationship generation rules");58 Console.traceln(Level.INFO, "applying temporal relationship generation rules"); 61 59 62 60 ISequence currentRootSequence = rootSequence.clone(); … … 68 66 69 67 /** 70 * @param task71 */72 private synchronized void addEventTask(IEventTask task) {73 handleEventTask(task);74 }75 76 /**77 68 * adds the task to the current or the new sequence. The decision depends on the type of task. 78 69 * If the task finishes the current sequence, the sequence is marked as finished If the task … … 80 71 * finished. Otherwise it is added to a new sequence. 81 72 */ 82 private void handleEventTask(IEventTask eventTask) {73 private synchronized void handleEventTask(IEventTask eventTask) { 83 74 if (!(eventTask.getEventType() instanceof KeyboardFocusChange)) { 84 LOG.info("handling interaction event task \"" + eventTask + "\"");75 Console.traceln(Level.INFO, "handling interaction event task \"" + eventTask + "\""); 85 76 addTaskToSequence(eventTask); 86 77 } … … 97 88 eventsTillRuleApplication = MAX_EVENTS_TILL_RULE_APPLICATION; 98 89 99 LOG.info("applying rulestemporal relationship generation rules");90 Console.traceln(Level.INFO, "applying temporal relationship generation rules"); 100 91 ComponentManager.getTemporalRelationshipRuleManager().applyRules(rootSequence, 101 92 taskTreeBuilder, -
trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees/nodeequality/NodeEqualityRuleManager.java
r655 r725 20 20 */ 21 21 public class NodeEqualityRuleManager { 22 23 /** */24 // private static Logger LOG = Logger.getLogger(NodeEqualityRuleManager.class.getName());25 22 26 23 /** */ -
trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees/temporalrelation/TemporalRelationshipRuleManager.java
r721 r725 3 3 import java.util.ArrayList; 4 4 import java.util.List; 5 import java.util.logging.L ogger;5 import java.util.logging.Level; 6 6 7 7 import de.ugoe.cs.quest.tasktrees.nodeequality.NodeEqualityRuleManager; … … 9 9 import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNode; 10 10 import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNodeFactory; 11 import de.ugoe.cs.util.console.Console; 11 12 12 13 /** … … 18 19 public class TemporalRelationshipRuleManager { 19 20 20 /** */21 private static Logger LOG = Logger.getLogger(TemporalRelationshipRuleManager.class.getName());22 23 21 /** */ 24 22 private NodeEqualityRuleManager nodeEqualityRuleManager; … … 41 39 */ 42 40 public void init() { 43 LOG.info("initializing");44 45 41 ruleIndex.add(new DefaultEventTargetSequenceDetectionRule()); 46 42 ruleIndex.add(new TrackBarSelectionDetectionRule(nodeEqualityRuleManager)); … … 79 75 String logIndent) 80 76 { 81 LOG.info(logIndent + "applying rules for " + parent);77 Console.traceln(Level.FINER, logIndent + "applying rules for " + parent); 82 78 83 79 int noOfRuleApplications = 0; … … 93 89 RuleApplicationStatus.RULE_APPLICATION_FINISHED)) 94 90 { 95 LOG.info(logIndent + "applied rule " + rule + " on " + parent); 91 Console.traceln 92 (Level.FINE, logIndent + "applied rule " + rule + " on " + parent); 96 93 noOfRuleApplications++; 97 94 … … 117 114 118 115 if (noOfRuleApplications <= 0) { 119 LOG.warning(logIndent + "no rules applied --> no temporal relationship generated"); 116 Console.traceln(Level.INFO, logIndent + "no rules applied --> no temporal " + 117 "relationship generated"); 120 118 } 121 119
Note: See TracChangeset
for help on using the changeset viewer.