public interface IMatchPresentation
Each IMatchPresentation
is associated with a particular IQueryParticipant
. The IMatchPresentation
will only be asked to handle elements and matches which its IQueryParticipant
contributed to the
search result. If two search participants report matches against the same element, one of them will
be chosen to handle the element.
Clients may implement this interface.
Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.Modifier and Type | Method and Description |
---|---|
ILabelProvider |
createLabelProvider()
Creates a new instance of a label provider for elements that have been contributed
to a search result by the corresponding query participant.
|
void |
showMatch(Match match,
int currentOffset,
int currentLength,
boolean activate)
Opens an editor on the given element and selects the given range of text.
|
ILabelProvider createLabelProvider()
void showMatch(Match match, int currentOffset, int currentLength, boolean activate) throws PartInitException
org.eclipse.core.filebuffers.ITextFileBufferManager
).
When a file buffer is saved, the current positions are written back to the
match.
If the activate
parameter is true
the opened editor
should have be activated. Otherwise the focus should not be changed.match
- The match to show.currentOffset
- The current start offset of the match.currentLength
- The current length of the selection.activate
- Whether to activate the editor the match is shown in.PartInitException
- If an editor can't be opened.Copyright (c) IBM Corp. and others 2000, 2016. All Rights Reserved.