Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private updateAddRemoveFolderActions(registry: MenuModelRegistry): void {
this.toDisposeAddRemoveFolderActions.dispose();
if (this.workspacePreferences['workspace.supportMultiRootWorkspace']) {
this.toDisposeAddRemoveFolderActions.push(registry.registerMenuAction(NavigatorContextMenu.WORKSPACE, {
commandId: FileNavigatorCommands.ADD_ROOT_FOLDER.id,
label: WorkspaceCommands.ADD_FOLDER.label!
}));
this.toDisposeAddRemoveFolderActions.push(registry.registerMenuAction(NavigatorContextMenu.WORKSPACE, {
commandId: WorkspaceCommands.REMOVE_FOLDER.id
}));
}
}
});
this.registerMoreToolbarItem({
id: WorkspaceCommands.NEW_FOLDER.id,
command: WorkspaceCommands.NEW_FOLDER.id,
tooltip: WorkspaceCommands.NEW_FOLDER.label,
group: NavigatorMoreToolbarGroups.NEW_OPEN,
});
this.registerMoreToolbarItem({
id: FileNavigatorCommands.TOGGLE_AUTO_REVEAL.id,
command: FileNavigatorCommands.TOGGLE_AUTO_REVEAL.id,
tooltip: FileNavigatorCommands.TOGGLE_AUTO_REVEAL.label,
group: NavigatorMoreToolbarGroups.TOOLS,
});
this.registerMoreToolbarItem({
id: WorkspaceCommands.ADD_FOLDER.id,
command: WorkspaceCommands.ADD_FOLDER.id,
tooltip: WorkspaceCommands.ADD_FOLDER.label,
group: NavigatorMoreToolbarGroups.WORKSPACE,
});
}