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
}));
}
}