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
}
				if (matchFile != null)
					return inputFile.equals(matchFile);
				else
					return false;
			} else if (editorInput instanceof IClassFileEditorInput) {
				return ((IClassFileEditorInput)editorInput).getClassFile().equals(je.getAncestor(IJavaElement.CLASS_FILE));
			}
		} else if (match.getElement() instanceof IFile) {
			if (editorInput instanceof IFileEditorInput) {
				return ((IFileEditorInput)editorInput).getFile().equals(match.getElement());
			}
		}
		return false;
	}
	/* (non-Javadoc)
	 * @see org.eclipse.search.ui.ISearchResult#getQuery()
	 */
	public ISearchQuery getQuery() {
		return fQuery;
	}
	
	synchronized IMatchPresentation getSearchParticpant(Object element) {
		return (IMatchPresentation) fElementsToParticipants.get(element);
	}
	boolean addMatch(Match match, IMatchPresentation participant) {
		Object element= match.getElement();
		if (fElementsToParticipants.get(element) != null) {
			
			JavaPlugin.log(new Status(IStatus.WARNING, JavaPlugin.getPluginId(), 0, "A second search participant was found for an element", null));