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.core/src/org/eclipse/jdt/internal/junit/util/TestSearchEngine.java
IType[] types= cu.getAllTypes();
	
				for (int i= 0; i < types.length; i++) {
					if (hasSuiteMethod(types[i])  || isTestType(types[i]))
						result.add(types[i]);
				}
			} 
			else if (element instanceof IJavaElement) {
			    List testCases= findTestCases((IJavaElement)element, new SubProgressMonitor(pm, 7));
				List suiteMethods= searchSuiteMethods(new SubProgressMonitor(pm, 3), (IJavaElement)element);			
				while (!suiteMethods.isEmpty()) {
					if (!testCases.contains(suiteMethods.get(0))) {
						testCases.add(suiteMethods.get(0));
					}
					suiteMethods.remove(0);
				}
				result.addAll(testCases);
			}
	    } finally {
	        pm.done();
	    }
	}
	
	private static List findTestCases(IJavaElement element, IProgressMonitor pm) throws JavaModelException {
		List found = new ArrayList();
		IJavaProject javaProject= element.getJavaProject();
		IType testCaseType= javaProject.findType("junit.framework.TestCase"); 
		IType[] subtypes= javaProject.newTypeHierarchy(testCaseType, getRegion(javaProject), pm).getAllSubtypes(testCaseType);
			
		if (subtypes == null)