Search in a document model.

Hierarchy

Implements

Constructors

Properties

_caseSensitive: any
_disposed: any
_filters: any
_initialQuery: any
_onProviderStateChanged: any
_parsingError: any
_preserveCase: any
_replaceText: any
_searchActive: any
_searchDebouncer: any
_searchExpression: any
_updateSearch: any
_useRegex: any
_wholeWords: any
searchProvider: ISearchProvider
stateChanged: Signal<SearchDocumentModel, void>

A signal emitted when any model state changes.

Accessors

  • get caseSensitive(): boolean
  • Whether the search is case sensitive or not.

    Returns boolean

  • set caseSensitive(v): void
  • Parameters

    • v: boolean

    Returns void

  • get currentIndex(): number
  • Current highlighted match index.

    Returns number

  • get disposed(): ISignal<this, void>
  • A signal emitted when the object is disposed.

    Returns ISignal<this, void>

  • get filters(): IFilters
  • Filter values.

    Returns IFilters

  • get filtersDefinition(): {
        [n: string]: IFilter;
    }
  • Filter definitions for the current provider.

    Returns {
        [n: string]: IFilter;
    }

  • get initialQuery(): string
  • The initial query string.

    Returns string

  • set initialQuery(v): void
  • Parameters

    • v: string

    Returns void

  • get isDisposed(): boolean
  • Test whether the model is disposed.

    Returns boolean

  • get isReadOnly(): boolean
  • Whether the document is read-only or not.

    Returns boolean

  • get parsingError(): string
  • Parsing regular expression error message.

    Returns string

  • get preserveCase(): boolean
  • Whether to preserve case when replacing.

    Returns boolean

  • set preserveCase(v): void
  • Parameters

    • v: boolean

    Returns void

  • get replaceText(): string
  • Replacement expression

    Returns string

  • set replaceText(v): void
  • Parameters

    • v: string

    Returns void

  • get searchExpression(): string
  • Search expression

    Returns string

  • set searchExpression(v): void
  • Parameters

    • v: string

    Returns void

  • get selectionState(): SelectionState
  • Whether the selection includes a single item or multiple items; this is used by the heuristic auto-enabling "search in selection" mode.

    Returns undefined if the provider does not expose this information.

    Returns SelectionState

  • get suggestedInitialQuery(): string
  • Initial query as suggested by provider.

    A common choice is the text currently selected by the user.

    Returns string

  • get totalMatches(): number
  • Total number of matches.

    Returns number

  • get useRegex(): boolean
  • Whether to use regular expression or not.

    Returns boolean

  • set useRegex(v): void
  • Parameters

    • v: boolean

    Returns void

  • get wholeWords(): boolean
  • Whether to match whole words or not.

    Returns boolean

  • set wholeWords(v): void
  • Parameters

    • v: boolean

    Returns void

Methods

  • Dispose the model.

    Returns void

  • End the query.

    Returns Promise<void>

  • Highlight the next match.

    Returns Promise<void>

  • Highlight the previous match

    Returns Promise<void>

  • Refresh search

    Returns void

  • Replace all matches.

    Returns Promise<void>

  • Replace the current match.

    Returns Promise<void>

  • Set the value of a given filter.

    Parameters

    • name: string

      Filter name

    • v: boolean

      Filter value

    Returns Promise<void>

Generated using TypeDoc