public static final class SymbolProvider.Result extends Object
Modifier and Type | Method and Description |
---|---|
void |
addResult(List<? extends SymbolDescriptor> symbolDescriptors)
Adds list of result descriptors.
|
void |
addResult(SymbolDescriptor symbolDescriptor)
Adds result descriptor.
|
void |
pendingResult()
Notify caller that a provider should be called again because
of incomplete or inaccurate results.
|
void |
setHighlightText(String textToHighlight)
Sets a text to highlight in the Go To Symbol panel.
|
void |
setMessage(String msg)
Optional message.
|
public void setMessage(String msg)
msg
- messagepublic void addResult(SymbolDescriptor symbolDescriptor)
symbolDescriptor
- symbol descriptor to be added to resultpublic void addResult(List<? extends SymbolDescriptor> symbolDescriptors)
symbolDescriptors
- symbol descriptor to be added to resultpublic void setHighlightText(@NonNull String textToHighlight)
SymbolProvider.Context.getText()
and SymbolProvider
has no need to call this method. When the
SymbolProvider
changes the text to search and uses a part of it just as a
restriction it has to call the method to specify the real search text.
For example Java SymbolProvider
splits the following text to search "*Util.toF"
to restriction regexp for type "*Util" and a new search text "toF". In order to let
the infrastructure correctly highlight found elements the Java SymbolProvider
needs to call SymbolProvider.Result.setHighlightText(java.lang.String)
.textToHighlight
- the text to highlightIllegalStateException
- when some result was already added or the highlight text
was already set.public void pendingResult()