- Timestamp:
- 08/31/12 10:27:50 (12 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/manager/TaskTreeManagerTest.java
r692 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 org.junit.After; … … 10 10 import de.ugoe.cs.quest.eventcore.IEventTarget; 11 11 import de.ugoe.cs.quest.eventcore.IEventType; 12 import de.ugoe.cs.quest.tasktrees.testutils.SimpleLogFormatter;13 12 import de.ugoe.cs.quest.tasktrees.testutils.TaskTreeChecker; 14 13 import de.ugoe.cs.quest.test.DummyGUIElement; 15 14 import de.ugoe.cs.quest.test.DummyInteraction; 15 import de.ugoe.cs.util.console.TextConsole; 16 16 17 17 /** … … 31 31 @Before 32 32 public void setUp() { 33 Logger.getLogger("").getHandlers()[0].setFormatter(new SimpleLogFormatter()); 34 33 new TextConsole(Level.FINEST); 35 34 manager = new TaskTreeManager(); 36 35 } -
trunk/quest-core-tasktrees-test/src/test/java/de/ugoe/cs/quest/tasktrees/temporalrelation/AbstractTemporalRelationshipTC.java
r655 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 org.junit.Before; … … 10 10 import de.ugoe.cs.quest.eventcore.IEventType; 11 11 import de.ugoe.cs.quest.tasktrees.nodeequality.NodeEqualityRuleManager; 12 import de.ugoe.cs.quest.tasktrees.testutils.SimpleLogFormatter;13 12 import de.ugoe.cs.quest.tasktrees.testutils.Utilities; 14 13 import de.ugoe.cs.quest.tasktrees.treeifc.IEventTask; … … 19 18 import de.ugoe.cs.quest.tasktrees.treeimpl.TaskTreeBuilder; 20 19 import de.ugoe.cs.quest.tasktrees.treeimpl.TaskTreeNodeFactory; 20 import de.ugoe.cs.util.console.TextConsole; 21 21 22 22 /** … … 46 46 @Before 47 47 public void setUp() { 48 Logger.getLogger("").getHandlers()[0].setFormatter(new SimpleLogFormatter());48 new TextConsole(Level.FINEST); 49 49 events = new ArrayList<IEventTask>(); 50 50 } -
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 -
trunk/quest-core-usability-test/src/test/java/de/ugoe/cs/quest/usability/AbstractUsabilityEvaluationTC.java
r698 r725 5 5 6 6 import java.util.ArrayList; 7 import java.util.logging.L ogger;7 import java.util.logging.Level; 8 8 import java.util.regex.Matcher; 9 9 import java.util.regex.Pattern; … … 13 13 import de.ugoe.cs.quest.eventcore.Event; 14 14 import de.ugoe.cs.quest.eventcore.gui.TextInput; 15 import de.ugoe.cs.quest.tasktrees.testutils.SimpleLogFormatter;16 15 import de.ugoe.cs.quest.tasktrees.treeifc.IEventTask; 17 16 import de.ugoe.cs.quest.tasktrees.treeifc.IIteration; … … 27 26 import de.ugoe.cs.quest.test.DummyInteraction; 28 27 import de.ugoe.cs.quest.test.DummyTextField; 28 import de.ugoe.cs.util.console.TextConsole; 29 29 30 30 /** … … 47 47 @Before 48 48 public void setUp() { 49 Logger.getLogger("").getHandlers()[0].setFormatter(new SimpleLogFormatter());49 new TextConsole(Level.FINEST); 50 50 } 51 51 -
trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityEvaluationManager.java
r655 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.treeifc.ITaskTree; 8 import de.ugoe.cs.util.console.Console; 8 9 9 10 /** … … 15 16 public class UsabilityEvaluationManager { 16 17 17 /** */18 private static Logger LOG = Logger.getLogger(UsabilityEvaluationManager.class.getName());19 20 18 /** */ 21 19 private List<UsabilityEvaluationRule> rules = new ArrayList<UsabilityEvaluationRule>(); … … 44 42 */ 45 43 public UsabilityEvaluationResult evaluateUsability(ITaskTree taskTree) { 46 LOG.info("evaluating usability of task tree " + taskTree);44 Console.traceln(Level.INFO, "evaluating usability of task tree " + taskTree); 47 45 48 46 List<UsabilityEvaluationResult> results = new ArrayList<UsabilityEvaluationResult>(); 49 47 50 48 for (UsabilityEvaluationRule rule : rules) { 51 LOG.info("applying rule " + rule.getClass().getSimpleName());49 Console.traceln(Level.INFO, "applying rule " + rule.getClass().getSimpleName()); 52 50 UsabilityEvaluationResult result = rule.evaluate(taskTree); 53 51 results.add(result); 54 LOG.info("the rule found " + result.getAllDefects().size() + " usability defects, of " + 55 "which " + result.getSevereDefects().size() + " are severe."); 52 Console.traceln(Level.INFO, "the rule found " + result.getAllDefects().size() + 53 " usability defects, of which " + result.getSevereDefects().size() + 54 " are severe."); 56 55 } 57 56 58 57 UsabilityEvaluationResult result = mergeResults(results); 59 LOG.info("the evaluation result contains " + result.getAllDefects().size() +60 " defects, of which " + result.getSevereDefects().size() + " are severe.");58 Console.println("the evaluation result contains " + result.getAllDefects().size() + 59 " defects, of which " + result.getSevereDefects().size() + " are severe."); 61 60 return result; 62 61 } -
trunk/quest-misc-test/src/test/java/de/ugoe/cs/tasktree/keyboardmaps/KeyboardMapTest.java
r655 r725 4 4 5 5 import java.util.Locale; 6 import java.util.logging.Level; 6 7 7 8 import org.junit.Before; 8 9 import org.junit.Test; 10 11 import de.ugoe.cs.util.console.TextConsole; 9 12 10 13 /** … … 21 24 @Before 22 25 public void setUp() { 23 // Logger.getLogger("").getHandlers()[0].setFormatter(new SimpleLogFormatter());26 new TextConsole(Level.FINEST); 24 27 } 25 28 -
trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/KeyboardMap.java
r655 r725 12 12 import java.util.Map; 13 13 import java.util.logging.Level; 14 import java.util.logging.Logger; 14 15 import de.ugoe.cs.util.console.Console; 15 16 16 17 /** … … 21 22 */ 22 23 public class KeyboardMap { 23 24 /** */25 private static Logger LOG = Logger.getLogger(KeyboardMap.class.getName());26 24 27 25 /** */ … … 110 108 */ 111 109 void init() throws IllegalArgumentException { 112 LOG.info("initializing keymap for locale " + locale);110 Console.traceln(Level.FINE, "initializing keymap for locale " + locale); 113 111 114 112 List<String[]> deadKeySequences = new ArrayList<String[]>(); … … 116 114 readStream(getStream(fileName), deadKeySequences, keyStrokes); 117 115 118 LOG.info("read " + keyStrokes.size() + " key strokes and " + deadKeySequences.size()+119 " dead key sequences");116 Console.traceln(Level.FINER, "read " + keyStrokes.size() + " key strokes and " + 117 deadKeySequences.size() + " dead key sequences"); 120 118 121 119 VirtualKeySynonyms virtualKeySynonyms = determineVirtualKeySynonyms(keyStrokes); … … 135 133 */ 136 134 private InputStream getStream(String name) { 137 LOG.info("reading keymap for locale " + locale + " from resource keymaps/" + name); 135 Console.traceln 136 (Level.FINER, "reading keymap for locale " + locale + " from resource keymaps/" + name); 138 137 139 138 InputStream stream = … … 164 163 } 165 164 catch (UnsupportedEncodingException e) { 166 LOG.log(Level.WARNING, "no keyboard map available for locale " + locale,e);165 Console.traceln(Level.WARNING, "no keyboard map available for locale " + locale); 167 166 throw new IllegalArgumentException 168 167 ("provided stream can not be read due to invalid encoding", e); … … 178 177 } 179 178 catch (IOException e) { 180 LOG.log(Level.WARNING, "no keyboard map available for locale " + locale,e);179 Console.traceln(Level.WARNING, "no keyboard map available for locale " + locale); 181 180 throw new IllegalArgumentException("no keyboard map available for locale " + locale, e); 182 181 } … … 186 185 } 187 186 catch (IOException e) { 188 LOG.warning("could not close input stream for reading keyboard map"); 187 Console.traceln 188 (Level.WARNING, "could not close input stream for reading keyboard map"); 189 189 } 190 190 } … … 235 235 for (int i = 0; i < keyStrokes.size(); i++) { 236 236 if (keyStrokes.get(i)[0].equals(values[0])) { 237 LOG.finest("replacing key stroke " + values[0] + " with former keyid " + 238 keyStrokes.get(i)[1] + " with new key id " + values[1]); 237 Console.traceln(Level.FINEST, "replacing key stroke " + values[0] + 238 " with former keyid " + keyStrokes.get(i)[1] + 239 " with new key id " + values[1]); 239 240 keyStrokes.set(i, values); 240 241 alreadyAdded = true; … … 256 257 */ 257 258 private VirtualKeySynonyms determineVirtualKeySynonyms(List<String[]> keyStrokes) { 258 LOG.info("determining virtual keys and synonyms for the keymap");259 Console.traceln(Level.FINER, "determining virtual keys and synonyms for the keymap"); 259 260 260 261 VirtualKeySynonyms virtualKeySynonyms = new VirtualKeySynonyms(); … … 280 281 for (String[] unmatchedKeyStroke : unmatchedKeyStrokes) { 281 282 if (!virtualKeySynonyms.containsKey(getKeyId(unmatchedKeyStroke[1]))) { 282 LOG.finest("no virtual key mapped to key stroke " + unmatchedKeyStroke[0] + "(" + 283 unmatchedKeyStroke[1] + ") of keyboard map for locale " + locale); 283 Console.traceln(Level.FINEST, "no virtual key mapped to key stroke " + 284 unmatchedKeyStroke[0] + "(" + unmatchedKeyStroke[1] + 285 ") of keyboard map for locale " + locale); 284 286 } 285 287 } … … 360 362 } 361 363 else { 362 LOG.severe("unknown condition " + values[i] + " specified for key stroke " + 363 keyStrokeName + " through keyboard map for locale " + locale); 364 Console.traceln(Level.SEVERE, "unknown condition " + values[i] + 365 " specified for key stroke " + keyStrokeName + 366 " through keyboard map for locale " + locale); 364 367 throw new IllegalArgumentException 365 368 ("no keyboard map available for locale " + locale); … … 400 403 401 404 if (virtualKeys == null) { 402 LOG.severe("no virtual key mapped to key stroke " + keyStrokeName +403 " of keyboard map for locale " + locale);405 Console.traceln(Level.SEVERE, "no virtual key mapped to key stroke " + keyStrokeName + 406 " of keyboard map for locale " + locale); 404 407 // throw new IllegalArgumentException("no keyboard map available for locale " + 405 408 // mLocale); … … 1017 1020 } 1018 1021 else { 1019 LOG.finest("unknown virtual key for key stroke " + keyStrokeName +1020 " specified through " + "keyboard map for locale " + locale);1022 Console.traceln(Level.FINEST, "unknown virtual key for key stroke " + keyStrokeName + 1023 " specified through " + "keyboard map for locale " + locale); 1021 1024 1022 1025 return null; … … 2015 2018 } 2016 2019 else { 2017 LOG.severe("unknown key stroke name " + keyStrokeName +2018 " specified through keyboard map " + "for locale " + locale);2020 Console.traceln(Level.SEVERE, "unknown key stroke name " + keyStrokeName + 2021 " specified through keyboard map " + "for locale " + locale); 2019 2022 2020 2023 // if (shift) -
trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/VirtualKeySynonyms.java
r655 r725 5 5 import java.util.List; 6 6 import java.util.Map; 7 import java.util.logging.Logger; 7 import java.util.logging.Level; 8 9 import de.ugoe.cs.util.console.Console; 8 10 9 11 /** … … 15 17 class VirtualKeySynonyms { 16 18 17 /** */18 private static Logger LOG = Logger.getLogger(KeyboardMap.class.getName());19 20 19 /** */ 21 20 private Map<Integer, List<VirtualKey>> synonyms = new HashMap<Integer, List<VirtualKey>>(); … … 46 45 47 46 if ((existingKeyId != null) && (existingKeyId != keyId)) { 48 LOG.finest("virtual key " + virtualKey+49 " is mapped to more than one key id (current is " + existingKeyId +50 ", new is " + keyId +"). New key id will be used (" + keyId + ").");47 Console.traceln(Level.FINEST, "virtual key " + virtualKey + " is mapped to more " + 48 "than one key id (current is " + existingKeyId + ", new is " + keyId + 49 "). New key id will be used (" + keyId + ")."); 51 50 } 52 51 … … 73 72 } 74 73 else { 75 LOG.warning("no virtual key define for key id " + keyId);74 Console.traceln(Level.WARNING, "no virtual key define for key id " + keyId); 76 75 return null; 77 76 } -
trunk/quest-plugin-jfc-test/src/test/java/de/ugoe/cs/quest/plugin/jfc/JFCLogParserTest.java
r655 r725 7 7 import java.util.Collection; 8 8 import java.util.List; 9 import java.util.logging.Level; 9 10 10 11 import org.junit.Before; … … 15 16 import de.ugoe.cs.quest.eventcore.guimodel.IGUIElement; 16 17 import de.ugoe.cs.quest.plugin.jfc.guimodel.JFCGUIElement; 18 import de.ugoe.cs.util.console.TextConsole; 17 19 18 20 /** … … 29 31 @Before 30 32 public void setUp() { 31 // Logger.getLogger("").getHandlers()[0].setFormatter(new SimpleLogFormatter());33 new TextConsole(Level.FINEST); 32 34 } 33 35
Note: See TracChangeset
for help on using the changeset viewer.