|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.help.search.LuceneSearchParticipant
Participant in the help search. A plug-in can contribute instance of LuceneSearchParticipant to
"org.eclipse.help.search.luceneSearchParticipant"
extension point. Search
participant is responsible for adding the content of documents it is responsible for into the
help system's search index. Once in the index, the document becomes searchable and can produce
search hits. There are two ways of using the participant:
Constructor Summary | |
---|---|
LuceneSearchParticipant()
|
Method Summary | |
---|---|
abstract IStatus |
addDocument(ISearchIndex index,
String pluginId,
String name,
URL url,
String id,
org.apache.lucene.document.Document doc)
Adds the document to the search index. |
protected void |
addTitle(String title,
org.apache.lucene.document.Document doc)
A utility method that adds a document title to the Lucene document. |
void |
clear()
Signals to the participant that the indexing operation has finished and that cached resources can be disposed to free up memory. |
Set |
getAllDocuments(String locale)
Returns all the documents that this participant knows about. |
Set |
getContributingPlugins()
Returns a set of identifiers of plug-ins that contribute indexable documents. |
String |
getId()
Returns the unique identifier of this participant. |
void |
init(String id)
Initializes the participant with the unique identifier from the registry. |
boolean |
open(String id)
Help system does not know how to open documents outside of the system's TOC. |
protected static String |
resolveVariables(String pluginId,
String fileName,
String locale)
A utility method that resolves a file name that contains '$'-based substitution variables. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LuceneSearchParticipant()
Method Detail |
public final void init(String id)
id
- the unique identifier of this participantpublic String getId()
public abstract IStatus addDocument(ISearchIndex index, String pluginId, String name, URL url, String id, org.apache.lucene.document.Document doc)
index
- the abstract representation of the help index that is currently running. Indexing
known file types in participants that manage documents outside the TOC can be
delegated to the index.pluginId
- the plug-in that owns the documentname
- the name of the document to indexurl
- the url of the document to indexid
- the unique id associated with this documentdoc
- the Lucene document to add searchable content to
Status.OK
.public Set getAllDocuments(String locale)
locale
- the index locale
public Set getContributingPlugins()
protected static String resolveVariables(String pluginId, String fileName, String locale)
pluginId
- the identifier of the originating plug-infileName
- the source file namelocale
- the locale to use when resolving nl variable
protected void addTitle(String title, org.apache.lucene.document.Document doc)
title
- the title stringdoc
- the Lucene documentpublic boolean open(String id)
getAllDocuments(String)
have a chance to open the document when it is part of
the search results. The default implementation returns false
indicating that
the help system should open the document. In most cases this is wrong for most of XML files
that are in some interesting way.
id
- a participant-specific identifier that completely represents a search result
true
if the file has been opened correctly or false
to
allow the help system to try to open the document.public void clear()
dispose
).
|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.