package completion
- Alphabetic
- Public
- All
Type Members
- trait AlphabeticalSortingSupport extends RegexCompletionSupport
- trait CompletionExpansionSupport extends RegexCompletionSupport
-
trait
CompletionSupport extends Parsers with CompletionTypes
CompletionSupport
adds completion capability to parsers.CompletionSupport
adds completion capability to parsers.When mixed-in, this trait extends the scala.util.parsing.combinator.Parsers.Parser type with the abstract method com.nexthink.utils.parsing.combinator.completion.CompletionSupport.Parser#completions which returns a instance of com.nexthink.utils.parsing.combinator.completion.CompletionTypes.Completions for a certain input.
Combinators are overloaded to cover the additional completion aspect, so that no change is required in the grammar.
Note that the derived trait com.nexthink.utils.parsing.combinator.completion.RegexCompletionSupport can be mixed-in with
RegexParsers
to automatically obtain completion behavior for string literals.A set of additional operators allow defining completions and specifying structural properties of completions (tag, score, meta, etc.) for a
Parser
. -
trait
CompletionTypes extends AnyRef
Collection of data types allowing definition of structured parser completions.
Collection of data types allowing definition of structured parser completions. A
Completions
instance can contain multipleCompletionSet
s instances. ACompletionSet
provides a set ofCompletion
entries and is tagged with aCompletionTag
.Sets allow structuring the completion entries into groups, each group tagged with a
label
(plus optionaldescription
andmeta
, the latter allowing e.g. encoding visual attributes for the set). Sets also feature a score, which defines the order between sets within theCompletions
instance.Each
Completion
entry within a set has avalue
, ascore
and ameta
: the score allows ordering the entries within a set, and the meta can e.g. be used to assign a representation style for a particular completion entry.Note that specifying tags and sets is optional: if no tag is specified upon creation,
Completions
instances create a unique default set with an empty tag. -
trait
RegexCompletionSupport extends RegexParsers with CompletionSupport
This component extends
RegexParsers
with completion capability.This component extends
RegexParsers
with completion capability. In particular, it provides completions for theliteral
parser. Note that completions for theregex
parser are undefined by default and can be specified with the%>
operator. -
trait
TermsParsers extends RegexParsers with RegexCompletionSupport with TermsParsingHelpers with AlphabeticalSortingSupport
This trait adds specialized parsers for dealing with large lists of terms, both in terms of parsing (using a fast trie-based lookup) and completion (supporting fuzzy matching)
- trait TermsParsingHelpers extends AnyRef
Value Members
- object TermsParsers extends TermsParsers