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/util/TestSearchEngine.java
throw new JavaModelException(new CoreException(new Status(IStatus.ERROR, JUnitPlugin.PLUGIN_ID, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE, JUnitMessages.getString("JUnitBaseLaunchConfiguration.error.notests"), null))); 
		for (int i = 0; i < subtypes.length; i++) {
		    try {
		        if (element.equals(subtypes[i].getAncestor(element.getElementType())) && hasValidModifiers(subtypes[i]))
		            found.add(subtypes[i]);
		    } catch (JavaModelException e) {
		        JUnitPlugin.log(e.getStatus());
		    }
		}
		return found;
	}
	
	private static Region getRegion(IJavaProject javaProject) throws JavaModelException{
	    Region region = new Region();
	    IJavaElement[] elements= javaProject.getChildren();
	    for(int i=0; i<elements.length; i++) {
	        if (((IPackageFragmentRoot)elements[i]).isArchive())
	            continue;
	        region.add(elements[i]);
	    }
	    return region;
	}
	private static Object computeScope(Object element) throws JavaModelException {
		if (element instanceof IFileEditorInput)
			element= ((IFileEditorInput)element).getFile();
		if (element instanceof IResource)
			element= JavaCore.create((IResource)element);
		if (element instanceof IClassFile) {
			IClassFile cf= (IClassFile)element;
			element= cf.getType();