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
IType type= (IType)element;
			int searchFor= IJavaSearchConstants.TYPE;
			String pattern= PrettySignature.getUnqualifiedTypeSignature(type);
			return new JavaSearchOperation(JavaPlugin.getWorkspace(), pattern,
				searchFor, getLimitTo(), getScope(type), getScopeDescription(type), getCollector());
		}
		else if (element.getElementType() == IJavaElement.METHOD) {
			IMethod method= (IMethod)element;
			int searchFor= IJavaSearchConstants.METHOD;
			if (method.isConstructor())
				searchFor= IJavaSearchConstants.CONSTRUCTOR;
			IType type= method.getDeclaringType();
			String pattern= PrettySignature.getUnqualifiedMethodSignature(method);
			return new JavaSearchOperation(JavaPlugin.getWorkspace(), pattern,
				searchFor, getLimitTo(), getScope(type), getScopeDescription(type), getCollector());
		}
		else
			return super.makeOperation(element);
	}
	protected int getLimitTo() {
		return IJavaSearchConstants.DECLARATIONS;
	}
	protected boolean shouldUserBePrompted() {
		return false;
	}
	
	protected String getScopeDescription(IType type) {
		return super.getScopeDescription(type);
	}
}