Last change
on this file since 662 was
662,
checked in by pharms, 12 years ago
|
- added possibility to list available commands
|
File size:
985 bytes
|
Rev | Line | |
---|
[662] | 1 |
|
---|
| 2 | package de.ugoe.cs.quest.ui.commands;
|
---|
| 3 |
|
---|
| 4 | import java.util.List;
|
---|
| 5 |
|
---|
| 6 | import de.ugoe.cs.util.console.Command;
|
---|
| 7 | import de.ugoe.cs.util.console.CommandExecuter;
|
---|
| 8 | import de.ugoe.cs.util.console.Console;
|
---|
| 9 |
|
---|
| 10 | /**
|
---|
| 11 | * <p>
|
---|
| 12 | * Command to list all events (symbols) known to a usage profile (stochastic process).
|
---|
| 13 | * </p>
|
---|
| 14 | *
|
---|
| 15 | * @author Steffen Herbold
|
---|
| 16 | * @version 1.0
|
---|
| 17 | */
|
---|
| 18 | public class CMDlistCommands implements Command {
|
---|
| 19 |
|
---|
| 20 | /*
|
---|
| 21 | * (non-Javadoc)
|
---|
| 22 | *
|
---|
| 23 | * @see de.ugoe.cs.util.console.Command#run(java.util.List)
|
---|
| 24 | */
|
---|
| 25 | @Override
|
---|
| 26 | public void run(List<Object> parameters) {
|
---|
| 27 | String[] commands = CommandExecuter.getInstance().getAvailableCommands();
|
---|
| 28 |
|
---|
| 29 | for (String command : commands) {
|
---|
| 30 | Console.println(command);
|
---|
| 31 | }
|
---|
| 32 | }
|
---|
| 33 |
|
---|
| 34 | /*
|
---|
| 35 | * (non-Javadoc)
|
---|
| 36 | *
|
---|
| 37 | * @see de.ugoe.cs.util.console.Command#help()
|
---|
| 38 | */
|
---|
| 39 | @Override
|
---|
| 40 | public void help() {
|
---|
| 41 | Console.println("Usage: listCommands");
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.