mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 08:45:44 +02:00
Additional fix for [Bug 197685] CfgScannerConfigInfo should getContainer with proper profileId
This commit is contained in:
parent
8d8572bbcb
commit
f530f86969
3 changed files with 10 additions and 4 deletions
|
@ -114,6 +114,8 @@ public interface IDiscoveredPathManager {
|
|||
|
||||
IDiscoveredPathInfo getDiscoveredInfo(IProject project, InfoContext context) throws CoreException;
|
||||
|
||||
IDiscoveredPathInfo getDiscoveredInfo(IProject project, InfoContext context, boolean defaultToProjectSettings) throws CoreException;
|
||||
|
||||
IDiscoveredPathInfo getDiscoveredInfo(IProject project) throws CoreException;
|
||||
void removeDiscoveredInfo(IProject project);
|
||||
void removeDiscoveredInfo(IProject project, InfoContext context);
|
||||
|
|
|
@ -140,11 +140,15 @@ public class DiscoveredPathManager implements IDiscoveredPathManager, IResourceC
|
|||
}
|
||||
|
||||
public IDiscoveredPathInfo getDiscoveredInfo(IProject project, InfoContext context) throws CoreException{
|
||||
return getDiscoveredInfo(project, context, true);
|
||||
}
|
||||
|
||||
public IDiscoveredPathInfo getDiscoveredInfo(IProject project, InfoContext context, boolean defaultToProjectSettings) throws CoreException{
|
||||
DiscoveredInfoHolder holder = getHolder(project, true);
|
||||
IDiscoveredPathInfo info = holder.getInfo(context);
|
||||
|
||||
if(info == null){
|
||||
info = loadPathInfo(project, context);
|
||||
info = loadPathInfo(project, context, defaultToProjectSettings);
|
||||
holder.setInfo(context, info);
|
||||
}
|
||||
|
||||
|
@ -160,12 +164,12 @@ public class DiscoveredPathManager implements IDiscoveredPathManager, IResourceC
|
|||
return holder;
|
||||
}
|
||||
|
||||
private IDiscoveredPathInfo loadPathInfo(IProject project, InfoContext context) throws CoreException {
|
||||
private IDiscoveredPathInfo loadPathInfo(IProject project, InfoContext context, boolean defaultToProjectSettings) throws CoreException {
|
||||
IDiscoveredPathInfo pathInfo = null;
|
||||
|
||||
IScannerConfigBuilderInfo2Set container = ScannerConfigProfileManager.createScannerConfigBuildInfo2Set(project);
|
||||
IScannerConfigBuilderInfo2 buildInfo = container.getInfo(context);
|
||||
if(buildInfo == null)
|
||||
if(buildInfo == null && defaultToProjectSettings)
|
||||
buildInfo = container.getInfo(new InfoContext(project));
|
||||
|
||||
if(buildInfo != null){
|
||||
|
|
|
@ -285,7 +285,7 @@ public class CfgDiscoveredPathManager implements IResourceChangeListener {
|
|||
}
|
||||
|
||||
private IDiscoveredPathManager.IDiscoveredPathInfo loadPathInfo(IProject project, IConfiguration cfg, ContextInfo cInfo) throws CoreException{
|
||||
IDiscoveredPathManager.IDiscoveredPathInfo info = fBaseMngr.getDiscoveredInfo(cfg.getOwner().getProject(), cInfo.fLoadContext.toInfoContext());
|
||||
IDiscoveredPathManager.IDiscoveredPathInfo info = fBaseMngr.getDiscoveredInfo(cfg.getOwner().getProject(), cInfo.fLoadContext.toInfoContext(), false);
|
||||
if(!DiscoveredScannerInfoStore.getInstance().hasInfo(project, cInfo.fLoadContext.toInfoContext(), info.getSerializable())){
|
||||
// setCachedPathInfo(context, info);
|
||||
ICfgScannerConfigBuilderInfo2Set container = cInfo.fCfgInfo;
|
||||
|
|
Loading…
Add table
Reference in a new issue