Bug 18358 Clicking on methods in the hierarchy view shows the top of the file in the editor
Build 20020528 - 20020530. Clicking on a member or method in the hierarchy view with the "Show source of selected elements only" on, goes to the top of the file. This seems to be a regression as I saw this bug half a year ago. -Leon
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
public void selectReveal(ISelection selection) {
		ISelection javaSelection= convertSelection(selection);
	 	fViewer.setSelection(javaSelection, true);
	 	if (javaSelection != selection && !javaSelection.equals(fViewer.getSelection()))
	 		fViewer.setSelection(selection);
	}
	private ISelection convertSelection(ISelection s) {
		if (!(s instanceof IStructuredSelection))
			return s;
			
		Object[] elements= ((StructuredSelection)s).toArray();
		if (!containsResources(elements))
			return s;
				
		for (int i= 0; i < elements.length; i++) {
			Object o= elements[i];
			if (o instanceof IResource) {
				IJavaElement jElement= JavaCore.create((IResource)o);
				if (jElement != null) 
					elements[i]= jElement;
			}
		}
		
		return new StructuredSelection(elements);
	}
	
	private boolean containsResources(Object[] elements) {
		for (int i = 0; i < elements.length; i++) {
			if (elements[i] instanceof IResource)
				return true;