Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Environment variables in external tools

Hi Jantje,

The terminology around these variables always causes me much confusion due to the overloaded use of variable and specifically environment variable.

As you may have discovered, "env_var" is for accessing environment variables of the Java process itself (i.e the OS environment variables when Java/Eclipse was launched), the env_var has no knowledge of anything after Eclipse starts, nor any context information. From your comment it does not sound like SLOEBER_HOME (and build.mcu) is from the OS, but rather provided in your code base? 

To make matters worse, environment variables defined in the Environment tab of a launch configuration cannot be referenced using "env_var" in other tabs - see this old bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=170789

Anyway, I am all for a new variable provider that allows accessing such information provided by CDT because I don't know of any existing ones (there may be, perhaps someone else on the list knows?). 

Jonah


~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Fri, 23 Jul 2021 at 20:51, Jan Baeyens <jan@xxxxxxxxxx> wrote:

Hi team

I was trying to use CDT environment variables in external tools but I failed to get this to work.

I tried using the env_var variable but that did not even return the SLOEBER_HOME system environment variable

Looking into the CDT code I found following resolvers

CBuildDirectoryResolver
ConfigurationInfoVariableResolver (extended by ConfigurationDescriptionVariableResolver ConfigurationNameVariableResolver)
PathEntryVariableResolver

None of these seem to resolve CDT environment variables.

Is there a way to access the environment variables provided by an implementation of IConfigurationEnvironmentVariableSupplier?

If not and I make one; is there an interest to add it to CDT?

Best regards

Jantje

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top