/bundles/plugins-trunk/Console/console/bsh/runCommandInConsole.bsh

# · Unknown · 20 lines · 15 code · 5 blank · 0 comment · 0 complexity · 3b71817867f61a183e4743a9aa6e0e33 MD5 · raw file

  1. /* Runs a command. */
  2. runCommandInConsole(View view, String shell, String command)
  3. {
  4. import console.Shell;
  5. // Open the console if it isn't already open
  6. view.getDockableWindowManager().addDockableWindow("console");
  7. // Obtain the console instance
  8. console = view.getDockableWindowManager().getDockable("console");
  9. // Set the shell to use
  10. Shell _shell = Shell.getShell(shell);
  11. // Run the command
  12. console.run(_shell, command);
  13. }
  14. help.runCommandInConsole
  15. = "usage: runCommandInConsole(View view, String shell, String command)";