PageRenderTime 44ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/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
  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)";