public interface Indexer
IndexingContext
. Before the indexing operation begins, startIndexing(oracle.ide.index.IndexingContext)
is called. Then, for each file that is indexed, index(oracle.ide.index.IndexingContext, oracle.ide.index.DataCollector)
is called. Finally, after the indexing is complete, endIndexing(oracle.ide.index.IndexingContext)
is called.
Note that because there is a separate Indexer instance for each IndexingContext, and because each indexing operation runs on a single thread, Indexer implementations do not need to be thread safe.
Modifier and Type | Method and Description |
---|---|
void |
endIndexing(IndexingContext context)
Indexing has finished on the given context.
|
void |
index(IndexingContext context, DataCollector data)
Index the current file in the context.
|
void |
startIndexing(IndexingContext context)
Indexing is about to start on the given context.
|
void startIndexing(IndexingContext context)
context
- the indexing contextvoid endIndexing(IndexingContext context)
context
- the indexing contextvoid index(IndexingContext context, DataCollector data)
IndexingContext.getTextBuffer()
is read locked at the time this method is called. Note that any Throwable thrown by implementations of this method is considered a bug and will be reported to the user.context
- the contextdata
- the data collector where the Indexer should store its data