mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 10:45:37 +02:00
Additional fix for [Bug 178716] No way to get rid of built-in includes
This commit is contained in:
parent
e6f3b1fb7d
commit
1c2b3a8897
3 changed files with 32 additions and 12 deletions
|
@ -3562,7 +3562,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
|||
return getConfigurationForDescription(cfgDes, TEST_CONSISTANCE);
|
||||
}
|
||||
|
||||
public static IConfiguration getConfigurationForDescription(ICConfigurationDescription cfgDes, boolean checkConsistance){
|
||||
private static IConfiguration getConfigurationForDescription(ICConfigurationDescription cfgDes, boolean checkConsistance){
|
||||
if(cfgDes == null)
|
||||
return null;
|
||||
CConfigurationData cfgData = cfgDes.getConfigurationData();
|
||||
|
|
|
@ -125,7 +125,7 @@ public class EntryStore {
|
|||
}
|
||||
|
||||
public void storeEntries(int kind, ICLanguageSettingEntry[] entries){
|
||||
List newList = new ArrayList();
|
||||
List newList = new ArrayList(entries.length);
|
||||
newList.addAll(Arrays.asList(entries));
|
||||
if(fPreserveReadOnly){
|
||||
List oldList = getEntriesList(kind, false);
|
||||
|
|
|
@ -21,6 +21,7 @@ import org.eclipse.cdt.core.settings.model.extension.CLanguageData;
|
|||
import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultLanguageData;
|
||||
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
||||
import org.eclipse.cdt.core.settings.model.util.EntryStore;
|
||||
import org.eclipse.cdt.core.settings.model.util.KindBasedStore;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
|
||||
public class CLanguageSetting extends CDataProxy implements
|
||||
|
@ -257,6 +258,7 @@ public class CLanguageSetting extends CDataProxy implements
|
|||
// KindBasedStore nameSetStore = new KindBasedStore();
|
||||
int eKind;
|
||||
if(entries != null){
|
||||
if(entries.length != 0){
|
||||
for(int i = 0; i < entries.length; i++){
|
||||
ICLanguageSettingEntry entry = entries[i];
|
||||
eKind = entry.getKind();
|
||||
|
@ -264,6 +266,14 @@ public class CLanguageSetting extends CDataProxy implements
|
|||
store.addEntry(entry);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
int kinds[] = KindBasedStore.getLanguageEntryKinds();
|
||||
for(int i = 0; i < kinds.length; i++){
|
||||
if((kinds[i] & kind) != 0){
|
||||
store.storeEntries(kinds[i], new ICLanguageSettingEntry[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setSettingEntries(kind, data, store);
|
||||
|
@ -290,7 +300,9 @@ public class CLanguageSetting extends CDataProxy implements
|
|||
EntryStore store = new EntryStore();
|
||||
// KindBasedStore nameSetStore = new KindBasedStore();
|
||||
int eKind;
|
||||
|
||||
if(list != null){
|
||||
if(list.size() != 0){
|
||||
for(Iterator iter = list.iterator(); iter.hasNext();){
|
||||
ICLanguageSettingEntry entry = (ICLanguageSettingEntry)iter.next();
|
||||
eKind = entry.getKind();
|
||||
|
@ -298,6 +310,14 @@ public class CLanguageSetting extends CDataProxy implements
|
|||
store.addEntry(entry);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
int kinds[] = KindBasedStore.getLanguageEntryKinds();
|
||||
for(int i = 0; i < kinds.length; i++){
|
||||
if((kinds[i] & kind) != 0){
|
||||
store.storeEntries(kinds[i], new ICLanguageSettingEntry[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setSettingEntries(kind, data, store);
|
||||
|
|
Loading…
Add table
Reference in a new issue