Class NotebookSearchProvider

Notebook document search provider

Hierarchy

Constructors

Properties

_addCellProvider: any
_currentProviderIndex: any
_delayedActiveCellChangeHandler: any
_editorSelectionsObservable: any
_ensureCurrentMatch: any

If there are results but no match is designated as current, mark a result as current and highlight it.

_filters: any
_filtersChanged: Signal<NotebookSearchProvider, void>
_handleHighlightsAfterActiveCellChange: any
_observeActiveCell: any
_onActiveCellChanged: any
_onCellSelectionChanged: any
_onCellsChanged: any
_onNotebookStateChanged: any
_onSelection: any
_query: any
_removeCellProvider: any
_searchActive: any
_searchProviders: any
_selectedCells: any
_selectedLines: any
_selectionLock: any
_selectionSearchMode: any
_setEnginesSelectionSearchMode: any

Set whether the engines should search within selection only or full text.

_setSelectedLines: any
_stateChanged: Signal<NotebookSearchProvider, void>
_stepNext: any
_stopObservingLastCell: any
_textSelection: any
_updateCellSelection: any
_updateSelectionMode: any

Update the search in selection mode; it should only be called when user navigates the notebook (enters editing/command mode, changes selection) but not when the searchbox gets focused (switching the notebook to command mode) nor when search highlights a match (switching notebook to edit mode).

delayedActiveCellChangeHandlerReady: Promise<void>
translator: ITranslator

Accessors

  • get currentMatchIndex(): number
  • The current index of the selected match.

    Returns number

  • get filtersChanged(): ISignal<this, void>
  • Signal indicating that filter definition changed.

    Returns ISignal<this, void>

  • get isDisposed(): boolean
  • Whether the search provider is disposed or not.

    Returns boolean

  • get isReadOnly(): boolean
  • Set to true if the widget under search is read-only, false if it is editable. Will be used to determine whether to show the replace option.

    Returns boolean

  • get matchesCount(): number
  • The number of matches.

    Returns number

  • get stateChanged(): ISignal<this, void>
  • Signal indicating that something in the search has changed, so the UI should update

    Returns ISignal<this, void>

Methods

  • Dispose of the resources held by the search provider.

    Notes

    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

  • Stop the search and clear all internal state.

    Returns Promise<void>

  • Get the filters for the given provider.

    Returns {
        [key: string]: IFilter;
    }

    The filters.

  • Get an initial query value if applicable so that it can be entered into the search box as an initial query

    Returns string

    Initial value used to populate the search box.

  • Replace all matches in the notebook with the provided text

    Parameters

    Returns Promise<boolean>

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

  • Replace the currently selected match with the provided text

    Parameters

    • 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.

  • Search for a regular expression with optional filters.

    Parameters

    • query: RegExp

      A regular expression to test for

    • filters: IFilters

      Filter parameters to pass to provider

    Returns Promise<void>

  • Parameters

    • name: string
    • value: boolean

    Returns Promise<boolean>

  • Instantiate a search provider for the notebook panel.

    Notes

    The widget provided is always checked using isApplicable before calling this factory.

    Parameters

    Returns ISearchProvider

    The search provider on the notebook panel

  • Report whether or not this provider has the ability to search on the given object

    Parameters

    • domain: Widget

      Widget to test

    Returns domain is NotebookPanel

    Search ability

  • Utility for copying the letter case from old to new text.

    Parameters

    • oldText: string
    • newText: string

    Returns string

Generated using TypeDoc