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
IWorkbenchPage[] pages= windows[i].getPages();
			for (int j= 0; j < pages.length; j++) {
				pages[j].addPartListener(fTracker);
			}
		}
		fJavaListener= new IElementChangedListener() {
			public void elementChanged(ElementChangedEvent event) {
				if (fWorkingSet == null)
					return;
				processDelta(event.getDelta());
			}
			public void processDelta(IJavaElementDelta delta) {
				IJavaElement element= delta.getElement();
				int type= element.getElementType();
				int kind= delta.getKind();
				int flags= delta.getFlags();
				if (type == IJavaElement.COMPILATION_UNIT) {
					if (kind == IJavaElementDelta.CHANGED && (flags & IJavaElementDelta.F_PRIMARY_RESOURCE) != 0) {
						elementSaved(element);
					} else if (kind == IJavaElementDelta.REMOVED) {
						if ((delta.getFlags() & IJavaElementDelta.F_MOVED_TO) != 0) {
							elementMoved(element, delta.getMovedToElement());
						} else {
							elementRemoved(element);
						}
					}
				} else {
					IJavaElementDelta[] children= delta.getAffectedChildren();
					for (int i= 0; i < children.length; i++) {
						processDelta(children[i]);