source: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDshowSequences.java @ 134

Last change on this file since 134 was 133, checked in by jhall, 13 years ago

Adds command "showSequences" to run the assertionTool

  • Property svn:mime-type set to text/plain
File size: 1.0 KB
Line 
1package de.ugoe.cs.eventbench.commands;
2
3import java.security.InvalidParameterException;
4import java.util.List;
5
6import de.ugoe.cs.eventbench.swing.DlgSequences;
7import de.ugoe.cs.util.console.Command;
8import de.ugoe.cs.util.console.Console;
9import de.ugoe.cs.eventbench.data.GlobalDataContainer;
10import de.ugoe.cs.eventbench.data.Event;
11
12public 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) throw new InvalidParameterException();
22                       
23               
24                List<List<Event<?>>> containedSequences = null;
25               
26                try {
27                        containedSequences = (List<List<Event<?>>>) GlobalDataContainer.getInstance().getData("sequences");
28                }
29                catch(ClassCastException e) {
30                        Console.println("Not able to cast Data in GlobalDataContainer to List of Sequences");
31                }
32               
33                if(containedSequences == null) Console.printerrln("No sequences found.");
34                else DlgSequences.ShowDialog();
35        }
36}
Note: See TracBrowser for help on using the repository browser.