Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MenuContribution

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.

Example usage

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'
});
}
}

Hierarchy

  • MenuContribution

Index

Methods