1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Bug 374442 - Refresh resource by build configuration - fix JUnit Tests

This commit is contained in:
David Salinas 2012-03-20 16:31:02 -04:00 committed by Vivian Kong
parent 4fc35b2185
commit 48e2f643ac

View file

@ -485,12 +485,35 @@ public class RefreshScopeManager {
String configName = child.getAttribute(CONFIGURATION_ELEMENT_NAME);
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
*/