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/FindDeclarationsAction.java
/*
 * (c) Copyright IBM Corp. 2000, 2001.
 * All Rights Reserved.
 */
package org.eclipse.jdt.internal.ui.search;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IImportDeclaration;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IPackageDeclaration;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
public class FindDeclarationsAction extends ElementSearchAction {
	public FindDeclarationsAction() {
		this(SearchMessages.getString("Search.FindDeclarationAction.label"), new Class[] {IField.class, IMethod.class, IType.class, IPackageDeclaration.class, IImportDeclaration.class, IPackageFragment.class}); 
		setToolTipText(SearchMessages.getString("Search.FindDeclarationAction.tooltip")); 
	}
	public FindDeclarationsAction(String label, Class[] validTypes) {
		super(label, validTypes);
		setImageDescriptor(JavaPluginImages.DESC_OBJS_SEARCH_DECL);
	}
	protected JavaSearchOperation makeOperation(IJavaElement element) throws JavaModelException {
		if (element.getElementType() == IJavaElement.TYPE) {