Bug 9570 [Java Browsing] Types View not updated on deletion
1) Select a method in a type, i.e. all viewers are populated, editor is visible 2) Deactivate linking between active editor and navigator in workbench preferences 3) Deactivate auto build 3) Prespective>Show View>Navigator 4) Pin Navigator 5) Select the file of the previously selected method 6) Context Menu>Delete -> Method View flushed, Editor closed -> Type still visible in Types View ->Selecting Type possible and results in small red square in Methods View
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
try {
				element= ((IJavaElement)element).getUnderlyingResource();
			} catch (JavaModelException e) {
				return null;
			}
		}
		if (!(element instanceof IResource) || ((IResource)element).isPhantom()) {
			return null;
		}
		return (IResource)element;
	}
	private void setSelection(ISelection selection, boolean reveal) {
		if (selection != null && selection.equals(fViewer.getSelection()))
			return;
		fProcessSelectionEvents= false;
		fViewer.setSelection(selection, reveal);
		fProcessSelectionEvents= true;
	}
	/**
	 * Tries to find the given element in a workingcopy.
	 */
	protected static IJavaElement getWorkingCopy(IJavaElement input) {
		try {
			if (input instanceof ICompilationUnit)
				return EditorUtility.getWorkingCopy((ICompilationUnit)input);
			else
				return EditorUtility.getWorkingCopy(input, true);
		} catch (JavaModelException ex) {
		}
		return null;