Bug 32414 Outline inconsistent with source, and showing blank entries
build I20030220 After doing some edits to a file, the outline had some blank entries at the end. Also, clicking on the some of the remaining items jumped to the wrong place in the source. See attached screen shot. Edits I was doing included pasting methods in from another CU and deleting methods in the text (all in text editor, not outline).
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
};
		JavaPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(fPropertyChangeListener);
	}
   
	/**
	 * Returns the primary type of a compilation unit (has the same
	 * name as the compilation unit).
	 * 
	 * @param compilationUnit the compilation unit
	 * @return returns the primary type of the compilation unit, or
	 * <code>null</code> if is does not have one
	 */
	protected IType getMainType(ICompilationUnit compilationUnit) {
		String name= compilationUnit.getElementName();
		int index= name.indexOf('.');
		if (index != -1)
			name= name.substring(0, index);
		IType type= compilationUnit.getType(name);
		return type.exists() ? type : null;
	}
	/**
	 * Returns the primary type of a class file.
	 * 
	 * @param classFile the class file
	 * @return returns the primary type of the class file, or <code>null</code>
	 * if is does not have one
	 */
	protected IType getMainType(IClassFile classFile) {
		try {
			IType type= classFile.getType();