Base search provider interface


It is implemented by subprovider like searching on a single cell.

interface IBaseSearchProvider {
    currentMatchIndex: null | number;
    isDisposed: boolean;
    matchesCount: null | number;
    stateChanged: ISignal<IBaseSearchProvider, void>;
    clearHighlight(): Promise<void>;
    dispose(): void;
    endQuery(): Promise<void>;
    highlightNext(loop?): Promise<undefined | ISearchMatch>;
    highlightPrevious(loop?): Promise<undefined | ISearchMatch>;
    replaceAllMatches(newText, options?): Promise<boolean>;
    replaceCurrentMatch(newText, loop?, options?): Promise<boolean>;
    startQuery(query, filters): Promise<void>;

Hierarchy (view full)

Implemented by


    currentMatchIndex: null | number

    The current index of the selected match.

    isDisposed: boolean

    Test whether the object has been disposed.


    This property is always safe to access.

    matchesCount: null | number

    The number of matches.

    stateChanged: ISignal<IBaseSearchProvider, void>

    Signal indicating that something in the search has changed, so the UI should update


    • Dispose of the resources held by the object.


      If the object's dispose method is called more than once, all calls made after the first will be a no-op.

      Undefined Behavior

      It is undefined behavior to use any functionality of the object after it has been disposed unless otherwise explicitly noted.

      Returns void

    • Replace the currently selected match with the provided text and highlight the next match.


      • newText: string

        The replacement text

      • Optional loop: boolean

        Whether to loop within the matches list.

      • Optional options: IReplaceOptions

      Returns Promise<boolean>

      A promise that resolves with a boolean indicating whether a replace occurred.