mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 02:35: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);
|
return getConfigurationForDescription(cfgDes, TEST_CONSISTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IConfiguration getConfigurationForDescription(ICConfigurationDescription cfgDes, boolean checkConsistance){
|
private static IConfiguration getConfigurationForDescription(ICConfigurationDescription cfgDes, boolean checkConsistance){
|
||||||
if(cfgDes == null)
|
if(cfgDes == null)
|
||||||
return null;
|
return null;
|
||||||
CConfigurationData cfgData = cfgDes.getConfigurationData();
|
CConfigurationData cfgData = cfgDes.getConfigurationData();
|
||||||
|
|
|
@ -125,7 +125,7 @@ public class EntryStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void storeEntries(int kind, ICLanguageSettingEntry[] entries){
|
public void storeEntries(int kind, ICLanguageSettingEntry[] entries){
|
||||||
List newList = new ArrayList();
|
List newList = new ArrayList(entries.length);
|
||||||
newList.addAll(Arrays.asList(entries));
|
newList.addAll(Arrays.asList(entries));
|
||||||
if(fPreserveReadOnly){
|
if(fPreserveReadOnly){
|
||||||
List oldList = getEntriesList(kind, false);
|
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.extension.impl.CDefaultLanguageData;
|
||||||
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
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.EntryStore;
|
||||||
|
import org.eclipse.cdt.core.settings.model.util.KindBasedStore;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
|
|
||||||
public class CLanguageSetting extends CDataProxy implements
|
public class CLanguageSetting extends CDataProxy implements
|
||||||
|
@ -257,11 +258,20 @@ public class CLanguageSetting extends CDataProxy implements
|
||||||
// KindBasedStore nameSetStore = new KindBasedStore();
|
// KindBasedStore nameSetStore = new KindBasedStore();
|
||||||
int eKind;
|
int eKind;
|
||||||
if(entries != null){
|
if(entries != null){
|
||||||
for(int i = 0; i < entries.length; i++){
|
if(entries.length != 0){
|
||||||
ICLanguageSettingEntry entry = entries[i];
|
for(int i = 0; i < entries.length; i++){
|
||||||
eKind = entry.getKind();
|
ICLanguageSettingEntry entry = entries[i];
|
||||||
if((kind & eKind) != 0 && (data.getSupportedEntryKinds() & eKind) != 0){
|
eKind = entry.getKind();
|
||||||
store.addEntry(entry);
|
if((kind & eKind) != 0 && (data.getSupportedEntryKinds() & eKind) != 0){
|
||||||
|
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]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -290,12 +300,22 @@ public class CLanguageSetting extends CDataProxy implements
|
||||||
EntryStore store = new EntryStore();
|
EntryStore store = new EntryStore();
|
||||||
// KindBasedStore nameSetStore = new KindBasedStore();
|
// KindBasedStore nameSetStore = new KindBasedStore();
|
||||||
int eKind;
|
int eKind;
|
||||||
|
|
||||||
if(list != null){
|
if(list != null){
|
||||||
for(Iterator iter = list.iterator(); iter.hasNext();){
|
if(list.size() != 0){
|
||||||
ICLanguageSettingEntry entry = (ICLanguageSettingEntry)iter.next();
|
for(Iterator iter = list.iterator(); iter.hasNext();){
|
||||||
eKind = entry.getKind();
|
ICLanguageSettingEntry entry = (ICLanguageSettingEntry)iter.next();
|
||||||
if((kind & eKind) != 0 && (data.getSupportedEntryKinds() & eKind) != 0){
|
eKind = entry.getKind();
|
||||||
store.addEntry(entry);
|
if((kind & eKind) != 0 && (data.getSupportedEntryKinds() & eKind) != 0){
|
||||||
|
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]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue