Bug 49869 NPE showing Type Hierarchies history after layout change
M6 - I retrieve the org.eclipse.swt project from cvs, though this should happen with any java project - select the project in the Package Explorer and press F4 to open a hierarchy view on it - drop down the hierarchy view's Previous Type Hierarchies tool item, it will show 1+ item(s), good - drop down the hierarchy view's dropdown (ie.- the down-pointing triangle in the toolbar) and select Layout -> Horizontal View Orientation - now try to drop down the Previous Type Hierarchies tool item and the attached exception will occur
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/HistoryDropDownAction.java
new MenuItem(fMenu, SWT.SEPARATOR);
			Action others= new HistoryListAction(fHierarchyView);
			others.setChecked(checked);
			addActionToMenu(fMenu, others);
		}
		return fMenu;
	}
	
	private boolean addEntries(Menu menu, IJavaElement[] elements) {
		boolean checked= false;
		
		int min= Math.min(elements.length, RESULTS_IN_DROP_DOWN);
		for (int i= 0; i < min; i++) {
			HistoryAction action= new HistoryAction(fHierarchyView, elements[i]);
			action.setChecked(elements[i].equals(fHierarchyView.getInputElement()));
			checked= checked || action.isChecked();
			addActionToMenu(menu, action);
		}	
		return checked;
	}
	
	protected void addActionToMenu(Menu parent, Action action) {
		ActionContributionItem item= new ActionContributionItem(action);
		item.fill(parent, -1);
	}
	public void run() {
		(new HistoryListAction(fHierarchyView)).run();
	}
}