Bug 31208 occurrences in file: some names cannot be searched for
20030206 package dd; import java.util.List; public class A { A(List elements){ } } select List in the import - ok, finds matches select List in the constructor declaration - no matches strange, it's the same List
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/FindOccurrencesEngine.java
protected abstract CompilationUnit createAST();
	
	protected abstract IJavaElement getInput();
	
	protected abstract ISourceReference getSourceReference();
	
	protected abstract IResource getMarkerOwner() throws JavaModelException;
	
	protected abstract void addSpecialAttributes(Map attributes) throws JavaModelException;
	
	public String run(int offset, int length) throws JavaModelException {
		ISourceReference sr= getSourceReference();
		if (sr.getSourceRange() == null) {
			return SearchMessages.getString("FindOccurrencesEngine.noSource.text");  
		}
		
		final CompilationUnit root= createAST();
		if (root == null) {
			return SearchMessages.getString("FindOccurrencesEngine.cannotParse.text"); 
		}
		ASTNode node= NodeFinder.perform(root, offset, length);
		if (node instanceof VariableDeclarationFragment)
			node= ((VariableDeclarationFragment)node).getName();
		
		if (!(node instanceof Name)) {
			return SearchMessages.getString("FindOccurrencesEngine.noJavaElement.text"); 
		}
		final Name name= (Name)node;		
		final IBinding target= name.resolveBinding();
		final IDocument document= new Document(getSourceReference().getSource());