@MimeLocation(subfolderName="CompletionCollectors") public interface CompletionCollector
@
MimeRegistration(mimeType = "text/foo", service = CompletionCollector.class)
public class FooCompletionCollector implements CompletionCollector {
...
}
Modifier and Type | Interface and Description |
---|---|
static class |
CompletionCollector.Builder
Builder for
Completion instances. |
Modifier and Type | Method and Description |
---|---|
boolean |
collectCompletions(Document doc,
int offset,
Completion.Context context,
java.util.function.Consumer<Completion> consumer)
Computes and collects completions for a document at a given offset.
|
static CompletionCollector.Builder |
newBuilder(String label)
Creates a builder for
Completion instances. |
boolean collectCompletions(@NonNull Document doc, int offset, @NullAllowed Completion.Context context, @NonNull java.util.function.Consumer<Completion> consumer)
doc
- a text documentoffset
- an offset inside the text documentcontext
- an optional completion contextconsumer
- an operation accepting collected completionsstatic CompletionCollector.Builder newBuilder(@NonNull String label)
Completion
instances.label
- the label of the completion