Last change
on this file since 177 was
140,
checked in by jhall, 13 years ago
|
|
-
Property svn:mime-type set to
text/plain
|
File size:
1.2 KB
|
Line | |
---|
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 {
|
---|
13 |
|
---|
14 | public void help() {
|
---|
15 | Console.println("Usage: showSequences");
|
---|
16 | }
|
---|
17 |
|
---|
18 | @SuppressWarnings("unchecked")
|
---|
19 | public void run(List<Object> parameters) {
|
---|
20 |
|
---|
21 | if (parameters.size() > 0)
|
---|
22 | throw new InvalidParameterException();
|
---|
23 |
|
---|
24 | List<List<Event<?>>> containedSequences = null;
|
---|
25 |
|
---|
26 | try {
|
---|
27 | containedSequences = (List<List<Event<?>>>) GlobalDataContainer
|
---|
28 | .getInstance().getData("sequences");
|
---|
29 | } catch (ClassCastException e) {
|
---|
30 | Console.println("Not able to cast Data in GlobalDataContainer to List of Sequences");
|
---|
31 | }
|
---|
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 | }
|
---|
47 | }
|
---|
48 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.