Bug 4329 No results If searched via Package view selection and dialog (1GLDN1X)
The package view initializes the Search dialog with the fully qualified name. This is not found when searching for declarations. Search via context menu in packages view works. ==> (Java) Search should first try to get the Java element and if that fails, display the the element name and not the fully qualified name. NOTES:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultCollector.java
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.search.ui.IContextMenuContributor;
import org.eclipse.search.ui.ISearchResultView;
import org.eclipse.search.ui.ISearchResultViewEntry;
import org.eclipse.search.ui.SearchUI;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.search.IJavaSearchResultCollector;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.actions.GroupContext;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil;
import org.eclipse.jdt.internal.ui.util.SelectionUtil;
public class JavaSearchResultCollector implements IJavaSearchResultCollector {
	private static final String MATCH= SearchMessages.getString("SearchResultCollector.match"); 
	private static final String MATCHES= SearchMessages.getString("SearchResultCollector.matches"); 
	private static final String DONE= SearchMessages.getString("SearchResultCollector.done"); 
	private static final String SEARCHING= SearchMessages.getString("SearchResultCollector.searching"); 
	private static final Integer POTENTIAL_MATCH_VALUE= new Integer(POTENTIAL_MATCH);
	
	private IProgressMonitor fMonitor;
	private IContextMenuContributor fContextMenu;
	private ISearchResultView fView;
	private JavaSearchOperation fOperation;
	private int fMatchCount= 0;
	private Integer[] fMessageFormatArgs= new Integer[1];
	
	private class ContextMenuContributor implements IContextMenuContributor {