Changeset 172
- Timestamp:
- 09/09/11 18:43:04 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/data/WindowTree.java
r171 r172 98 98 * class name of the window to be created 99 99 */ 100 @SuppressWarnings("unchecked")101 100 public void add(int parentHwnd, int childHwnd, String childWindowName, 102 101 int resourceId, String className, boolean isModal) { … … 114 113 } 115 114 116 // store targets in GlobalDataContainer to be able to work on with them 117 // in DlgInsert 118 List<String> treeTargets = new ArrayList<String>(); 119 120 if (GlobalDataContainer.getInstance().getData("ListTargets") == null) { 121 GlobalDataContainer.getInstance().addData("ListTargets", 122 treeTargets); 123 } 124 125 try { 126 treeTargets = (List<String>) GlobalDataContainer.getInstance() 127 .getData("ListTargets"); 128 } catch (ClassCastException e) { 129 Console.println("Not able to cast data in GlobalDataContainer to List of Strings"); 130 } 131 132 treeTargets.add(nodes.get(childHwnd).xmlRepresentation()); 115 storeTarget(childHwnd); 133 116 } 134 117 … … 185 168 return nodes.size(); 186 169 } 170 171 /** 172 * <p> 173 * Stores a targets in GlobalDataContainer to be able to work on with it in 174 * DlgInsert 175 * </p> 176 * 177 * @param hwnd 178 * hwnd of the window to be stored 179 */ 180 @SuppressWarnings("unchecked") 181 private void storeTarget(int hwnd) { 182 List<String> treeTargets = new ArrayList<String>(); 183 184 if (GlobalDataContainer.getInstance().getData("ListTargets") == null) { 185 GlobalDataContainer.getInstance().addData("ListTargets", 186 treeTargets); 187 } 188 189 try { 190 treeTargets = (List<String>) GlobalDataContainer.getInstance() 191 .getData("ListTargets"); 192 } catch (ClassCastException e) { 193 Console.println("Not able to cast data in GlobalDataContainer to List of Strings"); 194 } 195 196 treeTargets.add(nodes.get(hwnd).xmlRepresentation()); 197 } 187 198 }
Note: See TracChangeset
for help on using the changeset viewer.