Bug 51851 [navigation] Outliner is not updated correctly
build 20040212 1) create the following class public class X { int aaa } 2) place your cursor just after 'aaa' 3) type "bbb,ccc" the outliner contain -------------- X +-ccc : int -------------- 'aaa' and 'bbb' are missing (sometimes the problem does not occur) Java delta seems correct FIRING POST_CHANGE Delta [Thread [org.eclipse.jdt.internal.ui.text.JavaReconciler,1,main]]: <NONE> FIRING POST_RECONCILE Delta [Thread [org.eclipse.jdt.internal.ui.text.JavaReconciler,1,main]]: [Working copy] X.java[*]: {CHILDREN | FINE GRAINED} X[*]: {CHILDREN | FINE GRAINED} bbb[+]: {} ccc[+]: {}
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
/*
	 * @see Page#setFocus()
	 */
	public void setFocus() {
		if (fOutlineViewer != null)
			fOutlineViewer.getControl().setFocus();
	}
	
	/**
	 * Checks whether a given Java element is an inner type.
	 * 
	 * @param element the java element
	 * @return <code>true</code> iff the given element is an inner type
	 */
	private boolean isInnerType(IJavaElement element) {
		
		if (element != null && element.getElementType() == IJavaElement.TYPE) {
			IType type= (IType)element;
			try {
				return type.isMember();
			} catch (JavaModelException e) {
				IJavaElement parent= type.getParent();
				if (parent != null) {
					int parentElementType= parent.getElementType();
					return (parentElementType != IJavaElement.COMPILATION_UNIT && parentElementType != IJavaElement.CLASS_FILE);
				}
			}
		}