Re: Workspace Path Variable? [message #72317] |
Mon, 30 August 2010 09:14  |
tegus
Messages: 20 Registered: October 2008
|
Junior Member |
|
|
On Aug 30, 11:52 am, Wox <s...@nomail.com> wrote:
> On Mon, 30 Aug 2010 06:57:04 -0700 (PDT), tegus
>
> <tegusbillhar...@gmail.com> wrote:
>> All,
>
>> Is there a system variable which contains the current workspace path
>> name? Nothing shows up when I run hel, /system_variables .....
>
>> Thanks,
>> Bill
>
> If you need to get it when running some procedure that sits in your
> workspace directory you could use David's ProgramRootDir
> print,ProgramRootDir(/oneup)
Wox,
Thanks!
I was just hoping there was a built-in method of retreiving the
workspace info.
What I have decided to do is parse the org.eclipse.ui.ide.prefs file
located in my C:\Documents and Settings\user\.idl\itt\idlworkbench-
config-idl70\.settings folder for RECENT_WORKSPACES which provides a
list of recently used workspaces and I pick the first (most recent --
i.e., currently in use) workspace.
Here's what my org.eclipse.ui.ide.prefs file looks like
#Mon Aug 30 11:49:17 EDT 2010
RECENT_WORKSPACES_PROTOCOL=2
MAX_RECENT_WORKSPACES=5
SHOW_WORKSPACE_SELECTION_DIALOG=false
eclipse.preferences.version=1
RECENT_WORKSPACES=C\:\\Documents and Settings\\user\\testWorkSpace,C\:\
\Documents and Settings\\user\\IDLWorkspace,C\:\\Documents and Settings
\\user\\Desktop\\Baseline,C\:\\Documents and Settings\\user\\Baseline,C
\:\\Documents and Settings\\user\\IDL Workspace 2
So in this case I end up with C\:\\Documents and Settings\\wclift01\
\testWorkSpace
Not pretty, but it works, although some of our machines have multiple
org.eclipse.ui.ide.prefs files so just be be sure, I'll need to check
the timestamp.
|
|
|