PageRenderTime 25ms CodeModel.GetById 0ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Unknown | 27 lines | 20 code | 7 blank | 0 comment | 0 complexity | 653aa3c0278e224d2ec9cc8fd4561ad9 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. /* Returns the current directory of the current
  2. System shell of the current Console.
  3. By Alan Ezust
  4. */
  5. currentSystemDirectory()
  6. {
  7. // To access non-public members
  8. setAccessibility(true);
  9. view.getDockableWindowManager().addDockableWindow("console");
  10. // Obtain the console instance
  11. c = view.getDockableWindowManager().getDockable("console");
  12. shell = console.Shell.getShell("System");
  13. if(shell.getConsoleState(c) == null)
  14. currentDirectory = java.lang.System.getProperty("user.dir");
  15. else
  16. currentDirectory = shell.getConsoleState(c)
  17. .currentDirectory;
  18. return currentDirectory;
  19. }
  20. currentSystemDirectory();