mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix for [Bug 197486] [Project Model] cannot set exclusion filter on ICSourceEntry for old-style projects
This commit is contained in:
parent
3b9217b9ca
commit
d7c915bbaa
3 changed files with 10 additions and 10 deletions
|
@ -228,7 +228,7 @@ public class CPathEntryTest extends BaseTestCase {
|
|||
|
||||
}
|
||||
|
||||
public void _testSetExclusionFilter_Bug197486() throws Exception {
|
||||
public void testSetExclusionFilter_Bug197486() throws Exception {
|
||||
ICProject testProject = null;
|
||||
try {
|
||||
testProject = CProjectHelper.createCProject("cpathtest", "none", IPDOMManager.ID_NO_INDEXER);
|
||||
|
|
|
@ -412,12 +412,12 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
|||
return null;
|
||||
}
|
||||
|
||||
public PathEntryResolveInfo getResolveInfo(ICProject cproject) throws CModelException{
|
||||
public PathEntryResolveInfo getResolveInfo(ICProject cproject, boolean useCache) throws CModelException{
|
||||
PathEntryResolveInfo info = (PathEntryResolveInfo)resolvedInfoMap.get(cproject);
|
||||
if(info == null){
|
||||
getResolvedPathEntries(cproject);
|
||||
info = (PathEntryResolveInfo)resolvedInfoMap.get(cproject);
|
||||
} else if(!getResolveInfoValidState(cproject)){
|
||||
} else if(!useCache || !getResolveInfoValidState(cproject)){
|
||||
Object[] resolved = getResolvedPathEntries(cproject, false, false);
|
||||
if(resolved != null)
|
||||
info = (PathEntryResolveInfo)resolved[1];
|
||||
|
|
|
@ -236,7 +236,7 @@ public class PathEntryConfigurationDataProvider extends
|
|||
throws CoreException {
|
||||
//TODO: check external/reference info here as well.
|
||||
if(!fFactory.isModified(base)){
|
||||
return createData(des, base, false);
|
||||
return createData(des, base, false, true);
|
||||
}
|
||||
|
||||
|
||||
|
@ -257,13 +257,13 @@ public class PathEntryConfigurationDataProvider extends
|
|||
|
||||
IPathEntry[] newEntries = (IPathEntry[])list.toArray(new IPathEntry[list.size()]);
|
||||
PathEntryManager.getDefault().setRawPathEntries(cproject, newEntries, new NullProgressMonitor());
|
||||
return createData(des, base, false);
|
||||
return createData(des, base, false, false);
|
||||
}
|
||||
|
||||
private CConfigurationData createData(ICConfigurationDescription des, CConfigurationData fallbackData, boolean modifiedFlag) throws CoreException {
|
||||
private CConfigurationData createData(ICConfigurationDescription des, CConfigurationData fallbackData, boolean modifiedFlag, boolean useCache) throws CoreException {
|
||||
CConfigurationData dataToReturn;
|
||||
try {
|
||||
dataToReturn = createData(des);
|
||||
dataToReturn = createData(des, useCache);
|
||||
} catch (Exception e){
|
||||
if(fallbackData != null)
|
||||
dataToReturn = fallbackData;
|
||||
|
@ -288,11 +288,11 @@ public class PathEntryConfigurationDataProvider extends
|
|||
return copy;
|
||||
}
|
||||
|
||||
private CfgData createData(ICConfigurationDescription des) throws CoreException{
|
||||
private CfgData createData(ICConfigurationDescription des, boolean useCache) throws CoreException{
|
||||
IProject project = des.getProjectDescription().getProject();
|
||||
CModelManager manager = CModelManager.getDefault();
|
||||
ICProject cproject = manager.create(project);
|
||||
PathEntryResolveInfo rInfo = PathEntryManager.getDefault().getResolveInfo(cproject);
|
||||
PathEntryResolveInfo rInfo = PathEntryManager.getDefault().getResolveInfo(cproject, useCache);
|
||||
|
||||
CfgData data = new CfgData(des.getId(), des.getName());
|
||||
data.initEmptyData();
|
||||
|
@ -350,7 +350,7 @@ public class PathEntryConfigurationDataProvider extends
|
|||
public CConfigurationData loadConfiguration(ICConfigurationDescription des,
|
||||
IProgressMonitor monitor)
|
||||
throws CoreException {
|
||||
return createData(des, null, false);
|
||||
return createData(des, null, false, true);
|
||||
}
|
||||
|
||||
public void removeConfiguration(ICConfigurationDescription des,
|
||||
|
|
Loading…
Add table
Reference in a new issue