Bug 57036 New Search shows annotations in internal jar (for matches in class file)
3.0 M8 - import org.junit as binary plug-in project - search for references to type "TestListener" - select the library junit.jar - from context menu, choose Open With > Text Editor -> invalid "matches" are shown in the editor Problem is probably in JavaSearchResult#getFile(Object), which should not getUnderlyingResource() for JavaElements not in a ICompilationUnit.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResult.java
return false;
		}
		fElementsToParticipants.put(element, participant);
		addMatch(match);
		return true;
	}
	
	public void removeAll() {
		synchronized(this) {
			fElementsToParticipants.clear();
		}
		super.removeAll();
	}
	
	public void removeMatch(Match match) {
		synchronized(this) {
			if (getMatchCount(match.getElement()) == 1)
				fElementsToParticipants.remove(match.getElement());
		}
		super.removeMatch(match);
	}
	public IFileMatchAdapter getFileMatchAdapter() {
		return this;
	}
	
	public IEditorMatchAdapter getEditorMatchAdapter() {
		return this;
	}
}