Class JavaSearchDocument
- Direct Known Subclasses:
MatchLocator.WorkingCopyDocument
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJavaSearchDocument(String documentPath, byte[] contents, SearchParticipant participant) JavaSearchDocument(String documentPath, SearchParticipant participant) JavaSearchDocument(ZipEntry zipEntry, org.eclipse.core.runtime.IPath zipFilePath, byte[] contents, SearchParticipant participant) -
Method Summary
Methods inherited from class SearchDocument
addIndexEntry, getParser, getParticipant, getPath, removeAllIndexEntries, requireIndexingResolvedDocument, setIndex, setParser, shouldIndexResolvedDocumentModifier and TypeMethodDescriptionvoidaddIndexEntry(char[] category, char[] key) Adds the given index entry (category and key) coming from this document to the index.final SearchParticipantReturns the participant that created this document.final StringgetPath()Returns the path to the original document to publicly mention in index or search results.voidRemoves all index entries from the index for the given document.voidFlags the document as requiring indexing after symbol and type resolution.voidvoidsetParser(SourceElementParser sourceElementParser) boolean
-
Field Details
-
byteContents
protected byte[] byteContents -
charContents
protected char[] charContents
-
-
Constructor Details
-
JavaSearchDocument
-
JavaSearchDocument
public JavaSearchDocument(ZipEntry zipEntry, org.eclipse.core.runtime.IPath zipFilePath, byte[] contents, SearchParticipant participant) -
JavaSearchDocument
-
-
Method Details
-
getByteContents
public byte[] getByteContents()Description copied from class:SearchDocumentReturns the contents of this document. Contents may be different from actual resource at corresponding document path, in case of preprocessing.This method must be implemented in subclasses.
Note: some implementation may choose to cache the contents directly on the document for performance reason. However, this could induce scalability issues due to the fact that collections of documents are manipulated throughout the search operation, and cached contents would then consume lots of memory until they are all released at once in the end.
- Specified by:
getByteContentsin classSearchDocument- Returns:
- the contents of this document,
or
nullif none
-
getCharContents
public char[] getCharContents()Description copied from class:SearchDocumentReturns the contents of this document. Contents may be different from actual resource at corresponding document path due to preprocessing.This method must be implemented in subclasses.
Note: some implementation may choose to cache the contents directly on the document for performance reason. However, this could induce scalability issues due to the fact that collections of documents are manipulated throughout the search operation, and cached contents would then consume lots of memory until they are all released at once in the end.
- Specified by:
getCharContentsin classSearchDocument- Returns:
- the contents of this document,
or
nullif none
-
getEncoding
Description copied from class:SearchDocumentReturns the encoding for this document.This method must be implemented in subclasses.
- Specified by:
getEncodingin classSearchDocument- Returns:
- the encoding for this document,
or
nullif none
-
getFile
public org.eclipse.core.resources.IFile getFile() -
toString
-