/bundles/plugins-trunk/Console/console/bsh/runCommandInConsole.bsh
Unknown | 20 lines | 15 code | 5 blank | 0 comment | 0 complexity | 3b71817867f61a183e4743a9aa6e0e33 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
- /* 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)";