PageRenderTime 1875ms CodeModel.GetById 360ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1511ms

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

#
Unknown | 27 lines | 20 code | 7 blank | 0 comment | 0 complexity | 653aa3c0278e224d2ec9cc8fd4561ad9 MD5 | raw file
 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