mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Bug 374442 - Refresh resource by build configuration - fix JUnit Tests
This commit is contained in:
parent
4fc35b2185
commit
48e2f643ac
1 changed files with 24 additions and 1 deletions
|
@ -485,12 +485,35 @@ public class RefreshScopeManager {
|
||||||
String configName = child.getAttribute(CONFIGURATION_ELEMENT_NAME);
|
String configName = child.getAttribute(CONFIGURATION_ELEMENT_NAME);
|
||||||
loadResourceData(workspaceRoot, project, configName, child.getChildren());
|
loadResourceData(workspaceRoot, project, configName, child.getChildren());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// else there are no children, and this is a "new" project.
|
||||||
|
// so initialize it.
|
||||||
|
if (children.length == 0) {
|
||||||
|
initializeConfigMap(project);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void initializeConfigMap(IProject project) {
|
||||||
|
getProjectToConfigurationToResourcesMap();
|
||||||
|
HashMap<String,HashMap<IResource, List<RefreshExclusion>>> configMap = fProjToConfToResToExcluMap.get(project);
|
||||||
|
if (configMap == null) {
|
||||||
|
configMap = new HashMap<String,HashMap<IResource, List<RefreshExclusion>>>();
|
||||||
|
CProjectDescriptionManager descriptionManager = CProjectDescriptionManager.getInstance();
|
||||||
|
ICProjectDescription projectDescription = descriptionManager.getProjectDescription(project, false);
|
||||||
|
ICConfigurationDescription cfgDescs[] = projectDescription.getConfigurations();
|
||||||
|
for (ICConfigurationDescription cfgDesc : cfgDescs) {
|
||||||
|
String configName = cfgDesc.getName();
|
||||||
|
HashMap<IResource, List<RefreshExclusion>> resourceMap = new HashMap<IResource, List<RefreshExclusion>>();
|
||||||
|
resourceMap.put(project, new LinkedList<RefreshExclusion>());
|
||||||
|
configMap.put(configName, resourceMap);
|
||||||
|
}
|
||||||
|
fProjToConfToResToExcluMap.put(project,configMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 5.4
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue