public static final class TypeProvider.Result extends Object
Modifier and Type | Method and Description |
---|---|
void |
addResult(List<? extends TypeDescriptor> typeDescriptors)
Adds list of result descriptors.
|
void |
addResult(TypeDescriptor typeDescriptor)
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 Type panel.
|
void |
setMessage(String msg)
Optional message.
|
public void setMessage(String msg)
msg
- messagepublic void addResult(@NonNull TypeDescriptor typeDescriptor)
typeDescriptor
- type descriptor to be added to resultpublic void addResult(@NonNull List<? extends TypeDescriptor> typeDescriptors)
typeDescriptors
- type descriptor to be added to resultpublic void pendingResult()
public void setHighlightText(@NonNull String textToHighlight)
TypeProvider.Context.getText()
and TypeProvider
has no need to call this method. When the
TypeProvider
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 TypeProvider
splits the following text to search "java.lang.Str"
to restriction regexp for package "java.lang" and a new search text "Str". In order to let
the infrastructure correctly highlight found elements the Java TypeProvider
needs to call TypeProvider.Result.setHighlightText(java.lang.String)
.textToHighlight
- the text to highlightIllegalStateException
- when some result was already added or the highlight text
was already set.