Changeset 548 for trunk/quest-ui-swt
- Timestamp:
- 08/16/12 14:45:03 (12 years ago)
- Location:
- trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt/AbstractInsertEventComposite.java
r526 r548 16 16 } 17 17 18 public abstract Event <?>getEvent();18 public abstract Event getEvent(); 19 19 20 20 } -
trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt/EditSequenceDialog.java
r526 r548 28 28 private TableColumn tblclmnEventTarget; 29 29 30 private java.util.List<Event <?>> sequence;30 private java.util.List<Event> sequence; 31 31 private SortedSet<String> targets; 32 32 … … 46 46 * Open the dialog. 47 47 */ 48 public void open(java.util.List<Event <?>> sequence) {48 public void open(java.util.List<Event> sequence) { 49 49 this.sequence = sequence; 50 50 createContents(); … … 165 165 private void updateTableContents() { 166 166 table.removeAll(); 167 for (Event <?>event : sequence) {167 for (Event event : sequence) { 168 168 TableItem tableItem = new TableItem(table, SWT.NONE); 169 169 String target = event.getTarget(); … … 173 173 target = target.replace("].", "].\n"); 174 174 } 175 tableItem.setText(new String[] { event.getType() , target });175 tableItem.setText(new String[] { event.getType().toString(), target }); 176 176 } 177 177 for (int i = 0; i < table.getColumnCount(); i++) { … … 183 183 InsertAssertionDialog insertDialog = new InsertAssertionDialog(shell, 184 184 SWT.NONE, targets); 185 Event <?>event = insertDialog.open();185 Event event = insertDialog.open(); 186 186 if (event != null) { 187 187 sequence.add(position, event); -
trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt/InsertAssertionDialog.java
r526 r548 21 21 public class InsertAssertionDialog extends Dialog { 22 22 23 protected Event <?>result;23 protected Event result; 24 24 protected Shell shell; 25 25 … … 44 44 * @return the result 45 45 */ 46 public Event <?>open() {46 public Event open() { 47 47 result = null; 48 48 insertEventComposites = new ArrayList<AbstractInsertEventComposite>(); -
trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt/InsertFileEquals.java
r526 r548 12 12 import org.eclipse.swt.widgets.Button; 13 13 14 import de.ugoe.cs.quest.assertions. AssertEvent;14 import de.ugoe.cs.quest.assertions.FileEqualsAssertEvent; 15 15 import de.ugoe.cs.quest.assertions.FileEqualsReplay; 16 16 import de.ugoe.cs.quest.eventcore.Event; … … 74 74 75 75 @Override 76 public Event <?>getEvent() {76 public Event getEvent() { 77 77 FileEqualsReplay replay = new FileEqualsReplay(expectedText.getText(), actualText.getText()); 78 AssertEvent<FileEqualsReplay> event = new AssertEvent<FileEqualsReplay>("FileEqualsAssertion");79 event.addReplay Event(replay);78 Event event = new Event(new FileEqualsAssertEvent()); 79 event.addReplayable(replay); 80 80 return event; 81 81 } -
trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt/InsertTextEquals.java
r526 r548 14 14 15 15 import de.ugoe.cs.quest.assertions.AssertEvent; 16 import de.ugoe.cs.quest.assertions.TextEqualsAssertEventType; 16 17 import de.ugoe.cs.quest.assertions.TextEqualsReplay; 17 18 import de.ugoe.cs.quest.eventcore.Event; 19 import de.ugoe.cs.quest.eventcore.IEventTarget; 18 20 import de.ugoe.cs.util.ArrayTools; 19 21 … … 98 100 99 101 @Override 100 public Event <?>getEvent() {101 Stringtarget = targetText.getText();102 public Event getEvent() { 103 IEventTarget target = targetText.getText(); 102 104 TextEqualsReplay replay = new TextEqualsReplay(expectedText.getText(), target); 103 AssertEvent<TextEqualsReplay> event = new AssertEvent<TextEqualsReplay>("TextEqualsAssertion");105 Event event = new Event(new TextEqualsAssertEventType()); 104 106 event.setTarget(target); 105 event.addReplay Event(replay);107 event.addReplayable(replay); 106 108 return event; 107 109 } -
trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt/SequencesDialog.java
r526 r548 27 27 28 28 private List sequenceList; 29 private Collection<java.util.List<Event <?>>> sequences;29 private Collection<java.util.List<Event>> sequences; 30 30 private SortedSet<String> targets; 31 31 … … 85 85 EditSequenceDialog editSequenceDialog = new EditSequenceDialog(shell, SWT.NONE, targets); 86 86 int counter = 0; 87 java.util.List<Event <?>> selectedSequence = null;88 for( java.util.List<Event <?>> sequence : sequences ) {87 java.util.List<Event> selectedSequence = null; 88 for( java.util.List<Event> sequence : sequences ) { 89 89 if( counter==index ) { 90 90 selectedSequence = sequence; … … 116 116 Object dataObject = GlobalDataContainer.getInstance().getData(sequencesName); 117 117 if( SequenceInstanceOf.isCollectionOfSequences(dataObject)) { 118 sequences = (Collection<java.util.List<Event <?>>>) dataObject;118 sequences = (Collection<java.util.List<Event>>) dataObject; 119 119 int seqDigits = Integer.toString(sequences.size()).length(); 120 120 int counter = 1; 121 for( java.util.List<Event <?>> sequence : sequences ) {121 for( java.util.List<Event> sequence : sequences ) { 122 122 String seqName = "#"+String.format("%0"+seqDigits+"d", counter)+": "+sequence.size(); 123 123 sequenceList.add(seqName); … … 135 135 if( targets==null ) { 136 136 targets = new TreeSet<String>(); 137 for( java.util.List<Event <?>> sequence : sequences ) {138 for( Event <?>event : sequence ) {137 for( java.util.List<Event> sequence : sequences ) { 138 for( Event event : sequence ) { 139 139 String target = event.getTarget(); 140 140 if( target!=null ) {
Note: See TracChangeset
for help on using the changeset viewer.