Bug 39242 [misc] NPE in JavaOutlinePage.getMainType
Build: I20030618 I found this NullPointerException in my log file... I cannot figure out what I was editing as there is no local history that corresponds to that time. It is possible that I was browsing read-only types in the repository view. Log file attached.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
protected IType getMainType(IClassFile classFile) {
		try {
			IType type= classFile.getType();
			return type != null && type.exists() ? type : null;
		} catch (JavaModelException e) {
			return null;	
		}
	}
	
	/* (non-Javadoc)
	 * Method declared on Page
	 */
	public void init(IPageSite pageSite) {
		super.init(pageSite);
	}
	
	private void doPropertyChange(PropertyChangeEvent event) {
		if (fOutlineViewer != null) {
			if (PreferenceConstants.APPEARANCE_MEMBER_SORT_ORDER.equals(event.getProperty())) {
				fOutlineViewer.refresh(false);
			}
		}
	}	
	
	/*
	 * @see ISelectionProvider#addSelectionChangedListener(ISelectionChangedListener)
	 */
	public void addSelectionChangedListener(ISelectionChangedListener listener) {
		if (fOutlineViewer != null)
			fOutlineViewer.addSelectionChangedListener(listener);