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/OpenEditorAtLineAction.java
public void acceptSearchMatch(SearchMatch match) throws CoreException {
			IJavaElement enclosingElement= (IJavaElement) match.getElement();
			String resourceName= match.getResource().getName();
			if ((enclosingElement instanceof IType) && (resourceName.equals(fCUName)))
				fFound= enclosingElement;
		}
	}
		
	private int fLineNumber;
	private String fCUName;
	
	/**
	 * Constructor for OpenEditorAtLineAction.
	 */
	public OpenEditorAtLineAction(TestRunnerViewPart testRunner, String cuName, String className, int line) {
		super(testRunner, className);
		WorkbenchHelp.setHelp(this, IJUnitHelpContextIds.OPENEDITORATLINE_ACTION);
		fLineNumber= line;
		fCUName= cuName;
	}
		
	protected void reveal(ITextEditor textEditor) {
		if (fLineNumber >= 0) {
			try {
				IDocument document= textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
				textEditor.selectAndReveal(document.getLineOffset(fLineNumber-1), document.getLineLength(fLineNumber-1));
			} catch (BadLocationException x) {
				
			}