Changeset 229 for trunk/EventBenchConsole/src/de
- Timestamp:
- 10/03/11 23:06:06 (13 years ago)
- Location:
- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDshowSequences.java
r226 r229 11 11 import de.ugoe.cs.eventbench.data.Event; 12 12 13 /** 14 * <p> 15 * Command to show sequences. 16 * </p> 17 * 18 * @author Jeffrey Hall, Steffen Herbold 19 */ 13 20 public class CMDshowSequences implements Command { 14 21 22 /* 23 * (non-Javadoc) 24 * 25 * @see de.ugoe.cs.util.console.Command#help() 26 */ 27 @Override 15 28 public void help() { 16 29 Console.println("Usage: showSequences"); 17 30 } 18 31 32 /* 33 * (non-Javadoc) 34 * 35 * @see de.ugoe.cs.util.console.Command#run(java.util.List) 36 */ 19 37 @SuppressWarnings("unchecked") 38 @Override 20 39 public void run(List<Object> parameters) { 21 40 … … 36 55 } else { 37 56 57 // TODO use SWT-GUI instead 38 58 DlgSequences.showDialog(); 39 59 -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swing/DlgInsert.java
r226 r229 45 45 * @author Jeffrey Hall 46 46 * @version 1.0 47 * @deprecated Use SWT-GUI for modifying sequences. 47 48 */ 48 49 public class DlgInsert extends JDialog { … … 498 499 return false; 499 500 } else { 500 FileEqualsReplay file = new FileEqualsReplay(); 501 file.setActualFile(textFieldActualFile.getText()); 502 file.setExpectedFile(textFieldExpectedFile.getText()); 501 FileEqualsReplay file = new FileEqualsReplay(textFieldExpectedFile.getText(), textFieldActualFile.getText()); 503 502 504 503 AssertEvent<FileEqualsReplay> e = new AssertEvent<FileEqualsReplay>( … … 546 545 // *** 547 546 548 TextEqualsReplay text = new TextEqualsReplay(); 549 text.setExpectedValue(textFieldExpectedValue.getText()); 550 text.setTarget(target); 547 TextEqualsReplay text = new TextEqualsReplay(textFieldExpectedValue.getText(),target); 551 548 552 549 AssertEvent<TextEqualsReplay> e = new AssertEvent<TextEqualsReplay>( -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swing/DlgSequenceDetails.java
r214 r229 37 37 * @author Jeffrey Hall 38 38 * @version 1.0 39 * @deprecated Use SWT-GUI for modifying sequences. 39 40 */ 40 41 public class DlgSequenceDetails { -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swing/DlgSequences.java
r173 r229 29 29 * @author Jeffrey Hall 30 30 * @version 1.0 31 * @deprecated Use SWT-GUI for modifying sequences. 31 32 */ 32 33 public class DlgSequences { -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/commands/CMDparseXML.java
r203 r229 4 4 import java.util.Collection; 5 5 import java.util.List; 6 import java.util.SortedSet; 6 7 7 8 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 8 9 import de.ugoe.cs.eventbench.windows.LogParser; 10 import de.ugoe.cs.eventbench.windows.data.WindowTree; 9 11 import de.ugoe.cs.eventbench.windows.data.WindowsEvent; 10 12 import de.ugoe.cs.util.console.Command; … … 60 62 61 63 Collection<List<WindowsEvent>> sequences = parser.getSequences(); 64 SortedSet<String> targets = WindowTree.getInstance().getTargets(); 62 65 63 66 if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) { 64 67 Console.traceln("Old data \"" + sequencesName + "\" overwritten"); 65 68 } 69 if( GlobalDataContainer.getInstance().addData(sequencesName+"_targets", targets)) { 70 Console.traceln("Old data \"" + sequencesName+"_targets" + "\" overwritten"); 71 } 66 72 } 67 73 -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/data/WindowTree.java
r228 r229 5 5 import java.util.Map; 6 6 import java.util.SortedSet; 7 import java.util.TreeSet;8 9 import de.ugoe.cs.eventbench.data.GlobalDataContainer;10 import de.ugoe.cs.util.console.Console;11 7 12 8 /** … … 39 35 */ 40 36 private static WindowTree theInstance = null; 37 38 /** 39 * <p> 40 * Maintains a set of all the target strings of all widgets that were at 41 * some point part of the window tree. 42 * </p> 43 */ 44 private SortedSet<String> targets; 41 45 42 46 /** … … 112 116 } 113 117 nodes.put(childHwnd, child); 118 targets.add(child.xmlRepresentation()); 114 119 } 115 116 storeTarget(childHwnd);117 120 } 118 121 … … 172 175 /** 173 176 * <p> 174 * Stores a target in GlobalDataContainer to be able to work on with it in175 * DlgInsert177 * Returns a sorted set of all targets that existed any time in the window 178 * tree. 176 179 * </p> 177 180 * 178 * @param hwnd 179 * hwnd of the window to be stored 181 * @return set of targets 180 182 */ 181 @SuppressWarnings("unchecked") 182 private void storeTarget(int hwnd) { 183 SortedSet<String> targets = new TreeSet<String>(); 184 185 if (GlobalDataContainer.getInstance().getData("ListTargets") == null) { 186 GlobalDataContainer.getInstance().addData("ListTargets", targets); 187 } 188 189 try { 190 targets = (SortedSet<String>) GlobalDataContainer.getInstance().getData("ListTargets"); 191 targets.add(nodes.get(hwnd).xmlRepresentation()); 192 } catch (ClassCastException e) { 193 Console.println("Not able to cast data in GlobalDataContainer to SortedSet of Strings"); 194 } 183 public SortedSet<String> getTargets() { 184 return targets; 195 185 } 196 186 }
Note: See TracChangeset
for help on using the changeset viewer.