Last change
on this file since 140 was
140,
checked in by jhall, 13 years ago
|
|
-
Property svn:mime-type set to
text/plain
|
File size:
1.2 KB
|
Rev | Line | |
---|
[133] | 1 | package de.ugoe.cs.eventbench.commands;
|
---|
| 2 |
|
---|
| 3 | import java.security.InvalidParameterException;
|
---|
| 4 | import java.util.List;
|
---|
| 5 |
|
---|
| 6 | import de.ugoe.cs.eventbench.swing.DlgSequences;
|
---|
| 7 | import de.ugoe.cs.util.console.Command;
|
---|
| 8 | import de.ugoe.cs.util.console.Console;
|
---|
| 9 | import de.ugoe.cs.eventbench.data.GlobalDataContainer;
|
---|
| 10 | import de.ugoe.cs.eventbench.data.Event;
|
---|
| 11 |
|
---|
| 12 | public class CMDshowSequences implements Command {
|
---|
[137] | 13 |
|
---|
[133] | 14 | public void help() {
|
---|
| 15 | Console.println("Usage: showSequences");
|
---|
| 16 | }
|
---|
[137] | 17 |
|
---|
[133] | 18 | @SuppressWarnings("unchecked")
|
---|
| 19 | public void run(List<Object> parameters) {
|
---|
[137] | 20 |
|
---|
| 21 | if (parameters.size() > 0)
|
---|
| 22 | throw new InvalidParameterException();
|
---|
| 23 |
|
---|
[133] | 24 | List<List<Event<?>>> containedSequences = null;
|
---|
[137] | 25 |
|
---|
[133] | 26 | try {
|
---|
[137] | 27 | containedSequences = (List<List<Event<?>>>) GlobalDataContainer
|
---|
| 28 | .getInstance().getData("sequences");
|
---|
| 29 | } catch (ClassCastException e) {
|
---|
[133] | 30 | Console.println("Not able to cast Data in GlobalDataContainer to List of Sequences");
|
---|
| 31 | }
|
---|
[137] | 32 |
|
---|
| 33 | if (containedSequences == null) {
|
---|
| 34 | Console.printerrln("No sequences found.");
|
---|
| 35 | } else {
|
---|
| 36 |
|
---|
| 37 | DlgSequences.showDialog();
|
---|
| 38 |
|
---|
| 39 | synchronized (Console.getInstance()) {
|
---|
| 40 | try {
|
---|
| 41 | Console.getInstance().wait();
|
---|
| 42 | } catch (InterruptedException e) {
|
---|
| 43 | e.printStackTrace();
|
---|
| 44 | }
|
---|
| 45 | }
|
---|
| 46 | }
|
---|
[133] | 47 | }
|
---|
| 48 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.