/** * Prints a list of the available ShellCommandables to the shell console. * * @see org.aitools.programd.interfaces.shell.ShellCommand#handle(java.lang.String, * org.aitools.programd.interfaces.shell.Shell) */ @Override public void handle(String commandLine, Shell shell) { int commandableCount = 0; shell.showMessage("Available shell commandables:"); for (ManagedProcess process : shell.getCore().getManagedProcesses().values()) { if (process instanceof ShellCommandable) { ShellCommandable commandable = (ShellCommandable) process; shell.showMessage( "/" + commandable.getShellID() + " - " + commandable.getShellDescription()); commandableCount++; } } if (commandableCount == 0) { shell.showError("No shell commandables are loaded."); } else { shell.showMessage("Commands after the shell commandable will be sent to the commandable."); shell.showMessage( "Example: \"/irc /JOIN #foo\" tells thIRCListenerRC listener to join channel \"#foo\"."); } }