Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
registerMenus(registry: MenuModelRegistry) {
registry.registerMenuAction(NavigatorContextMenu.OPEN, {
commandId: WorkspaceCommands.FILE_OPEN.id
});
registry.registerSubmenu(NavigatorContextMenu.OPEN_WITH, 'Open With');
this.openerService.getOpeners().then(openers => {
for (const opener of openers) {
const openWithCommand = WorkspaceCommands.FILE_OPEN_WITH(opener);
registry.registerMenuAction(NavigatorContextMenu.OPEN_WITH, {
commandId: openWithCommand.id
});
}
});
// registry.registerMenuAction([CONTEXT_MENU_PATH, CUT_MENU_GROUP], {
// commandId: Commands.FILE_CUT
// });
registry.registerMenuAction(NavigatorContextMenu.CLIPBOARD, {
commandId: CommonCommands.COPY.id