protected void removeSelectedWorkingSets(List selection) {
IWorkingSetManager manager = WorkbenchPlugin.getDefault()
.getWorkingSetManager();
Iterator iter = selection.iterator();
while (iter.hasNext()) {
IWorkingSet workingSet = (IWorkingSet) iter.next();
if (getAddedWorkingSets().contains(workingSet)) {
getAddedWorkingSets().remove(workingSet);
} else {
IWorkingSet[] recentWorkingSets = manager
.getRecentWorkingSets();
for (int i = 0; i < recentWorkingSets.length; i++) {
if (workingSet.equals(recentWorkingSets[i])) {
getRemovedMRUWorkingSets().add(workingSet);
break;
}
}
getRemovedWorkingSets().add(workingSet);