Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
activate: (
app: JupyterFrontEnd,
palette: ICommandPalette,
mainMenu: IMainMenu | null
) => {
// Create registry, retrieve all default providers
const registry: SearchProviderRegistry = new SearchProviderRegistry();
// Register default implementations of the Notebook and CodeMirror search providers
registry.register('jp-notebookSearchProvider', NotebookSearchProvider);
registry.register('jp-codeMirrorSearchProvider', CodeMirrorSearchProvider);
const activeSearches = new Map();
const startCommand: string = 'documentsearch:start';
const nextCommand: string = 'documentsearch:highlightNext';
const prevCommand: string = 'documentsearch:highlightPrevious';
app.commands.addCommand(startCommand, {
label: 'Find…',
isEnabled: () => {
const currentWidget = app.shell.currentWidget;
if (!currentWidget) {
return false;
activate: (
app: JupyterFrontEnd,
palette: ICommandPalette,
mainMenu: IMainMenu | null
) => {
// Create registry, retrieve all default providers
const registry: SearchProviderRegistry = new SearchProviderRegistry();
// Register default implementations of the Notebook and CodeMirror search providers
registry.register('jp-notebookSearchProvider', NotebookSearchProvider);
registry.register('jp-codeMirrorSearchProvider', CodeMirrorSearchProvider);
const activeSearches = new Map();
const startCommand: string = 'documentsearch:start';
const nextCommand: string = 'documentsearch:highlightNext';
const prevCommand: string = 'documentsearch:highlightPrevious';
app.commands.addCommand(startCommand, {
label: 'Find…',
isEnabled: () => {
const currentWidget = app.shell.currentWidget;
if (!currentWidget) {
return;