Skip to main content



      Home
Home » Eclipse Projects » RCP Testing Tool » How to use Environment variables in Context Settings
How to use Environment variables in Context Settings [message #1701925] Thu, 16 July 2015 14:00 Go to next message
Eclipse UserFriend
I need to set some Preferences using a Context, and in the value of the preference I need to use a path which may change depending on the OS.

I need to use environment variables or java variables to create the relative path for the value.

Is possible to access env variables from a Context Setting?

Just to give an example, I'm trying to set the M2_REPO variable in the classpath settings in the preferences menu.
to user.home + /.m2/repository
How can I access the user.home from there?

Re: How to use Environment variables in Context Settings [message #1701957 is a reply to message #1701925] Fri, 17 July 2015 02:29 Go to previous messageGo to next message
Eclipse UserFriend
Hi Matias,

Sure, you can use substitute-variables command for this purpose.

See the example below:

concat [substitute-variables "${system_property:user.home}" | str] "/.m2/repository"]

Kind regards,
Ulyana.
Re: How to use Environment variables in Context Settings [message #1702219 is a reply to message #1701957] Mon, 20 July 2015 13:34 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ulyana

What you wrote is ECL but if I try to use in a Context Preference it doesn't work.
I'm using a context Preference.
If there is no way to do this in a preference I have to create particular methods instead of using what is provided by the framework
Re: How to use Environment variables in Context Settings [message #1709561 is a reply to message #1702219] Tue, 29 September 2015 06:12 Go to previous message
Eclipse UserFriend
Hi Matias,

I'm afraid it's impossible to do it in a Preference Context, but you could set a global variable for that property value in ECL Script context, so you could use this variable anyway you need in a script.

Kind regards,
Ulyana.
Previous Topic:Window 0xa00003 (Eclipse) sets an MWM hint indicating it isn't resizable
Next Topic:RCPTT Maven Test Runner failing
Goto Forum:
  


Current Time: Sat Jun 21 16:38:49 EDT 2025

Powered by FUDForum. Page generated in 0.04465 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top