mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 133881 - Make refreshing after building optional : Protect against a NPE and a ResourceException
This commit is contained in:
parent
91ab5f5876
commit
31c799769a
1 changed files with 8 additions and 2 deletions
|
@ -325,6 +325,9 @@ public class RefreshScopeManager {
|
|||
getProjectToResourcesMap();
|
||||
getResourcesToExclusionsMap();
|
||||
for(IProject project : fProjectToResourcesMap.keySet()) {
|
||||
if (!project.exists()) {
|
||||
continue;
|
||||
}
|
||||
// serialize all settings for the project to an XML document which we will use to persist
|
||||
// the data to a persistent resource property
|
||||
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
|
||||
|
@ -352,8 +355,11 @@ public class RefreshScopeManager {
|
|||
root.appendChild(resourceElement);
|
||||
|
||||
// populate the node with any exclusions
|
||||
for(RefreshExclusion exclusion : fResourceToExclusionsMap.get(resource)) {
|
||||
exclusion.persistData(doc, resourceElement);
|
||||
List<RefreshExclusion> exclusions = fResourceToExclusionsMap.get(resource);
|
||||
if (exclusions != null) {
|
||||
for(RefreshExclusion exclusion : exclusions) {
|
||||
exclusion.persistData(doc, resourceElement);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue