Bug 76014 [search] Search for method declaration always use a string pattern [search]
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindDeclarationsAction.java
setText(SearchMessages.getString("Search.FindDeclarationAction.label")); 
		setToolTipText(SearchMessages.getString("Search.FindDeclarationAction.tooltip")); 
		setImageDescriptor(JavaPluginImages.DESC_OBJS_SEARCH_DECL);
		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.FIND_DECLARATIONS_IN_WORKSPACE_ACTION);
	}
	
	Class[] getValidTypes() {
		return new Class[] { IField.class, IMethod.class, IType.class, ICompilationUnit.class, IPackageDeclaration.class, IImportDeclaration.class, IPackageFragment.class, ILocalVariable.class, ITypeParameter.class };
	}
	
	int getLimitTo() {
		return IJavaSearchConstants.DECLARATIONS;
	}
	
	protected JavaSearchQuery createJob(IJavaElement element) throws JavaModelException {
		if (element.getElementType() == IJavaElement.METHOD) { 
			IMethod method= (IMethod)element;
			int searchFor= IJavaSearchConstants.METHOD;
			if (method.isConstructor())
				searchFor= IJavaSearchConstants.CONSTRUCTOR;
			IType type= getType(element);
			String pattern= PatternStrings.getUnqualifiedMethodSignature(method);
			return new JavaSearchQuery(new PatternQuerySpecification(pattern, searchFor, true, getLimitTo(), getScope(type), getScopeDescription(type)));
		}
		else
			return super.createJob(element);
	}
	
}