Bug 101261 [type hierarchy] overriding a method from context menu > Source is not 5.0 aware
N20050622-0010 There's a hidden feature in the type hierarchy, that allows you to select a type XY and an inherited method, open the context menu and select Source > Override in 'XY'. This action has not been updated for 5.0 and creates a wrong method stub when generics are involved, e.g. here: public class Top<E> { public void method(E e) { } } class XY<ELEMENT> extends Top<ELEMENT> { } It creates (wrong formatting, 'E' instead of 'ELEMENT'): public void method(E e) { // TODO Auto-generated method stub super.method(e); } I'd suggest to drop this action, since the Override/Implement Methods... dialog and content assist do better jobs.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
if (fInputElement != null) {
			String handleIndentifier=  fInputElement.getHandleIdentifier();
			memento.putString(TAG_INPUT, handleIndentifier);
		}		
		memento.putInteger(TAG_VIEW, getViewIndex());
		memento.putInteger(TAG_ORIENTATION, fOrientation);	
		int weigths[]= fTypeMethodsSplitter.getWeights();
		int ratio= (weigths[0] * 1000) / (weigths[0] + weigths[1]);
		memento.putInteger(TAG_RATIO, ratio);
		
		ScrollBar bar= getCurrentViewer().getTree().getVerticalBar();
		int position= bar != null ? bar.getSelection() : 0;
		memento.putInteger(TAG_VERTICAL_SCROLL, position);
		IJavaElement selection= (IJavaElement)((IStructuredSelection) getCurrentViewer().getSelection()).getFirstElement();
		if (selection != null) {
			memento.putString(TAG_SELECTION, selection.getHandleIdentifier());
		}
		
		fWorkingSetActionGroup.saveState(memento);
			
		fMethodsViewer.saveState(memento);
		
		saveLinkingEnabled(memento);
	}
	
	private void saveLinkingEnabled(IMemento memento) {
		memento.putInteger(PreferenceConstants.LINK_TYPEHIERARCHY_TO_EDITOR, fLinkingEnabled ? 1 : 0);
	}
	/*
	 * Restores the type hierarchy settings from a memento.