mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Preventive fix for 207317: Project Explorer freezes when selecting any Working Set
This commit is contained in:
parent
fc77ba4a0a
commit
d3fd594242
1 changed files with 9 additions and 2 deletions
|
@ -86,8 +86,12 @@ public class CElementWorkingSetUpdater implements IWorkingSetUpdater, IElementCh
|
|||
return fElements.indexOf(element);
|
||||
}
|
||||
public void set(int index, Object element) {
|
||||
fElements.set(index, element);
|
||||
fChanged= true;
|
||||
if (element == null) {
|
||||
remove(index);
|
||||
} else {
|
||||
fElements.set(index, element);
|
||||
fChanged= true;
|
||||
}
|
||||
}
|
||||
public void remove(int index) {
|
||||
if (fElements.remove(index) != null) {
|
||||
|
@ -283,6 +287,9 @@ public class CElementWorkingSetUpdater implements IWorkingSetUpdater, IElementCh
|
|||
IProject project= resource.getProject();
|
||||
remove= (project != null ? project.isOpen() : true) && !resource.exists();
|
||||
}
|
||||
} else if (element == null) {
|
||||
// should not happen anyway, but who knows?
|
||||
remove= true;
|
||||
}
|
||||
if (remove) {
|
||||
iter.remove();
|
||||
|
|
Loading…
Add table
Reference in a new issue