Merge from master

This commit is contained in:
Raj Musuku
2019-02-21 17:56:04 -08:00
parent 5a146e34fa
commit 666ae11639
11482 changed files with 119352 additions and 255574 deletions

View File

@@ -2,7 +2,6 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { ContextMenuHandler } from './contextMenuHandler';
import { IContextViewService, IContextMenuService } from './contextView';
@@ -10,34 +9,43 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { Event, Emitter } from 'vs/base/common/event';
import { INotificationService } from 'vs/platform/notification/common/notification';
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';
export class ContextMenuService extends Disposable implements IContextMenuService {
_serviceBrand: any;
export class ContextMenuService implements IContextMenuService {
public _serviceBrand: any;
private _onDidContextMenu = this._register(new Emitter<void>());
get onDidContextMenu(): Event<void> { return this._onDidContextMenu.event; }
private contextMenuHandler: ContextMenuHandler;
private _onDidContextMenu = new Emitter<void>();
constructor(container: HTMLElement, telemetryService: ITelemetryService, notificationService: INotificationService, contextViewService: IContextViewService) {
this.contextMenuHandler = new ContextMenuHandler(container, contextViewService, telemetryService, notificationService);
constructor(
container: HTMLElement,
@ITelemetryService telemetryService: ITelemetryService,
@INotificationService notificationService: INotificationService,
@IContextViewService contextViewService: IContextViewService,
@IKeybindingService keybindingService: IKeybindingService,
@IThemeService themeService: IThemeService
) {
super();
this.contextMenuHandler = this._register(new ContextMenuHandler(container, contextViewService, telemetryService, notificationService, keybindingService, themeService));
}
public dispose(): void {
dispose(): void {
this.contextMenuHandler.dispose();
}
public setContainer(container: HTMLElement): void {
setContainer(container: HTMLElement): void {
this.contextMenuHandler.setContainer(container);
}
// ContextMenu
public showContextMenu(delegate: IContextMenuDelegate): void {
showContextMenu(delegate: IContextMenuDelegate): void {
this.contextMenuHandler.showContextMenu(delegate);
this._onDidContextMenu.fire();
}
public get onDidContextMenu(): Event<void> {
return this._onDidContextMenu.event;
}
}