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
/*
	 * @see org.eclipse.jface.text.IPostSelectionProvider#addPostSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
	 */
	public void addPostSelectionChangedListener(ISelectionChangedListener listener) {
		if (fOutlineViewer != null)
			fOutlineViewer.addPostSelectionChangedListener(listener);
		else
			fPostSelectionChangedListeners.add(listener);
	}
	
	/*
	 * @see org.eclipse.jface.text.IPostSelectionProvider#removePostSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
	 */
	public void removePostSelectionChangedListener(ISelectionChangedListener listener) {
		if (fOutlineViewer != null)
			fOutlineViewer.removePostSelectionChangedListener(listener);
		else
			fPostSelectionChangedListeners.remove(listener);	
	}
	
	private void registerToolbarActions() {
		
		IToolBarManager toolBarManager= getSite().getActionBars().getToolBarManager();
		if (toolBarManager != null) {	
			toolBarManager.add(new ClassOnlyAction());		
			toolBarManager.add(new LexicalSortingAction());
			
			fMemberFilterActionGroup= new MemberFilterActionGroup(fOutlineViewer, "JavaOutlineViewer"); 
			fMemberFilterActionGroup.contributeToToolBar(toolBarManager);