Bug 85243 Invalid string pattern while searching on working set
Using 3.1 M4 build. Open editor on org.eclipse.jdt.internal.compiler.ast.Expression class and select computeConversion method. 1) Search for declarations in project => you get 5 instances in Search View: OK 2) Create a working set "jdt-core" with org.eclipse.jdt.core project 3) Search for declarations in working set "jdt-core" => you get 0 instances: KO (I expect same result than search in project as scope is identical) Looking at what happens, in step 1) SearchPattern is created using a IJavaElement, so there's no problem. But step 3) creates a SearchPattern using following string: "computeConversion(Scope, Scope, Scope)" which does not match the selected method! Debugging jdt-ui code, problems is in for loop of PatternStrings#getUnqualifiedMethodSignature(IMethod, boolean) method: String typeSig= Signature.toString(types[0]); should be String typeSig= Signature.toString(types[i]); instead...
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/PatternStrings.java
/*******************************************************************************
 * Copyright (c) 2000, 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.ui.search;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.ui.JavaElementLabels;
public class PatternStrings {