Bug 5048 Too many declarations in hierarchy of (jdt)Parser.initialize()
Build 204 In a self-hosting workspace, open type Parser (from JDT), and select its initialize() method in outliner. Request to search declarations in hierarchy, it incorrectly finds over 100 matches, as if it was not taking into account the accurate location of the Parser.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/FindHierarchyDeclarationsAction.java
public FindHierarchyDeclarationsAction() {
		super(SearchMessages.getString("Search.FindHierarchyDeclarationsAction.label"), new Class[] {IField.class, IMethod.class, IType.class} ); 
		setToolTipText(SearchMessages.getString("Search.FindHierarchyDeclarationsAction.tooltip")); 
	}
	
	protected IJavaSearchScope getScope(IType type) throws JavaModelException {
		ICompilationUnit cu= type.getCompilationUnit();
			if (cu != null && cu.isWorkingCopy()) {
				type= (IType)cu.getOriginal(type);
			}
		return SearchEngine.createHierarchyScope(type);
	}
	
	protected boolean shouldUserBePrompted() {
		return true;
	}
	protected String getScopeDescription(IType type) {
		return SearchMessages.getFormattedString("HierarchyScope", new String[] {type.getElementName()}); 
	}
}