MCPcopy
hub / github.com/CopyTranslator/CopyTranslator / getMenu

Method getMenu

src/main/menu-manager.ts:95–104  ·  view source on GitHub ↗
(name: MenuActionType)

Source from the content-addressed store, hash-verified

93 }
94
95 getMenu(name: MenuActionType) {
96 const contain = this.act.getKeys(name);
97 const menu = new Menu();
98 contain.forEach((id) => {
99 const action = this.act.getAction(id);
100 const menuItem = this.actionToMenuItem(action);
101 menu.append(new MenuItem(menuItem));
102 });
103 return menu;
104 }
105
106 openMenu(name: MenuActionType) {
107 this.getMenu(name).popup({});

Callers 2

openMenuMethod · 0.95
initMethod · 0.95

Calls 4

actionToMenuItemMethod · 0.95
getKeysMethod · 0.80
getActionMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected