Trait

com.nexthink.utils.parsing.combinator.completion

CompletionTypes

Related Doc: package completion

Permalink

trait CompletionTypes extends AnyRef

Collection of data types allowing definition of structured parser completions. A Completions instance can contain multiple CompletionSets instances. A CompletionSet provides a set of Completion entries and is tagged with a CompletionTag.

Sets allow structuring the completion entries into groups, each group tagged with a label (plus optional description and meta, the latter allowing e.g. encoding visual attributes for the set). Sets also feature a score, which defines the order between sets within the Completions instance.

Each Completion entry within a set has a value, a score and a meta: 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.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CompletionTypes
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Completion(value: Elems, score: Int = DefaultCompletionScore, meta: Option[JValue] = None) extends Product with Serializable

    Permalink

    Completion entry

    Completion entry

    value

    entry value (e.g. string literal)

    score

    entry score (defines the order of entries within a set, the higher the better)

    meta

    entry meta (e.g. visual style)

  2. case class CompletionSet(tag: CompletionTag, completions: HashMap[Elems, Completion]) extends Product with Serializable

    Permalink

    Set of related completion entries

    Set of related completion entries

    tag

    set tag

    completions

    set of unique completion entries

  3. case class CompletionTag(label: String, score: Int, description: Option[String], meta: Option[JValue]) extends Product with Serializable

    Permalink

    Tag defining identification and attributes of a set of completion entries

    Tag defining identification and attributes of a set of completion entries

    label

    tag label

    score

    tag score (the higher the better, 0 by default)

    description

    tag description (optional) - can be used for additional information e.g. for a tooltip

    meta

    tag meta (optional) - can be used e.g. to define visual style

  4. case class Completions(position: Position, meta: Option[JValue], sets: HashMap[String, CompletionSet]) extends Product with Serializable

    Permalink

    Result of parser completion, listing the possible entry alternatives at a certain input position

    Result of parser completion, listing the possible entry alternatives at a certain input position

    position

    position in the input where completion entries apply

    sets

    completion entries, grouped per tag

  5. abstract type Elem

    Permalink
  6. type Elems = Seq[Elem]

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object Completion extends Product with Serializable

    Permalink
  5. object CompletionSet extends Product with Serializable

    Permalink
  6. object CompletionTag extends Product with Serializable

    Permalink
  7. object Completions extends Product with Serializable

    Permalink
  8. val DefaultCompletionScore: Int

    Permalink
  9. val DefaultCompletionTag: String

    Permalink
  10. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped