PageRenderTime 45ms CodeModel.GetById 27ms app.highlight 11ms RepoModel.GetById 0ms 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*/
 6
 7currentSystemDirectory() 
 8{
 9    // To access non-public members
10    setAccessibility(true);
11    
12    
13	view.getDockableWindowManager().addDockableWindow("console");
14
15	// Obtain the console instance
16   c = view.getDockableWindowManager().getDockable("console");
17   shell = console.Shell.getShell("System");
18   if(shell.getConsoleState(c) == null)
19        currentDirectory = java.lang.System.getProperty("user.dir");
20    else
21        currentDirectory = shell.getConsoleState(c)
22				.currentDirectory;
23    return currentDirectory;
24}
25currentSystemDirectory();
26
27