Bug 79790 [1.5][search] Need to distinguish between raw and restricted search in the case of instantiated types
I20041130 Code select now return a special IJavaElement when resolving code list List<String>. If we hand such an element over to the search engine we need means to distinguish between searches for List and searches for List<String>. One idea is to add additional flags to SearchPattern.
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestMethodSelectionDialog.java
ErrorDialog.openError(getParentShell(), JUnitMessages.getString("TestMethodSelectionDialog.error.notfound.title"), JUnitMessages.getString("TestMethodSelectionDialog.error.notfound.message"), e.getStatus()); 
			return null;
		}
		if (result.size() == 0) {
			String msg= JUnitMessages.getFormattedString("TestMethodSelectionDialog.test_not_found", JUnitPlugin.TEST_INTERFACE_NAME); 
			MessageDialog.openError(getParentShell(), JUnitMessages.getString("TestMethodSelectionDialog.select_dialog.title"), msg); 
			return null;
		}
		if (result.size() == 1)
			return (IType)result.toArray()[0];
		
		return selectTestType(result);
	}
	
	private IType selectTestType(Set result) {
		ILabelProvider labelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_PARAMETERS | JavaElementLabelProvider.SHOW_ROOT);
		ElementListSelectionDialog dialog= new ElementListSelectionDialog(getParentShell(), labelProvider);
		dialog.setTitle(JUnitMessages.getString("TestMethodSelectionDialog.dialog.title"));  
		String msg= JUnitMessages.getFormattedString("TestMethodSelectionDialog.testproject", "junit.framework.Test"); 
		dialog.setMessage(msg);
		IJavaProject[] projects= new IJavaProject[result.size()];
		IType[] testTypes= (IType[]) result.toArray(new IType[result.size()]);
		for (int i= 0; i < projects.length; i++) 
			projects[i]= testTypes[i].getJavaProject();
		dialog.setElements(projects);
		if (dialog.open() == Window.CANCEL)	
			return null;
		IJavaProject project= (IJavaProject) dialog.getFirstResult();
		for (int i= 0; i < testTypes.length; i++) {
			if (testTypes[i].getJavaProject().equals(project))