/bundles/plugins-trunk/Console/console/bsh/runCommandInConsole.bsh
# · Unknown · 20 lines · 15 code · 5 blank · 0 comment · 0 complexity · 3b71817867f61a183e4743a9aa6e0e33 MD5 · raw file
- /* Runs a command. */
- runCommandInConsole(View view, String shell, String command)
- {
- import console.Shell;
- // Open the console if it isn't already open
- view.getDockableWindowManager().addDockableWindow("console");
- // Obtain the console instance
- console = view.getDockableWindowManager().getDockable("console");
- // Set the shell to use
- Shell _shell = Shell.getShell(shell);
- // Run the command
- console.run(_shell, command);
- }
- help.runCommandInConsole
- = "usage: runCommandInConsole(View view, String shell, String command)";