mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 01:05:38 +02:00
Additional fix for [Bug 178716] No way to get rid of built-in includes
This commit is contained in:
parent
1a10e62066
commit
6b8088e349
1 changed files with 29 additions and 31 deletions
|
@ -135,16 +135,17 @@ public class EntryStorage {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
SettingLevel level = fSettings.getLevels()[0];
|
SettingLevel level = fSettings.getLevels()[0];
|
||||||
ICLanguageSettingEntry usrEntries[] = level.getEntries();
|
|
||||||
if(usrEntries.length != 0){
|
|
||||||
IOption options[] = fLangData.getOptionsForKind(fKind);
|
IOption options[] = fLangData.getOptionsForKind(fKind);
|
||||||
if(options.length > 0){
|
if(options.length != 0){
|
||||||
|
ICLanguageSettingEntry usrEntries[] = level.getEntries();
|
||||||
IOption option = options[0];
|
IOption option = options[0];
|
||||||
String optValue[] = new String[usrEntries.length];
|
String optValue[] = new String[usrEntries.length];
|
||||||
|
if(usrEntries.length != 0){
|
||||||
for(int i = 0; i < usrEntries.length; i++){
|
for(int i = 0; i < usrEntries.length; i++){
|
||||||
ICLanguageSettingEntry entry = usrEntries[i];
|
ICLanguageSettingEntry entry = usrEntries[i];
|
||||||
optValue[i] = entryValueToOption(entry);
|
optValue[i] = entryValueToOption(entry);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ITool tool = fLangData.getTool();
|
ITool tool = fLangData.getTool();
|
||||||
IResourceInfo rcInfo = tool.getParentResourceInfo();
|
IResourceInfo rcInfo = tool.getParentResourceInfo();
|
||||||
|
@ -155,15 +156,12 @@ public class EntryStorage {
|
||||||
ManagedBuildManager.setOption(rcInfo, tool, option, new String[0]);
|
ManagedBuildManager.setOption(rcInfo, tool, option, new String[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(level.containsOverrideInfo()){
|
options = fLangData.getUndefOptionsForKind(fKind);
|
||||||
IOption options[] = fLangData.getUndefOptionsForKind(fKind);
|
|
||||||
if(options.length != 0){
|
if(options.length != 0){
|
||||||
Set set = level.getOverrideSet();
|
Set set = level.containsOverrideInfo() ? level.getOverrideSet() : null;
|
||||||
|
String[] optValue = set != null ? (String[])set.toArray(new String[set.size()]) : new String[0];
|
||||||
IOption option = options[0];
|
IOption option = options[0];
|
||||||
String[] optValue = (String[])set.toArray(new String[set.size()]);
|
|
||||||
|
|
||||||
ITool tool = fLangData.getTool();
|
ITool tool = fLangData.getTool();
|
||||||
IResourceInfo rcInfo = tool.getParentResourceInfo();
|
IResourceInfo rcInfo = tool.getParentResourceInfo();
|
||||||
IOption newOption = ManagedBuildManager.setOption(rcInfo, tool, option, optValue);
|
IOption newOption = ManagedBuildManager.setOption(rcInfo, tool, option, optValue);
|
||||||
|
@ -172,7 +170,7 @@ public class EntryStorage {
|
||||||
if(options[i] != newOption)
|
if(options[i] != newOption)
|
||||||
ManagedBuildManager.setOption(rcInfo, tool, option, new String[0]);
|
ManagedBuildManager.setOption(rcInfo, tool, option, new String[0]);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue