Options
All
  • Public
  • Public/Protected
  • All
Menu

Module docmanager-extension

Index

Variables

Const default

default: JupyterFrontEndPlugin<any>[] = [docManagerPlugin,pathStatusPlugin,savingStatusPlugin]

Export the plugins as default.

Const pathStatusPlugin

pathStatusPlugin: JupyterFrontEndPlugin<void> = {id: '@jupyterlab/docmanager-extension:path-status',autoStart: true,requires: [IDocumentManager, ILabShell],optional: [IStatusBar],activate: (_: JupyterFrontEnd,docManager: IDocumentManager,labShell: ILabShell,statusBar: IStatusBar | null) => {if (!statusBar) {// Automatically disable if statusbar missingreturn;}const path = new PathStatus({ docManager });// Keep the file path widget up-to-date with the application active widget.path.model!.widget = labShell.currentWidget;labShell.currentChanged.connect(() => {path.model!.widget = labShell.currentWidget;});statusBar.registerStatusItem(pathStatusPlugin.id, {item: path,align: 'right',rank: 0,isActive: () => true});}}

A plugin providing a file path widget to the status bar.

Const savingStatusPlugin

savingStatusPlugin: JupyterFrontEndPlugin<void> = {id: '@jupyterlab/docmanager-extension:saving-status',autoStart: true,requires: [IDocumentManager, ILabShell, ITranslator],optional: [IStatusBar],activate: (_: JupyterFrontEnd,docManager: IDocumentManager,labShell: ILabShell,translator: ITranslator,statusBar: IStatusBar | null) => {if (!statusBar) {// Automatically disable if statusbar missingreturn;}const saving = new SavingStatus({ docManager, translator });// Keep the currently active widget synchronized.saving.model!.widget = labShell.currentWidget;labShell.currentChanged.connect(() => {saving.model!.widget = labShell.currentWidget;});statusBar.registerStatusItem(savingStatusPlugin.id, {item: saving,align: 'middle',isActive: () => true,activeStateChanged: saving.model!.stateChanged});}}

A plugin for adding a saving status item to the status bar.

Generated using TypeDoc