Help Search Participant

Identifier:
org.eclipse.help.base.searchParticipant

Since:
3.5

Description:
This extension point should be used to add document content to the search index. There are two cases were you would want to add a search participant:
  1. To index documents registered with the help system's TOC that are not of the HTML format (e.g. XML). In this case, the participant must declare file extensions it can handle. It will be called to index each matching document. In this case, the participant has the plug-in scope.
  2. To index documents outside of the help system's TOC. In this case, the participant will be given a chance to index all the documents it knows about at once. In addition, the participant will be delegated the task of opening the search result because the help system will not know how to open the documents outside the TOC. In this case, the participant has global scope.

Search participants are associated with the plug-in the extension appears in. In order to reuse the participant in other plug-ins, binding should be used to reference them. This strategy prevents a plug-in from imposing its participant on the entire product for the file extensions it was registered with. By adding an explicit reference, the plug-in declares that it allows the referenced search participant to handle indexing of documents with those extensions. For documents that are not part of the TOC, there is no such danger. For this reason, they are global and binding should not be used.

Configuration Markup:

<!ELEMENT extension (searchParticipant | binding)+>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT searchParticipant EMPTY>

<!ATTLIST searchParticipant

id          CDATA #REQUIRED

name        CDATA #IMPLIED

icon        CDATA #IMPLIED

participant CDATA #REQUIRED

extensions  CDATA #IMPLIED

headless    (true | false) "false">


<!ELEMENT binding EMPTY>

<!ATTLIST binding

participantId IDREF #IMPLIED>


Examples:
The following is a sample usage of the extension point:


  <extension point="org.eclipse.help.base.searchParticipant">
   <searchParticipant id="org.eclipse.myGlobalParticipant"
     name="Global Participant"
     icon="icons/mydoc.gif"
     participant="org.eclipse.myPlugin.myPackage.MyGlobalParticipant"
     headless="true"/>
   <searchParticipant id="org.eclipse.myXYZParticipant"
     extensions="xyz"
     participant="org.eclipse.myPlugin.myPackage.MyXYZParticipant"/>
  </extension>

API Information:
The supplied search participant class must extend the org.eclipse.help.search.SearchParticipant abstract class.


Copyright (c) 2010, 2012 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html