Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Utility for resolving environment variables

How do I enable context of launch configuration? I am trying to actually resolve vars for program path for launch configuration, but project_name is not resolved.
(ProjName is)

On Tue, Oct 21, 2014 at 2:43 PM, Sergey Prigogin <eclipse.sprigogin@xxxxxxxxx> wrote:
Hi Mohamed,
project_name, project_loc and project_path variables are supported by org.eclipse.cdt.debug.internal.core.DebugStringVariableSubstitutor in a context of a launch configuration.

-sergey

On Tue, Oct 21, 2014 at 11:31 AM, Andrew Gvozdev <angvoz.dev@xxxxxxxxx> wrote:
Hi Alena,
${project_name} is context-sensitive variable, i.e. name of a project currently selected in UI. It is not CDT, but eclipse platform variable. See bug 260524 for justification why it was disabled in CDT. CDT Build provides ${ProjName} for the name of the project of the given configuration, and ${ProjDirPath} for its location.
For the list of supported variables it is probably the easiest to look at project properties->C/C++ Build->Build Variables and enable checkbox "Show system variables". Ironically, ${selected_resource_name} appears in the list.

Thanks,
Andrew

On Tue, Oct 21, 2014 at 1:05 PM, Alena Laskavaia <elaskavaia.cdt@xxxxxxxxx> wrote:
Speaking about resolver, why it cannot resolve ${project_name}? Configuration descriptor does belong to a project,
so this should know what project we are talking about. If this variable is not right one, which one would be to represent project
to which this build configuration belongs?

On Wed, Oct 15, 2014 at 2:23 PM, Andrew Gvozdev <angvoz.dev@xxxxxxxxx> wrote:
Hi Mohamed,
There is CdtVariableManager which will resolve environment variables, build variables, eclipse variables:

ICdtVariableManager varManager = CCorePlugin.getDefault().getCdtVariableManager();
String resolvedValue = varManager.resolveValue(value, "", null, cfgDescription);

Thanks,
Andrew


On Tue, Oct 14, 2014 at 2:00 PM, Azab, Mohamed <Mohamed_Azab@xxxxxxxxxx> wrote:

Hi,

 

I am trying to add support for using environment variables in some path fields, and I was wondering

if there is a utility somewhere in CDT or eclipse that substitutes environment variables in a string as StringVariableManager.performStringSubstitution() does

for eclipse variables?

 

Thanks,

Mohamed Azab

 


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev



Back to the top