MCPcopy Create free account
hub / github.com/DTStack/molecule / getMenuBarDataByMode

Method getMenuBarDataByMode

src/controller/menuBar.ts:312–327  ·  view source on GitHub ↗
(
        mode: keyof typeof MenuBarMode,
        menuData: IMenuBarItem[]
    )

Source from the content-addressed store, hash-verified

310 }
311
312 public getMenuBarDataByMode(
313 mode: keyof typeof MenuBarMode,
314 menuData: IMenuBarItem[]
315 ): IMenuBarItem[] {
316 const { MENUBAR_MODE_VERTICAL, MENUBAR_MODE_HORIZONTAL } =
317 this.builtinService.getConstants();
318 const ids: (string | undefined)[] = [];
319 if (mode === MenuBarMode.horizontal) {
320 ids.push(MENUBAR_MODE_HORIZONTAL);
321 } else if (mode === MenuBarMode.vertical) {
322 ids.push(MENUBAR_MODE_VERTICAL);
323 }
324
325 const menuBarData = this.getFilteredMenuBarData(menuData, ids);
326 return menuBarData;
327 }
328
329 private updateActivityBarContextMenu(menuId: UniqueId) {
330 const { MENU_VIEW_MENUBAR, CONTEXT_MENU_MENU } =

Callers 2

initViewMethod · 0.95
menuBar.test.tsFile · 0.80

Calls 2

getConstantsMethod · 0.65

Tested by

no test coverage detected