Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Expanding CDT build variables programmatically

I eventually found an answer myself.
The most general way I found uses an ICConfigurationDescription, and expands build variables in a given "value" string using:

CCorePlugin.getDefault().getCdtVariableManager().resolveValue(String value, String nonexistentMacrosValue, String listDelimiter, ICConfigurationDescription cfg)

This will work for either Eclipse dynamic variables (e.g. ${workspace_loc}) and CDT's own build variables (${ProjDirPath}, etc).

Thanks,

/m


-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Mario Pierro
Sent: den 15 maj 2014 14:31
To: CDT General developers list.
Subject: [cdt-dev] Expanding CDT build variables programmatically

Hello,

What is the correct way of programmatically expanding CDT build variables like ${ProjDirPath}?
I have tried to use 

VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution()

without much luck so far - it works though for e.g. workspace_loc and other Eclipse dynamic variables.
I would like to avoid resorting to internal APIs if possible.

Thank you!

/Mario Pierro

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top