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/JavaSearchPage.java
}
					if (elements != null && elements.length > 0) {
						if (elements.length == 1)
							fJavaElement= elements[0];
						else
							fJavaElement= chooseFromList(elements);
						if (fJavaElement != null)
							return determineInitValuesFrom(fJavaElement);
					}
				}
			}
		}
		return null;
	}
	
	private ICodeAssist getCodeAssist(IEditorPart editorPart) {
		IEditorInput input= editorPart.getEditorInput();
		if (input instanceof ClassFileEditorInput)
			return ((ClassFileEditorInput)input).getClassFile();
		IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();				
		return manager.getWorkingCopy(input);
	}
	private SearchPatternData trySelection(ISelection selection) {
		SearchPatternData result= null;
		if (selection == null)
			return result;
		Object o= null;
		if (selection instanceof IStructuredSelection)
			o= ((IStructuredSelection)selection).getFirstElement();
		if (o instanceof IJavaElement) {