Theia API Documentation v1.65.0
    Preparing search index...

    Representation of a menu contribution.

    Note that there are also convenience classes which combine multiple contributions into one. For example to register a view together with a menu and keybinding you could use AbstractViewContribution instead.

    import { MenuContribution, MenuModelRegistry, MAIN_MENU_BAR } from '@theia/core';

    @injectable()
    export class NewMenuContribution implements MenuContribution {
    registerMenus(menus: MenuModelRegistry): void {
    const menuPath = [...MAIN_MENU_BAR, '99_mymenu'];
    menus.registerSubmenu(menuPath, 'My Menu');

    menus.registerMenuAction(menuPath, {
    commandId: MyCommand.id,
    label: 'My Action'
    });
    }
    }

    Implements

    Index

    Constructors

    Properties

    Methods