To answer you question to your 'new' problem, I've decided to write another answer - because it is easier to explain with samples.
One way to load the environment variables on startup of your tool (IDE) of choice is like it can be done with eclipse - I think there must be a similar structure in your tool (IDE) too.
How it can be done in eclipse - https://stackoverflow.com/questions/829749/launch-mac-eclipse-with-environment-variables-set
(slightly re-written about the environment variables)
Create an empty text file called "eclipse.sh" in the Eclipse application bundle directory
Open the eclipse.sh in a text editor and enter the following contents:
logger "`dirname \"$0\"`/eclipse"
exec "`dirname \"$0\"`/eclipse" $@
In the Terminal set the executable flag of the shell script eclipse.sh, i.e.:
chmod +x /Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse.sh
Open the Eclipse.app Info.plist and change the value for the key CFBundleExecutable from eclipse to eclipse.sh.
MacOS X does not automatically detect that the Eclipse.app's Info.plist has changed. Therefore you need to force update the LaunchService database in the Terminal by using the lsregister command:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -v -f /Applications/eclipse/Eclipse.app
The next time you launch Eclipse.app from the Dock or from the Finder the environment variables should be set.