Changeset 144 for trunk/EventBenchConsole/src/de/ugoe/cs/eventbench
- Timestamp:
- 08/07/11 18:45:13 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swing/DlgInsert.java
r139 r144 9 9 import de.ugoe.cs.eventbench.assertions.TextEqualsReplay; 10 10 import de.ugoe.cs.eventbench.data.Event; 11 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 12 import de.ugoe.cs.util.console.Console; 11 13 12 14 import javax.swing.JButton; … … 58 60 * Create the dialog. 59 61 */ 62 @SuppressWarnings("unchecked") 60 63 public DlgInsert(final List<Event<?>> sequences, final int selectedIndex, 61 64 final boolean insertBefore) { … … 134 137 scrollPane.setViewportView(listTargets); 135 138 136 for (int i = 0; i < sequences.size(); i++) { 137 if (sequences.get(i).getTarget() != " ") 138 modelListTargets.addElement(sequences.get(i).getTarget()); 139 List<String> targets = null; 140 141 if (GlobalDataContainer.getInstance().getData("ListTargets") == null) { 142 Console.println("There were no Targets found in the GlobalDataContainer"); 143 } else { 144 try { 145 targets = (List<String>) GlobalDataContainer.getInstance() 146 .getData("ListTargets"); 147 } catch (ClassCastException e) { 148 Console.println("Not able to cast Data in GlobalDataContainer to List of Targets (String)"); 149 } 150 151 for (int i = 0; i < targets.size(); i++) { 152 modelListTargets.addElement(targets.get(i).toString()); 153 } 139 154 } 140 listTargets.setSelectedIndex(0); 155 156 if (listTargets.getComponentCount() > 0) 157 listTargets.setSelectedIndex(0); 141 158 142 159 panelFileEquals.setBounds(10, 260, 494, 140);
Note: See TracChangeset
for help on using the changeset viewer.