Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Language Settings provider for compiler built-in settings(I want to modify the command specified in plugin.xml i.e. gcc -E -P -v -dD ${INPUTS} to gcc -E -P -v -dD ${INPUTS} option1 option2 programmatically based on some options.)
Language Settings provider for compiler built-in settings [message #1031745] Tue, 02 April 2013 06:26
Amol Deshpande is currently offline Amol DeshpandeFriend
Messages: 6
Registered: February 2012
Junior Member
I tried using the following code, but its not updating the command in 'Preprocessor Include Paths, Macros -> 'Providers' tab:

ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
if (currentConfig.getOwner().getProject() != null){
ICProjectDescription projectDescription =
mngr.getProjectDescription(currentConfig.getOwner().getProject(), true);

List<ILanguageSettingsProvider> providers;
ICConfigurationDescription cfgDescription =
projectDescription.getDefaultSettingConfiguration();
if (cfgDescription instanceof ILanguageSettingsProvidersKeeper) {
providers = new
ArrayList<ILanguageSettingsProvider>(((ILanguageSettingsProvidersKeeper)
cfgDescription).getLanguageSettingProviders());
for (ILanguageSettingsProvider provider : providers) {
if ((provider instanceof AbstractBuiltinSpecsDetector)) {
String cmd = ((AbstractBuiltinSpecsDetector) provider).getCommand();
cmd = cmd + Constants.SPACE + option1
(( AbstractBuiltinSpecsDetector) provider).setCommand(cmd);

Can anyone give me inputs regarding how to update the command programmatically?
Previous Topic:Error Parser Plugin within .cproject settings
Next Topic:Content Assist Doesn't Work With Function Pointer Parameters
Goto Forum:
  


Current Time: Thu Apr 25 12:31:54 GMT 2024

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

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

Back to the top