How to use the @jupyterlab/mainmenu-extension.createEditMenu function in @jupyterlab/mainmenu-extension

To help you get started, we’ve selected a few @jupyterlab/mainmenu-extension examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / jupyterlab_app / src / browser / extensions / utils-extension / index.tsx View on Github external
function buildNativeMenu(app: ElectronJupyterLab, palette: ICommandPalette): IMainMenu {
    let menu = new NativeMenu(app);

    let titleBar = buildTitleBar(app);
    titleBar.id = 'jpe-TitleBar-widget';
    titleBar.addClass('jpe-mod-' + app.info.uiState);

    app.shell.addToTopArea(titleBar);

    createEditMenu(app, menu.editMenu);
    createFileMenu(app, menu.fileMenu);
    createKernelMenu(app, menu.kernelMenu);
    createRunMenu(app, menu.runMenu);
    createSettingsMenu(app, menu.settingsMenu);
    createViewMenu(app, menu.viewMenu);
    createTabsMenu(app, menu.tabsMenu);

    palette.addItem({
        command: MainMenuExtensionCommandIDs.shutdownAllKernels,
        category: 'Kernel Operations'
    });

    return menu;
}