[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
AW: [cdt-dev] Removing built-in include paths / macros programmaticallynot working
|
Title: Removing built-in include paths / macros programmatically not working
Ok, an update to this confusion :)
The includes seem to be removed but the project explorer
view (include node) is not updated accordingly. When I restart the workbench the
removed include paths are not visible any more!
Is there a way to update the view
manually?
Hello guys,
I have figured out how to delete include paths /
macros through using ResourceDescription/LanguageSetting …
My problem now is : I use the auto discovery to
determine some include paths from a log file. Now I want to delete those
determined (built-in) and all other setting entries but it is not working with
this code:
ICProjectDescription cProjectDescr = CCorePlugin.getDefault().getProjectDescription(project,
true);
for (ICConfigurationDescription cConfigDescr : cProjectDescr.getConfigurations()) {
ICResourceDescription[] resDescrs
= cConfigDescr.getRootFolderDescription().getNestedResourceDescriptions();
for (ICLanguageSetting cLngSetting : cConfigDescr.getRootFolderDescription().getLanguageSettings()) {
cLngSetting.setSettingEntries(ICSettingEntry.INCLUDE_PATH, new
ICLanguageSettingEntry[0]);
cLngSetting.setSettingEntries(ICSettingEntry.MACRO, new
ICLanguageSettingEntry[0]);
}
for (ICResourceDescription resDescr : resDescrs)
{
cConfigDescr.removeResourceDescription(resDescr);
}
}
…
// Set switch that these settings
are always valid for the active configuration
cProjectDescr.setConfigurationRelations(ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE);
CoreModel.getDefault().setProjectDescription(project,
cProjectDescr);
Any advice from you?
Kind regards
Marko
Tomljenovic