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> {