Get workspace folder location

Posted by Patrick Tingen on 20-Nov-2015 09:36

Is there a way to determine - from within a running progress program - where the current workspace folder is located? I would like to read in all database connections from the file:

[workspace]\.metadata\.plugins\com.openedge.pdt.project\databaseConnection.xml

But in order to do that the program needs to know where it is. 

All Replies

Posted by Peter Judge on 20-Nov-2015 09:41

You can pass it in to the ABL program via a run config.
 
 

Posted by ChUIMonster on 20-Nov-2015 09:45

How about os-getenv( "WRKDIR" )

Posted by Peter Judge on 20-Nov-2015 09:48

Not always set and not usually he same thing – it's typically the project working directory (not the workspace's).
 

Posted by egarcia on 20-Nov-2015 09:49

Hello,

When you run a launch configuration, there are set of environment variables that are passed to the process.

You should  be able to use ECLIPSE_WORK:

   MESSAGE OS-GETENV("ECLIPSE_WORK").

You can use Process Explorer to look at the Environment variables passed to a process.

Posted by Patrick Tingen on 20-Nov-2015 11:47

Thanks egarcia, it seems to work like a charm!

This thread is closed