Bug 81421 Closing a project with open editors leaves stale elements in Package Explorer's working set layout
I20041216-0800 Closing a project with open editors leaves stale elements in Package Explorer's working sets mode. This only affects CUs not normal resources.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/HistoryWorkingSetUpdater.java
elementRemoved(file);
								}
							}
							return false;
						}
					});
				} catch (CoreException e) {
				}
			}
		};
		JavaCore.addElementChangedListener(fJavaListener, ElementChangedEvent.POST_CHANGE);
	}
	
	private void elementSaved(IAdaptable element) {
		if (!fOpenFiles.contains(element))
			return;
		updateHistory(element);
	}
	
	private void elementRemoved(IAdaptable element) {
		fOpenFiles.remove(element);
		List elements= getElements();
		if (elements.remove(element)) {
			setElements(elements);
		}
	}
	
	private void elementMoved(IAdaptable oldElement, IAdaptable newElement) {
		List elements= getElements();
		int index= elements.indexOf(oldElement);