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
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;
	}
}