mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 133881 - Make refreshing after building optional
Fix ConcurrentModificationException in clearExclusionsForProject()
This commit is contained in:
parent
f88c1e14b6
commit
dff7d999fc
1 changed files with 8 additions and 2 deletions
|
@ -538,19 +538,25 @@ public class RefreshScopeManager {
|
|||
fResourceToExclusionsMap.put(resource, exclusions);
|
||||
}
|
||||
|
||||
public void clearAllExclusions() {
|
||||
public synchronized void clearAllExclusions() {
|
||||
if(fResourceToExclusionsMap != null)
|
||||
fResourceToExclusionsMap.clear();
|
||||
}
|
||||
|
||||
public synchronized void clearExclusionsForProject(IProject project) {
|
||||
getResourcesToExclusionsMap();
|
||||
List<IResource> resourcesToRemove = new LinkedList<IResource>();
|
||||
|
||||
for(IResource resource : fResourceToExclusionsMap.keySet()) {
|
||||
IProject project2 = resource.getProject();
|
||||
if(project2.equals(project)) {
|
||||
fResourceToExclusionsMap.remove(resource);
|
||||
resourcesToRemove.add(resource);
|
||||
}
|
||||
}
|
||||
|
||||
for(IResource resource : resourcesToRemove) {
|
||||
fResourceToExclusionsMap.remove(resource);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void clearDataForProject(IProject project) {
|
||||
|
|
Loading…
Add table
Reference in a new issue