Changeset 751 for trunk/quest-ui-core/src/main/java/de
- Timestamp:
- 09/03/12 12:05:42 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/commands/sequences/CMDdetectTextInputEvents.java
r750 r751 10 10 import de.ugoe.cs.quest.SequenceInstanceOf; 11 11 import de.ugoe.cs.quest.eventcore.Event; 12 import de.ugoe.cs.quest.eventcore.gui.TextInput.TextEquality; 12 13 import de.ugoe.cs.quest.eventcore.gui.TextInputDetector; 13 14 import de.ugoe.cs.util.console.Command; 15 import de.ugoe.cs.util.console.Console; 14 16 import de.ugoe.cs.util.console.GlobalDataContainer; 15 17 … … 31 33 @Override 32 34 public String help() { 33 return "detectTextInputEvents <sequences> {<new sequences>} ";35 return "detectTextInputEvents <sequences> {<new sequences>} {<textEqualityType>}"; 34 36 } 35 37 … … 44 46 String sequencesName; 45 47 String newSequencesName; 48 String textEqualityTypeString = "LEXICAL"; 46 49 try { 47 50 sequencesName = (String) parameters.get(0); … … 51 54 else { 52 55 newSequencesName = sequencesName; 56 } 57 if( parameters.size() > 2) { 58 textEqualityTypeString = (String) parameters.get(2); 53 59 } 54 60 } … … 67 73 return; 68 74 } 75 76 TextEquality textEqualityType = null; 77 try { 78 textEqualityType = TextEquality.valueOf(textEqualityTypeString); 79 } 80 catch (IllegalArgumentException e) { 81 Console.printerrln("Invalid mode. Only LEXICAL, SYNTACTICAL, and SEMANTICAL are allowed values!"); 82 return; 83 } 69 84 70 85 sequences = (Collection<List<Event>>) dataObject; … … 73 88 74 89 for (List<Event> sequence : sequences) { 75 newSequences.add(new TextInputDetector( ).detectTextInputs(sequence));90 newSequences.add(new TextInputDetector(textEqualityType).detectTextInputs(sequence)); 76 91 } 77 92
Note: See TracChangeset
for help on using the changeset viewer.