Bug 112436 [search] is unkind to its participants
PDE is on its way to becoming a Java-seach-participant to show hits in manifest files. It's all going swimmingly, except that annotations are not being created when the manifest editor opens. The problem seems to be in JavaSearchResult#computeContainedMatches(...). This method returns an empty array if the file being opened is not a Java file. This clearly causes a problem for PDE who is solely interested in manifest files (manifest.mf and plugin.xml). So the editor opens but no pretty yellow arrows or blue markers.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResult.java
private Match[] computeContainedMatches(IAdaptable adaptable) {
		IJavaElement javaElement= (IJavaElement) adaptable.getAdapter(IJavaElement.class);
		Set matches= new HashSet();
		if (javaElement != null) {
			collectMatches(matches, javaElement);
		}
		IFile file= (IFile) adaptable.getAdapter(IFile.class);
		if (file != null) {
			collectMatches(matches, file);
		}
		if (!matches.isEmpty()) {
			return (Match[]) matches.toArray(new Match[matches.size()]);
		}
		return NO_MATCHES;
	}
	
	
	private void collectMatches(Set matches, IFile element) {
		Match[] m= getMatches(element);
		if (m.length != 0) {
			for (int i= 0; i < m.length; i++) {
				matches.add(m[i]);
			}
		}
	}
	
	private void collectMatches(Set matches, IJavaElement element) {
		Match[] m= getMatches(element);
		if (m.length != 0) {