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

@@ -6,3 +6,12 @@
.context-view .monaco-menu {
min-width: 130px;
}
.context-view-block {
position: fixed;
left:0;
top:0;
z-index: -1;
width: 100%;
height: 100%;
}

View File

@@ -16,25 +16,27 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { IContextMenuDelegate } from 'vs/base/browser/contextmenu';
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
import { addDisposableListener, EventType, $, removeNode } from 'vs/base/browser/dom';
import { attachMenuStyler } from 'vs/platform/theme/common/styler';
import { domEvent } from 'vs/base/browser/event';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
export class ContextMenuHandler {
private element: HTMLElement | null;
private elementDisposable: IDisposable;
private menuContainerElement: HTMLElement | null;
private focusToReturn: HTMLElement;
private block: HTMLElement | null;
constructor(
element: HTMLElement,
private layoutService: ILayoutService,
private contextViewService: IContextViewService,
private telemetryService: ITelemetryService,
private notificationService: INotificationService,
private keybindingService: IKeybindingService,
private themeService: IThemeService
) {
this.setContainer(element);
this.setContainer(this.layoutService.container);
}
setContainer(container: HTMLElement | null): void {
@@ -73,12 +75,16 @@ export class ContextMenuHandler {
container.className += ' ' + className;
}
// Render invisible div to block mouse interaction in the rest of the UI
if (this.layoutService.hasWorkbench) {
this.block = container.appendChild($('.context-view-block'));
}
const menuDisposables: IDisposable[] = [];
const actionRunner = delegate.actionRunner || new ActionRunner();
actionRunner.onDidBeforeRun(this.onActionRun, this, menuDisposables);
actionRunner.onDidRun(this.onDidActionRun, this, menuDisposables);
menu = new Menu(container, actions, {
actionItemProvider: delegate.getActionItem,
context: delegate.getActionsContext ? delegate.getActionsContext() : null,
@@ -106,6 +112,11 @@ export class ContextMenuHandler {
delegate.onHide(!!didCancel);
}
if (this.block) {
removeNode(this.block);
this.block = null;
}
if (this.focusToReturn) {
this.focusToReturn.focus();
}

View File

@@ -12,6 +12,7 @@ import { IContextMenuDelegate } from 'vs/base/browser/contextmenu';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { Disposable } from 'vs/base/common/lifecycle';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
export class ContextMenuService extends Disposable implements IContextMenuService {
_serviceBrand: any;
@@ -22,7 +23,7 @@ export class ContextMenuService extends Disposable implements IContextMenuServic
private contextMenuHandler: ContextMenuHandler;
constructor(
container: HTMLElement,
@ILayoutService layoutService: ILayoutService,
@ITelemetryService telemetryService: ITelemetryService,
@INotificationService notificationService: INotificationService,
@IContextViewService contextViewService: IContextViewService,
@@ -31,7 +32,7 @@ export class ContextMenuService extends Disposable implements IContextMenuServic
) {
super();
this.contextMenuHandler = this._register(new ContextMenuHandler(container, contextViewService, telemetryService, notificationService, keybindingService, themeService));
this.contextMenuHandler = this._register(new ContextMenuHandler(layoutService, contextViewService, telemetryService, notificationService, keybindingService, themeService));
}
dispose(): void {

View File

@@ -5,9 +5,8 @@
import { IContextViewService, IContextViewDelegate } from './contextView';
import { ContextView } from 'vs/base/browser/ui/contextview/contextview';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { ILogService } from 'vs/platform/log/common/log';
import { Disposable } from 'vs/base/common/lifecycle';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
export class ContextViewService extends Disposable implements IContextViewService {
_serviceBrand: any;
@@ -15,24 +14,23 @@ export class ContextViewService extends Disposable implements IContextViewServic
private contextView: ContextView;
constructor(
container: HTMLElement,
@ITelemetryService telemetryService: ITelemetryService,
@ILogService private readonly logService: ILogService
@ILayoutService readonly layoutService: ILayoutService
) {
super();
this.contextView = this._register(new ContextView(container));
this.contextView = this._register(new ContextView(layoutService.container));
this.layout();
this._register(layoutService.onLayout(() => this.layout()));
}
// ContextView
setContainer(container: HTMLElement): void {
this.logService.trace('ContextViewService#setContainer');
this.contextView.setContainer(container);
}
showContextView(delegate: IContextViewDelegate): void {
this.logService.trace('ContextViewService#showContextView');
this.contextView.show(delegate);
}
@@ -41,7 +39,6 @@ export class ContextViewService extends Disposable implements IContextViewServic
}
hideContextView(data?: any): void {
this.logService.trace('ContextViewService#hideContextView');
this.contextView.hide(data);
}
}