Changeset 137 for trunk/EventBenchConsole/src/de/ugoe/cs/eventbench
- Timestamp:
- 07/29/11 14:32:08 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDshowSequences.java
r135 r137 3 3 import java.security.InvalidParameterException; 4 4 import java.util.List; 5 import java.util.concurrent.Semaphore; 5 6 6 7 import de.ugoe.cs.eventbench.swing.DlgSequences; … … 11 12 12 13 public class CMDshowSequences implements Command { 13 14 14 15 public void help() { 15 16 Console.println("Usage: showSequences"); 16 17 } 17 18 18 19 @SuppressWarnings("unchecked") 19 20 public void run(List<Object> parameters) { 20 21 if (parameters.size() > 0) throw new InvalidParameterException();22 23 21 22 if (parameters.size() > 0) 23 throw new InvalidParameterException(); 24 24 25 List<List<Event<?>>> containedSequences = null; 25 26 26 27 try { 27 containedSequences = (List<List<Event<?>>>) GlobalDataContainer .getInstance().getData("sequences");28 }29 catch(ClassCastException e) {28 containedSequences = (List<List<Event<?>>>) GlobalDataContainer 29 .getInstance().getData("sequences"); 30 } catch (ClassCastException e) { 30 31 Console.println("Not able to cast Data in GlobalDataContainer to List of Sequences"); 31 32 } 32 33 if(containedSequences == null) Console.printerrln("No sequences found."); 34 else DlgSequences.showDialog(); 33 34 if (containedSequences == null) { 35 Console.printerrln("No sequences found."); 36 } else { 37 38 DlgSequences.showDialog(); 39 40 synchronized (Console.getInstance()) { 41 try { 42 Console.getInstance().wait(); 43 } catch (InterruptedException e) { 44 e.printStackTrace(); 45 } 46 } 47 } 35 48 } 36 49 }
Note: See TracChangeset
for help on using the changeset viewer.