()
| 59 | } |
| 60 | |
| 61 | public initView() { |
| 62 | const { builtInMenuBarData } = this.builtinService.getModules(); |
| 63 | const { |
| 64 | ACTION_QUICK_CREATE_FILE, |
| 65 | ACTION_QUICK_UNDO, |
| 66 | ACTION_QUICK_REDO, |
| 67 | ACTION_QUICK_SELECT_ALL, |
| 68 | ACTION_QUICK_COPY_LINE_UP, |
| 69 | MENU_VIEW_ACTIVITYBAR, |
| 70 | MENU_VIEW_AUXILIARY, |
| 71 | MENU_VIEW_MENUBAR, |
| 72 | MENU_VIEW_STATUSBAR, |
| 73 | MENU_QUICK_COMMAND, |
| 74 | MENU_VIEW_PANEL, |
| 75 | MENUBAR_MODE_HORIZONTAL, |
| 76 | MENUBAR_MODE_VERTICAL, |
| 77 | } = this.builtinService.getConstants(); |
| 78 | if (builtInMenuBarData) { |
| 79 | const mode = this.layoutService.getMenuBarMode(); |
| 80 | const menuBarData = this.getMenuBarDataByMode( |
| 81 | mode, |
| 82 | builtInMenuBarData |
| 83 | ); |
| 84 | this.menuBarService.setMenus(menuBarData); |
| 85 | } |
| 86 | ( |
| 87 | [ |
| 88 | [ACTION_QUICK_CREATE_FILE, () => this.createFile()], |
| 89 | [ACTION_QUICK_UNDO, () => this.undo()], |
| 90 | [ACTION_QUICK_REDO, () => this.redo()], |
| 91 | [ACTION_QUICK_SELECT_ALL, () => this.selectAll()], |
| 92 | [ACTION_QUICK_COPY_LINE_UP, () => this.copyLineUp()], |
| 93 | [MENU_VIEW_ACTIVITYBAR, () => this.updateActivityBar()], |
| 94 | [MENU_VIEW_MENUBAR, () => this.updateMenuBar()], |
| 95 | [MENU_VIEW_STATUSBAR, () => this.updateStatusBar()], |
| 96 | [MENU_QUICK_COMMAND, () => this.gotoQuickCommand()], |
| 97 | [ID_SIDE_BAR, () => this.updateSideBar()], |
| 98 | [MENU_VIEW_AUXILIARY, () => this.updateAuxiliaryBar()], |
| 99 | [MENU_VIEW_PANEL, () => this.updatePanel()], |
| 100 | [ |
| 101 | MENUBAR_MODE_HORIZONTAL, |
| 102 | () => this.updateMenuBarMode(MenuBarMode.horizontal), |
| 103 | ], |
| 104 | [ |
| 105 | MENUBAR_MODE_VERTICAL, |
| 106 | () => this.updateMenuBarMode(MenuBarMode.vertical), |
| 107 | ], |
| 108 | ] as [string, () => void][] |
| 109 | ).forEach(([key, value]) => { |
| 110 | if (key) { |
| 111 | this._automation[key] = value; |
| 112 | } |
| 113 | }); |
| 114 | |
| 115 | this.subscribe(MenuBarEvent.onChangeMode, this.updateMenuBarDataByMode); |
| 116 | } |
| 117 | |
| 118 | public updateFocusinEle = (ele: HTMLElement | null) => { |
nothing calls this directly
no test coverage detected