Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BackgroundTokenizer

Tokenizes the current Document in the background, and caches the tokenized rows for future use.

If a certain row is changed, everything below that row is re-tokenized.

Hierarchy

  • BackgroundTokenizer

Index

Constructors

constructor

Events

on

  • on(name: "update", callback: (e: Object) => void): void
  • Fires whenever the background tokeniziers between a range of rows are going to be updated.

    Parameters

    • name: "update"
    • callback: (e: Object) => void
        • (e: Object): void
        • Parameters

          • e: Object

          Returns void

    Returns void

Methods

fireUpdateEvent

  • fireUpdateEvent(firstRow: Number, lastRow: Number): void
  • Emits the 'update' event. firstRow and lastRow are used to define the boundaries of the region to be updated.

    Parameters

    • firstRow: Number

      The starting row region

    • lastRow: Number

      The final row region

    Returns void

getState

  • getState(row: Number): string
  • Returns the state of tokenization at the end of a row.

    Parameters

    • row: Number

      The row to get state at

    Returns string

getTokens

  • getTokens(row: Number): Token[]

scheduleStart

  • scheduleStart(): void

setDocument

setTokenizer

start

  • start(startRow: Number): void

stop

  • stop(): void

Generated using TypeDoc