Vscode merge (#4582)

* Merge from vscode 37cb23d3dd4f9433d56d4ba5ea3203580719a0bd

* fix issues with merges

* bump node version in azpipe

* replace license headers

* remove duplicate launch task

* fix build errors

* fix build errors

* fix tslint issues

* working through package and linux build issues

* more work

* wip

* fix packaged builds

* working through linux build errors

* wip

* wip

* wip

* fix mac and linux file limits

* iterate linux pipeline

* disable editor typing

* revert series to parallel

* remove optimize vscode from linux

* fix linting issues

* revert testing change

* add work round for new node

* readd packaging for extensions

* fix issue with angular not resolving decorator dependencies
This commit is contained in:
Anthony Dresser
2019-03-19 17:44:35 -07:00
committed by GitHub
parent 833d197412
commit 87765e8673
1879 changed files with 54505 additions and 38058 deletions

View File

@@ -11,15 +11,15 @@ import { Action } from 'vs/base/common/actions';
import { SyncActionDescriptor, MenuId, MenuRegistry } from 'vs/platform/actions/common/actions';
import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actions';
import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
import { IPartService, Parts, Position } from 'vs/workbench/services/part/common/partService';
import { IWorkbenchLayoutService, Parts, Position } from 'vs/workbench/services/layout/browser/layoutService';
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
import { IEditorGroupsService, GroupOrientation } from 'vs/workbench/services/group/common/editorGroupsService';
import { IEditorGroupsService, GroupOrientation } from 'vs/workbench/services/editor/common/editorGroupsService';
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { KeyMod, KeyCode, KeyChord } from 'vs/base/common/keyCodes';
import { dispose, IDisposable } from 'vs/base/common/lifecycle';
import { MenuBarVisibility } from 'vs/platform/windows/common/windows';
import { isWindows, isLinux } from 'vs/base/common/platform';
import { IsMacContext } from 'vs/platform/workbench/common/contextkeys';
import { IsMacContext } from 'vs/workbench/common/contextkeys';
import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { InEditorZenModeContext } from 'vs/workbench/common/editor';
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
@@ -39,16 +39,16 @@ export class ToggleActivityBarVisibilityAction extends Action {
constructor(
id: string,
label: string,
@IPartService private readonly partService: IPartService,
@IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService,
@IConfigurationService private readonly configurationService: IConfigurationService
) {
super(id, label);
this.enabled = !!this.partService;
this.enabled = !!this.layoutService;
}
run(): Promise<any> {
const visibility = this.partService.isVisible(Parts.ACTIVITYBAR_PART);
const visibility = this.layoutService.isVisible(Parts.ACTIVITYBAR_PART);
const newVisibilityValue = !visibility;
return this.configurationService.updateValue(ToggleActivityBarVisibilityAction.activityBarVisibleKey, newVisibilityValue, ConfigurationTarget.USER);
@@ -76,16 +76,16 @@ class ToggleCenteredLayout extends Action {
constructor(
id: string,
label: string,
@IPartService private readonly partService: IPartService
@IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService
) {
super(id, label);
this.enabled = !!this.partService;
this.enabled = !!this.layoutService;
}
run(): Promise<any> {
this.partService.centerEditorLayout(!this.partService.isEditorLayoutCentered());
this.layoutService.centerEditorLayout(!this.layoutService.isEditorLayoutCentered());
return Promise.resolve(null);
return Promise.resolve();
}
}
@@ -137,7 +137,7 @@ export class ToggleEditorLayoutAction extends Action {
const newOrientation = (this.editorGroupService.orientation === GroupOrientation.VERTICAL) ? GroupOrientation.HORIZONTAL : GroupOrientation.VERTICAL;
this.editorGroupService.setGroupOrientation(newOrientation);
return Promise.resolve(null);
return Promise.resolve();
}
dispose(): void {
@@ -153,7 +153,7 @@ CommandsRegistry.registerCommand('_workbench.editor.setGroupOrientation', functi
editorGroupService.setGroupOrientation(orientation);
return Promise.resolve(null);
return Promise.resolve();
});
const group = viewCategory;
@@ -180,23 +180,23 @@ export class ToggleSidebarPositionAction extends Action {
constructor(
id: string,
label: string,
@IPartService private readonly partService: IPartService,
@IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService,
@IConfigurationService private readonly configurationService: IConfigurationService
) {
super(id, label);
this.enabled = !!this.partService && !!this.configurationService;
this.enabled = !!this.layoutService && !!this.configurationService;
}
run(): Promise<any> {
const position = this.partService.getSideBarPosition();
const position = this.layoutService.getSideBarPosition();
const newPositionValue = (position === Position.LEFT) ? 'right' : 'left';
return this.configurationService.updateValue(ToggleSidebarPositionAction.sidebarPositionConfigurationKey, newPositionValue, ConfigurationTarget.USER);
}
static getLabel(partService: IPartService): string {
return partService.getSideBarPosition() === Position.LEFT ? nls.localize('moveSidebarRight', "Move Side Bar Right") : nls.localize('moveSidebarLeft', "Move Side Bar Left");
static getLabel(layoutService: IWorkbenchLayoutService): string {
return layoutService.getSideBarPosition() === Position.LEFT ? nls.localize('moveSidebarRight', "Move Side Bar Right") : nls.localize('moveSidebarLeft', "Move Side Bar Left");
}
}
@@ -220,18 +220,18 @@ export class ToggleEditorVisibilityAction extends Action {
constructor(
id: string,
label: string,
@IPartService private readonly partService: IPartService
@IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService
) {
super(id, label);
this.enabled = !!this.partService;
this.enabled = !!this.layoutService;
}
run(): Promise<any> {
const hideEditor = this.partService.isVisible(Parts.EDITOR_PART);
this.partService.setEditorHidden(hideEditor);
const hideEditor = this.layoutService.isVisible(Parts.EDITOR_PART);
this.layoutService.setEditorHidden(hideEditor);
return Promise.resolve(null);
return Promise.resolve();
}
}
@@ -247,18 +247,18 @@ export class ToggleSidebarVisibilityAction extends Action {
constructor(
id: string,
label: string,
@IPartService private readonly partService: IPartService
@IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService
) {
super(id, label);
this.enabled = !!this.partService;
this.enabled = !!this.layoutService;
}
run(): Promise<any> {
const hideSidebar = this.partService.isVisible(Parts.SIDEBAR_PART);
this.partService.setSideBarHidden(hideSidebar);
const hideSidebar = this.layoutService.isVisible(Parts.SIDEBAR_PART);
this.layoutService.setSideBarHidden(hideSidebar);
return Promise.resolve(null);
return Promise.resolve();
}
}
@@ -285,16 +285,16 @@ class ToggleStatusbarVisibilityAction extends Action {
constructor(
id: string,
label: string,
@IPartService private readonly partService: IPartService,
@IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService,
@IConfigurationService private readonly configurationService: IConfigurationService
) {
super(id, label);
this.enabled = !!this.partService;
this.enabled = !!this.layoutService;
}
run(): Promise<any> {
const visibility = this.partService.isVisible(Parts.STATUSBAR_PART);
const visibility = this.layoutService.isVisible(Parts.STATUSBAR_PART);
const newVisibilityValue = !visibility;
return this.configurationService.updateValue(ToggleStatusbarVisibilityAction.statusbarVisibleKey, newVisibilityValue, ConfigurationTarget.USER);
@@ -337,7 +337,11 @@ class ToggleTabsVisibilityAction extends Action {
}
}
registry.registerWorkbenchAction(new SyncActionDescriptor(ToggleTabsVisibilityAction, ToggleTabsVisibilityAction.ID, ToggleTabsVisibilityAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_W }), 'View: Toggle Tab Visibility', viewCategory);
registry.registerWorkbenchAction(new SyncActionDescriptor(ToggleTabsVisibilityAction, ToggleTabsVisibilityAction.ID, ToggleTabsVisibilityAction.LABEL, {
primary: undefined!,
mac: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_W, },
linux: { primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_W, }
}), 'View: Toggle Tab Visibility', viewCategory);
// --- Toggle Zen Mode
@@ -349,16 +353,16 @@ class ToggleZenMode extends Action {
constructor(
id: string,
label: string,
@IPartService private readonly partService: IPartService
@IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService
) {
super(id, label);
this.enabled = !!this.partService;
this.enabled = !!this.layoutService;
}
run(): Promise<any> {
this.partService.toggleZenMode();
this.layoutService.toggleZenMode();
return Promise.resolve(null);
return Promise.resolve();
}
}
@@ -377,8 +381,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
id: 'workbench.action.exitZenMode',
weight: KeybindingWeight.EditorContrib - 1000,
handler(accessor: ServicesAccessor) {
const partService = accessor.get(IPartService);
partService.toggleZenMode();
const layoutService = accessor.get(IWorkbenchLayoutService);
layoutService.toggleZenMode();
},
when: InEditorZenModeContext,
primary: KeyChord(KeyCode.Escape, KeyCode.Escape)
@@ -443,15 +447,15 @@ export abstract class BaseResizeViewAction extends Action {
constructor(
id: string,
label: string,
@IPartService protected partService: IPartService
@IWorkbenchLayoutService protected layoutService: IWorkbenchLayoutService
) {
super(id, label);
}
protected resizePart(sizeChange: number): void {
const isEditorFocus = this.partService.hasFocus(Parts.EDITOR_PART);
const isSidebarFocus = this.partService.hasFocus(Parts.SIDEBAR_PART);
const isPanelFocus = this.partService.hasFocus(Parts.PANEL_PART);
const isEditorFocus = this.layoutService.hasFocus(Parts.EDITOR_PART);
const isSidebarFocus = this.layoutService.hasFocus(Parts.SIDEBAR_PART);
const isPanelFocus = this.layoutService.hasFocus(Parts.PANEL_PART);
let part: Parts | undefined;
if (isSidebarFocus) {
@@ -463,7 +467,7 @@ export abstract class BaseResizeViewAction extends Action {
}
if (part) {
this.partService.resizePart(part, sizeChange);
this.layoutService.resizePart(part, sizeChange);
}
}
}
@@ -476,9 +480,9 @@ export class IncreaseViewSizeAction extends BaseResizeViewAction {
constructor(
id: string,
label: string,
@IPartService partService: IPartService
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService
) {
super(id, label, partService);
super(id, label, layoutService);
}
run(): Promise<boolean> {
@@ -495,10 +499,10 @@ export class DecreaseViewSizeAction extends BaseResizeViewAction {
constructor(
id: string,
label: string,
@IPartService partService: IPartService
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService
) {
super(id, label, partService);
super(id, label, layoutService);
}
run(): Promise<boolean> {

View File

@@ -18,7 +18,7 @@ import { DataTree } from 'vs/base/browser/ui/tree/dataTree';
import { ITreeNode } from 'vs/base/browser/ui/tree/tree';
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
function ensureDOMFocus(widget: ListWidget): void {
function ensureDOMFocus(widget: ListWidget | undefined): void {
// it can happen that one of the commands is executed while
// DOM focus is within another focusable control within the
// list/tree item. therefor we should ensure that the
@@ -88,10 +88,12 @@ function expandMultiSelection(focused: List<any> | PagedList<any> | ITree | Obje
const focus = list.getFocus() ? list.getFocus()[0] : undefined;
const selection = list.getSelection();
if (selection && selection.indexOf(focus) >= 0) {
if (selection && typeof focus === 'number' && selection.indexOf(focus) >= 0) {
list.setSelection(selection.filter(s => s !== previousFocus));
} else {
list.setSelection(selection.concat(focus));
if (typeof focus === 'number') {
list.setSelection(selection.concat(focus));
}
}
}
@@ -581,7 +583,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
const list = focused;
const fakeKeyboardEvent = getSelectionKeyboardEvent('keydown', false);
list.setSelection(list.getFocus(), fakeKeyboardEvent);
list.open(list.getFocus());
list.open(list.getFocus(), fakeKeyboardEvent);
}
// Tree
@@ -636,7 +638,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
const selectedNode = tree.getNode(start);
const parentNode = selectedNode.parent;
if (!parentNode.parent) { // root
if (!parentNode || !parentNode.parent) { // root
scope = undefined;
} else {
scope = parentNode.element;
@@ -752,7 +754,8 @@ CommandsRegistry.registerCommand({
// List
if (focused instanceof List || focused instanceof PagedList) {
// TODO@joao
const list = focused;
list.toggleKeyboardNavigation();
}
// ObjectTree

View File

@@ -6,9 +6,9 @@
import * as nls from 'vs/nls';
import { Registry } from 'vs/platform/registry/common/platform';
import { Action } from 'vs/base/common/actions';
import { IEditorGroupsService, GroupDirection, GroupLocation, IFindGroupScope } from 'vs/workbench/services/group/common/editorGroupsService';
import { IEditorGroupsService, GroupDirection, GroupLocation, IFindGroupScope } from 'vs/workbench/services/editor/common/editorGroupsService';
import { IPanelService } from 'vs/workbench/services/panel/common/panelService';
import { IPartService, Parts, Position as PartPosition } from 'vs/workbench/services/part/common/partService';
import { IWorkbenchLayoutService, Parts, Position as PartPosition } from 'vs/workbench/services/layout/browser/layoutService';
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import { IViewlet } from 'vs/workbench/common/viewlet';
import { IPanel } from 'vs/workbench/common/panel';
@@ -22,19 +22,19 @@ abstract class BaseNavigationAction extends Action {
label: string,
@IEditorGroupsService protected editorGroupService: IEditorGroupsService,
@IPanelService protected panelService: IPanelService,
@IPartService protected partService: IPartService,
@IWorkbenchLayoutService protected layoutService: IWorkbenchLayoutService,
@IViewletService protected viewletService: IViewletService
) {
super(id, label);
}
run(): Promise<any> {
const isEditorFocus = this.partService.hasFocus(Parts.EDITOR_PART);
const isPanelFocus = this.partService.hasFocus(Parts.PANEL_PART);
const isSidebarFocus = this.partService.hasFocus(Parts.SIDEBAR_PART);
const isEditorFocus = this.layoutService.hasFocus(Parts.EDITOR_PART);
const isPanelFocus = this.layoutService.hasFocus(Parts.PANEL_PART);
const isSidebarFocus = this.layoutService.hasFocus(Parts.SIDEBAR_PART);
const isSidebarPositionLeft = this.partService.getSideBarPosition() === PartPosition.LEFT;
const isPanelPositionDown = this.partService.getPanelPosition() === PartPosition.BOTTOM;
const isSidebarPositionLeft = this.layoutService.getSideBarPosition() === PartPosition.LEFT;
const isPanelPositionDown = this.layoutService.getPanelPosition() === PartPosition.BOTTOM;
if (isEditorFocus) {
return this.navigateOnEditorFocus(isSidebarPositionLeft, isPanelPositionDown);
@@ -64,21 +64,25 @@ abstract class BaseNavigationAction extends Action {
}
protected navigateToPanel(): IPanel | boolean {
if (!this.partService.isVisible(Parts.PANEL_PART)) {
if (!this.layoutService.isVisible(Parts.PANEL_PART)) {
return false;
}
const activePanelId = this.panelService.getActivePanel().getId();
const activePanelId = this.panelService.getActivePanel()!.getId();
return this.panelService.openPanel(activePanelId, true);
return this.panelService.openPanel(activePanelId, true)!;
}
protected navigateToSidebar(): Promise<IViewlet | boolean> {
if (!this.partService.isVisible(Parts.SIDEBAR_PART)) {
if (!this.layoutService.isVisible(Parts.SIDEBAR_PART)) {
return Promise.resolve(false);
}
const activeViewletId = this.viewletService.getActiveViewlet().getId();
const activeViewlet = this.viewletService.getActiveViewlet();
if (!activeViewlet) {
return Promise.resolve(false);
}
const activeViewletId = activeViewlet.getId();
return this.viewletService.openViewlet(activeViewletId, true)
.then(value => value === null ? false : value);
@@ -114,10 +118,10 @@ class NavigateLeftAction extends BaseNavigationAction {
label: string,
@IEditorGroupsService editorGroupService: IEditorGroupsService,
@IPanelService panelService: IPanelService,
@IPartService partService: IPartService,
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@IViewletService viewletService: IViewletService
) {
super(id, label, editorGroupService, panelService, partService, viewletService);
super(id, label, editorGroupService, panelService, layoutService, viewletService);
}
protected navigateOnEditorFocus(isSidebarPositionLeft: boolean, _isPanelPositionDown: boolean): Promise<boolean | IViewlet> {
@@ -164,10 +168,10 @@ class NavigateRightAction extends BaseNavigationAction {
label: string,
@IEditorGroupsService editorGroupService: IEditorGroupsService,
@IPanelService panelService: IPanelService,
@IPartService partService: IPartService,
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@IViewletService viewletService: IViewletService
) {
super(id, label, editorGroupService, panelService, partService, viewletService);
super(id, label, editorGroupService, panelService, layoutService, viewletService);
}
protected navigateOnEditorFocus(isSidebarPositionLeft: boolean, isPanelPositionDown: boolean): Promise<boolean | IViewlet | IPanel> {
@@ -214,10 +218,10 @@ class NavigateUpAction extends BaseNavigationAction {
label: string,
@IEditorGroupsService editorGroupService: IEditorGroupsService,
@IPanelService panelService: IPanelService,
@IPartService partService: IPartService,
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@IViewletService viewletService: IViewletService
) {
super(id, label, editorGroupService, panelService, partService, viewletService);
super(id, label, editorGroupService, panelService, layoutService, viewletService);
}
protected navigateOnEditorFocus(_isSidebarPositionLeft: boolean, _isPanelPositionDown: boolean): Promise<boolean> {
@@ -243,10 +247,10 @@ class NavigateDownAction extends BaseNavigationAction {
label: string,
@IEditorGroupsService editorGroupService: IEditorGroupsService,
@IPanelService panelService: IPanelService,
@IPartService partService: IPartService,
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@IViewletService viewletService: IViewletService
) {
super(id, label, editorGroupService, panelService, partService, viewletService);
super(id, label, editorGroupService, panelService, layoutService, viewletService);
}
protected navigateOnEditorFocus(_isSidebarPositionLeft: boolean, isPanelPositionDown: boolean): Promise<boolean | IPanel> {

View File

@@ -9,13 +9,10 @@ import { IWindowService } from 'vs/platform/windows/common/windows';
import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry';
import { IWorkspaceContextService, WorkbenchState, IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing';
import { WORKSPACE_FILTER, IWorkspacesService } from 'vs/platform/workspaces/common/workspaces';
import { mnemonicButtonLabel } from 'vs/base/common/labels';
import { IWorkspacesService } from 'vs/platform/workspaces/common/workspaces';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { ADD_ROOT_FOLDER_COMMAND_ID, ADD_ROOT_FOLDER_LABEL, PICK_WORKSPACE_FOLDER_COMMAND_ID } from 'vs/workbench/browser/actions/workspaceCommands';
import { URI } from 'vs/base/common/uri';
import { Schemas } from 'vs/base/common/network';
import { IFileDialogService } from 'vs/platform/dialogs/common/dialogs';
import { INotificationService } from 'vs/platform/notification/common/notification';
@@ -133,15 +130,14 @@ export class SaveWorkspaceAsAction extends Action {
id: string,
label: string,
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
@IWorkspaceEditingService private readonly workspaceEditingService: IWorkspaceEditingService,
@IFileDialogService private readonly dialogService: IFileDialogService
@IWorkspaceEditingService private readonly workspaceEditingService: IWorkspaceEditingService
) {
super(id, label);
}
run(): Promise<any> {
return this.getNewWorkspaceConfigPath().then((configPathUri): Promise<void> | void => {
return this.workspaceEditingService.pickNewWorkspacePath().then((configPathUri): Promise<void> | void => {
if (configPathUri) {
switch (this.contextService.getWorkbenchState()) {
case WorkbenchState.EMPTY:
@@ -155,15 +151,6 @@ export class SaveWorkspaceAsAction extends Action {
}
});
}
private getNewWorkspaceConfigPath(): Promise<URI | undefined> {
return this.dialogService.showSaveDialog({
saveLabel: mnemonicButtonLabel(nls.localize({ key: 'save', comment: ['&& denotes a mnemonic'] }, "&&Save")),
title: nls.localize('saveWorkspace', "Save Workspace"),
filters: WORKSPACE_FILTER,
defaultUri: this.dialogService.defaultWorkspacePath(Schemas.file)
});
}
}
export class OpenWorkspaceAction extends Action {
@@ -253,10 +240,11 @@ export class DuplicateWorkspaceInNewWindowAction extends Action {
run(): Promise<any> {
const folders = this.workspaceContextService.getWorkspace().folders;
const remoteAuthority = this.windowService.getConfiguration().remoteAuthority;
return this.workspacesService.createUntitledWorkspace(folders).then(newWorkspace => {
return this.workspacesService.createUntitledWorkspace(folders, remoteAuthority).then(newWorkspace => {
return this.workspaceEditingService.copyWorkspaceSettings(newWorkspace).then(() => {
return this.windowService.openWindow([URI.file(newWorkspace.configPath)], { forceNewWindow: true });
return this.windowService.openWindow([{ uri: newWorkspace.configPath, typeHint: 'file' }], { forceNewWindow: true });
});
});
}

View File

@@ -18,7 +18,6 @@ import { IQuickInputService, IPickOptions, IQuickPickItem } from 'vs/platform/qu
import { getIconClasses } from 'vs/editor/common/services/getIconClasses';
import { IModelService } from 'vs/editor/common/services/modelService';
import { IModeService } from 'vs/editor/common/services/modeService';
import { Schemas } from 'vs/base/common/network';
import { IFileDialogService } from 'vs/platform/dialogs/common/dialogs';
export const ADD_ROOT_FOLDER_COMMAND_ID = 'addRootFolder';
@@ -35,7 +34,7 @@ CommandsRegistry.registerCommand({
CommandsRegistry.registerCommand({
id: '_files.pickFolderAndOpen',
handler: (accessor: ServicesAccessor, forceNewWindow: boolean) => accessor.get(IFileDialogService).pickFolderAndOpen({ forceNewWindow })
handler: (accessor: ServicesAccessor, options: { forceNewWindow: boolean }) => accessor.get(IFileDialogService).pickFolderAndOpen(options)
});
CommandsRegistry.registerCommand({
@@ -64,7 +63,7 @@ CommandsRegistry.registerCommand({
title: nls.localize('addFolderToWorkspaceTitle', "Add Folder to Workspace"),
canSelectFolders: true,
canSelectMany: true,
defaultUri: dialogsService.defaultFolderPath(Schemas.file)
defaultUri: dialogsService.defaultFolderPath()
}).then((folders): Promise<any> | null => {
if (!folders || !folders.length) {
return null;
@@ -93,7 +92,7 @@ CommandsRegistry.registerCommand(PICK_WORKSPACE_FOLDER_COMMAND_ID, function (acc
const folderPicks = folders.map(folder => {
return {
label: folder.name,
description: labelService.getUriLabel(resources.dirname(folder.uri)!, { relative: true }),
description: labelService.getUriLabel(resources.dirname(folder.uri), { relative: true }),
folder,
iconClasses: getIconClasses(modelService, modeService, folder.uri, FileKind.ROOT_FOLDER)
} as IQuickPickItem;